An interactive 3D starfield animation built with HTML5 Canvas and vanilla JavaScript. Features a rotating perspective view with colorful stars moving through 3D space.
requestAnimationFrame
for optimal performanceSimply open index.html
in a web browser. The animation starts automatically and fills the entire viewport.
You can adjust various parameters in script.js
:
numStars
: Number of stars (default: 2000)MIN_STAR_SIZE
/ MAX_STAR_SIZE
: Star size rangeMIN_SPEED
/ MAX_SPEED
: Star movement speed rangePERSPECTIVE_FACTOR
: Controls depth effect intensityROTATION_SPEED
: How fast the starfield rotatesindex.html
: Main HTML structurescript.js
: Animation logic and 3D calculationsstyles.css
: Basic styling for full-screen display