Create a single HTML file with an importmap for three@0.160.0. Generate spiral galaxy particles: 60,000 of them, spiral arms, bright core, additive blending, custom shader or PointsMaterial with vertex colors. Procedural circular sprite via canvas texture? "No external assets or textures (generate everything procedurally)" — canvas textures are procedurally generated so that's fine, but I could also use a custom shader with gl_PointSize and a soft circular falloff. Use ShaderMaterial for prettier colors and size falloff. Slow rotation: rotate points in the shader based on radius (differential rotation) or rotate the entire object. Gentle depth: slight z spread. Camera slowly orbits. Background gradient: CSS gradient behind the transparent canvas, or fog. Use fog carefully with additive blending — fog affects colors; simpler: renderer with alpha, CSS radial gradient background.
Let's write the shader:
Vertex: attributes position, aColor (custom), aSize, aRadius, etc. Differential rotation: angle = atan(position.z, position.x) + time * speed(radius). Compute the new xz. gl_PointSize = size * (300/-mvPosition.z). Fragment: radial soft falloff, color *= glow, discard or alpha. Additive blending: THREE.AdditiveBlending, depthWrite false.
Galaxy generation: branches ~4 arms, radius is random with pow distribution, spin formula, randomness scales with radius. Core: extra central bulge particles. Color: inner warm white/yellow, outer blue/purple/pink.
Animation: uniform uTime; per-particle rotation speed = base / (sqrt(r)+eps). Camera orbits slowly, slight vertical bob.
Fog: with additive blending, fog would darken distant particles toward black — actually, in additive, fog color is added... blending is additive; fog mixes toward fog color, so if fog color is black, distant particles fade — that gives gentle depth. Could include fog via material fog... ShaderMaterial doesn't have fog by default. Just compute a depth fade in the shader: fade = clamp based on distance. Or just rely on size attenuation. Keep it simple: subtle depth fade in fragment via vDistance.
Write the file.