addToWorld(x, y, width, height, anchorX, anchorY) → {Phaser.Image}
Creates a new Phaser.Image object using a blank texture and assigns
this Filter to it. The image is then added to the world.
If you don't provide width and height values then Filter.width and Filter.height are used.
If you do provide width and height values then this filter will be resized to match those
values.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x | number | <optional> | 0 | The x coordinate to place the Image at. |
y | number | <optional> | 0 | The y coordinate to place the Image at. |
width | number | <optional> | The width of the Image. If not specified (or null) it will use Filter.width. If specified Filter.width will be set to this value. | |
height | number | <optional> | The height of the Image. If not specified (or null) it will use Filter.height. If specified Filter.height will be set to this value. | |
anchorX | number | <optional> | 0 | Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
anchorY | number | <optional> | 0 | Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
Returns
The newly added Image object.
- Source code: core/Filter.js (Line 149)
Please login to continue.