Interactive Sprite Movement Example

Tap or Drag to Move the Ball

Your browser doesn't support the canvas element.

Learn to Make Sprites Move Interactively for Mobile and Desktops

This example demonstrates
moving a ball shaped sprite.
The ball moves with taps on mobile devices.
The ball moves with mouse over motion on PCs.
The output shows X and Y coordinates as
the ball moves on the canvas.
See more examples below.