Scope: static
Source: src/display/align/to/index.js#L7
Static functions
BottomCenter
<static> BottomCenter(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/BottomCenter.js#L12
Since: 3.0.0
BottomLeft
<static> BottomLeft(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/BottomLeft.js#L12
Since: 3.0.0
BottomRight
<static> BottomRight(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/BottomRight.js#L12
Since: 3.0.0
LeftBottom
<static> LeftBottom(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/LeftBottom.js#L12
Since: 3.0.0
LeftCenter
<static> LeftCenter(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the left center position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/LeftCenter.js#L12
Since: 3.0.0
LeftTop
<static> LeftTop(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the left top position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/LeftTop.js#L12
Since: 3.0.0
QuickSet
<static> QuickSet(child, alignTo, position, [offsetX], [offsetY])
Description:
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
.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
child | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
position | number | No | The position to align the Game Object with. This is an align constant, such as | |
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/QuickSet.js#L24
Since: 3.22.0
RightBottom
<static> RightBottom(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/RightBottom.js#L12
Since: 3.0.0
RightCenter
<static> RightCenter(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the right center position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/RightCenter.js#L12
Since: 3.0.0
RightTop
<static> RightTop(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the right top position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/RightTop.js#L12
Since: 3.0.0
TopCenter
<static> TopCenter(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the top center position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/TopCenter.js#L12
Since: 3.0.0
TopLeft
<static> TopLeft(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the top left position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/TopLeft.js#L12
Since: 3.0.0
TopRight
<static> TopRight(gameObject, alignTo, [offsetX], [offsetY])
Description:
Takes given Game Object and aligns it so that it is positioned next to the top right position of the other.
Tags:
- generic
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
gameObject | No | The Game Object that will be positioned. | ||
alignTo | No | The Game Object to base the alignment position on. | ||
offsetX | number | Yes | 0 | Optional horizontal offset from the position. |
offsetY | number | Yes | 0 | Optional vertical offset from the position. |
Returns: Phaser.GameObjects.GameObject - The Game Object that was aligned.
Source: src/display/align/to/TopRight.js#L12
Since: 3.0.0