mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Pointer has two new properties worldX
and worldY
which contain the position of the Pointer, translated into the coordinate space of the most recent Camera it interacted with.
This commit is contained in:
parent
15af7c6d0c
commit
285b811625
1 changed files with 21 additions and 1 deletions
|
@ -56,7 +56,7 @@ var Pointer = new Class({
|
|||
* [description]
|
||||
*
|
||||
* @name Phaser.Input.Pointer#event
|
||||
* @type {null}
|
||||
* @type {any}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.event;
|
||||
|
@ -97,6 +97,26 @@ var Pointer = new Class({
|
|||
*/
|
||||
this.position = new Vector2();
|
||||
|
||||
/**
|
||||
* The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
|
||||
*
|
||||
* @name Phaser.Input.Pointer#worldX
|
||||
* @type {number}
|
||||
* @default 0
|
||||
* @since 3.10.0
|
||||
*/
|
||||
this.worldX = 0;
|
||||
|
||||
/**
|
||||
* The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
|
||||
*
|
||||
* @name Phaser.Input.Pointer#worldY
|
||||
* @type {number}
|
||||
* @default 0
|
||||
* @since 3.10.0
|
||||
*/
|
||||
this.worldY = 0;
|
||||
|
||||
/**
|
||||
* X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue