Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Input
/
Pointer
Phaser 4.1.0
Phaser 4 examples
Pointer
12
examples
Examples
12
Drag to Draw Rectangle
Demonstrates how to dynamically draw a rectangle on the screen by using pointer events to track initial click coordinates and current drag position.
Drawing Sprites with Pointer Move
Demonstrates how to create and place sprites along the path of the pointer while it is held down and moving across the screen.
External Link
Demonstrates how to open an external URL in a new browser window or tab using a pointer event on an interactive game object.
Input Event List
Demonstrates how to receive an array of all interactive Game Objects under a pointer during an input event by disabling top-only selection.
Interactive Card Stack
Demonstrates how to handle click events on a stack of overlapping interactive images, where the top-most object in the display list captures the input event.
Multi Camera Cards
Demonstrates how interactive game objects function across multiple cameras with different viewports, zoom levels, and rotations.
Multiple Scene Pointer Events
Demonstrates how pointer events are handled across multiple active scenes simultaneously, showing that interactive objects in different scenes can each trigger their own independent input events.
Pointer Buttons
Learn how to detect specific mouse buttons (left, right, or both) and disable the browser context menu for custom input handling.
Pointer Buttons Debug
Detect left, right, and simultaneous mouse button presses using pointer events and the native button state.
Pointer Debug
Display real-time properties of the active pointer, including position, midpoint, velocity, and movement deltas.
Pointer Down Event
Handle global pointer down events to spawn sprites at the clicked location while tracking the active pointer's coordinates and duration.
Pointer Move Event
Learn how to use the 'pointermove' event to track the pointer's position and spawn images at its current coordinates.