Remix Library / Art & Animation

Warp Speed

Fly through a 3D starfield. Move the mouse to steer, hold to go to lightspeed.

Intermediate HTML · CSS · JavaScript
No account needed: you’ll start as a guest.
read-only · remix to edit
Preview

What you'll learn

  • 3D perspective projection
  • Animation loops
  • Mouse position
  • Easing
  • Drawing lines

Challenges

Remix it, then try these. Each one is a bit harder than the last.

  1. Change the number of stars and their color.
  2. Make some stars bigger and brighter than others.
  3. Show your current speed on screen, like a spaceship dashboard.
  4. Add planets that fly past once in a while.
  5. Make pressing the arrow keys steer instead of the mouse.