Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Gradient Starfield

Public visualization

Viewing a saved revision (read-only)

65edc85686ac4748a6a2bd02933ec282

Gradient Starfield

1 star1🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Aug 2, 2025

This example shows a 3D starfield animation with 2,000 colorful stars moving through space and slowly rotating around the center. It runs on HTML5 Canvas and vanilla JavaScript, using `requestAnimationFrame` for smooth animation. Stars are generated with random positions, sizes, speeds, and colors, then rendered with perspective projection and recycled when they exit the viewport. The code uses trigonometric functions for rotation and a perspective factor for depth perception, with a translucent background to create subtle trails.

AI-generated description