Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Input
/
Pixel Perfect
Phaser 4.1.0
Phaser 4 examples
Pixel Perfect
7
examples
Examples
7
Pixel Perfect Alpha Input
Demonstrates how to enable pixel-perfect hit detection on an interactive sprite, ensuring pointer events only trigger on non-transparent areas of the image texture.
Pixel Perfect Atlas Frame
Demonstrates how to use pixel-perfect input detection on a Sprite that uses a frame from a texture atlas.
Pixel Perfect Dragging
Demonstrates how to enable dragging on sprites using pixel-perfect input detection and custom alpha tolerance levels.
Pixel Perfect Input with Atlas Frames
Demonstrates how to enable pixel-perfect input detection on a sprite using a trimmed frame from a texture atlas.
Pixel Perfect Input with Transformations
Demonstrates pixel-perfect input detection on sprites that have been scaled and rotated, including how to set a custom alpha threshold for hit detection.
Pixel Perfect Pointer Down
This example demonstrates how to use pixel-perfect hit areas for input detection, allowing clicks only on non-transparent pixels and setting custom alpha thresholds.
Pixel Perfect Pointer Move
Demonstrates how to use pixel-perfect input detection to trigger pointermove events only when the cursor is over non-transparent pixels, including how to set custom alpha thresholds.