addToWorld(x, y, anchorX, anchorY, scaleX, scaleY) → {Phaser.Image}
Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.
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. |
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. |
scaleX | number | <optional> | 1 | The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |
scaleY | number | <optional> | 1 | The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |
Returns
The newly added Image object.
- Source code: gameobjects/Video.js (Line 833)
Please login to continue.