InputHandler#checkPixel()

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)
doc_phaser
2017-02-14 10:53:13
Comments
Leave a Comment

Please login to continue.