checkPixel(x, y, pointer) → {boolean}
Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.
It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
x | number | The x coordinate to check. | |
y | number | The y coordinate to check. | |
pointer | Phaser.Pointer | <optional> | The pointer to get the x/y coordinate from if not passed as the first two parameters. |
Returns
boolean -
true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha
- Source code: input/InputHandler.js (Line 799)
Please login to continue.