An interactive 3D starfield animation built with HTML5 Canvas and vanilla JavaScript. Features a rotating perspective view with colorful stars moving through 3D space in a dark cosmic environment.
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 constants.js:
NUM_STARS: 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 rotatesBG_COLOR: Background color (dark space theme)index.html: Main HTML structureindex.js: Animation controllerrenderer.js: Canvas rendering logicstar.js: Star generation and propertiesconstants.js: Configuration parametersstyles.css: Basic styling for full-screen display