Interactive Real-Time 3D WebGL Visualization of the Laniakea Supercluster & Cosmic Velocity Flows
Based on cosmological research by Tully et al. (Nature 2014) and Hoffman et al. (Nature Astronomy 2017).
👉 Launch CosmoFlow in Fullscreen 3D (https://epic-hubble.vercel.app)
360° orbital overview of the Laniakea Supercluster showing cosmic velocity streamlines converging into The Great Attractor from the Dipole Repeller void.
In 2014, an international astrophysics team led by R. Brent Tully mapped over 8,000 peculiar galaxy velocities across our local cosmic volume, defining the Laniakea Supercluster ("immense heaven" in Hawaiian). Spanning over 520 million light-years and enclosing
CosmoFlow computes peculiar velocity
where the potential field
Streamlines are numerically integrated forward along the 3D velocity gradient using adaptive RK4 steps:
The Great Attractor (located in the direction of the Norma Cluster at
Discovered by Hoffman et al. (Nature Astronomy 2017), the Dipole Repeller (
Rising vertically above the supergalactic plane, the Coma Cluster (
Our home galaxy, the Milky Way, sits on the outskirts of the Virgo Supercluster (
A custom GLSL fragment shader evaluates the 3D potential
-
8-Stop Scientific Colormap: Deep purple/navy void
$\rightarrow$ vibrant cyan$\rightarrow$ emerald green$\rightarrow$ warm gold$\rightarrow$ crimson core. -
Interactive Depth (
$Y$ -Slider): Cut through any horizontal cross-section of the potential field. - Contour Grids: Subtle isopotential lines indicating gradient steepness.
- Cluster Spheres: Specular-shaded 3D ellipsoids marking major galaxy cluster concentrations (Hydra, Antlia, Centaurus, Virgo, and foreground groups).
- 18,000+ Galaxy Swarm: Particle system populated with power-law virial density profiles, clumping naturally around cluster nodes and cosmic filaments.
High-DPI billboard labels rendered in 3D world space with camera orientation tracking, distance-based scaling, and hairline leader lines:
- Core Hub & Superclusters: The Great Attractor, Centaurus, Virgo, Milky Way, Coma
- Galaxy Groups & Clusters: Hydra, Antlia, NGC 5016 Cluster
- Abell Concentrations: Abell 3574, Abell 3565, Abell 50753
- Flow Indicator: Bulk flow toward Antlia-Centaurus
Built-in client-side recording studio powered by gifenc:
- Seamless 360° Turntable Loop: Renders an exact orbital revolution where frame 0 matches the final frame for glitch-free loop playback.
- Dual Export: Generates both lightweight animated
.GIFand high-bitrate.WEBMvideo. - Live Progress & Modal: Real-time encoding progress track with in-browser preview and 1-click downloads.
Integrated Motion One spring-physics animation suite delivering broadcast-quality polish:
-
Epic Flythrough Intro (5.2s): Full-black title card with staggered letter reveals, zooming seamlessly from the deep Great Attractor core (
$X \approx -38, Y \approx 2, Z \approx -5$ ) out to the Tully et al. (Nature 2014) reference overview. - Staggered HUD & Stat Counters: Glassmorphic headers and bottom bars slide in with damped spring physics while cosmological counters (streamline count, galaxy density, velocity cones) smoothly tick up in real time.
- 12 Billboard Label Spring Entrances: Progressively pop in with 60ms staggered delay across the 3D supercluster volume.
-
Continuous Living Oscillations:
- Great Attractor Pulse: Dedicated slow, rhythmic expansion breathing glow at the convergence hub.
- Cluster Sphere Breathing: Gentle asynchronous scale oscillation across all 20+ cluster nodes.
- Galaxy Swarm Shimmer: Vertex-level size and brightness twinkle using GPU hash noise.
- Heatmap Slice Wave: Radial glow wave propagating outward from the Great Attractor across the supergalactic plane.
- Streamline Dash Flow: Moving line dashes simulating continuous particle flow along velocity gradients.
- Spring Physics Micro-Interactions: Bouncy haptic feedback on preset buttons, floating recording dock, and preview modal blur transitions.
cosmo-flow/
├── src/
│ ├── camera/
│ │ └── CameraController.js # Auto-orbit, smart resume & cinematic tours
│ ├── motion/
│ │ └── MotionEngine.js # Motion One spring orchestrator & intro director
│ ├── physics/
│ │ └── CosmicField.js # Potential field math & RK4 numerical tracer
│ ├── recorder/
│ │ └── GifRecorder.js # Deterministic 360° GIF & WebM capture engine
│ ├── renderers/
│ │ ├── ClusterEllipsoids.js # 3D shaded cluster spheres
│ │ ├── CosmicLabels.js # 12 camera-facing 3D billboard labels
│ │ ├── CosmicSkybox.js # Distant starry cosmos & reference axes
│ │ ├── GalaxyClusters.js # Cluster node meshes with breathing physics
│ │ ├── GalaxySwarm.js # 18,000+ filamentary galaxy particles with shimmer
│ │ ├── SlicePlaneMesh.js # GPU GLSL potential colormap shader with wave pulse
│ │ └── StreamlineRenderer.js # Cosmic streamlines, cones & flowing dashes
│ ├── ui/
│ │ ├── ControlPanel.js # lil-gui astrophysical parameter studio
│ │ ├── RecorderModal.js # GIF/WebM preview & download spring dialog
│ │ └── RecordingDock.js # Floating HUD recording studio dock
│ ├── main.js # Three.js scene loop, postprocessing & motion loop
│ └── style.css # Glassmorphic observatory HUD & motion design styling
├── docs/
│ └── assets/ # 8 Section GIFs + Hero Banner
├── index.html # Viewport container & scientific HUD
└── package.json
- Node.js 18+
- npm or pnpm
# Clone the repository
git clone https://github.com/zrt219/cosmo-flow.git
cd cosmo-flow
# Install dependencies
npm install
# Start local development server
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm run preview- Tully, R. B., Courtois, H., Hoffman, Y., & Pomarède, D. (2014).
The Laniakea supercluster of galaxies. Nature, 513(7516), 71-73. doi:10.1038/nature13674 - Hoffman, Y., Courtois, H. M., Tully, R. B., & Pomarède, D. (2017).
The Dipole Repeller. Nature Astronomy, 1(2), 0036. doi:10.1038/s41550-016-0036 - Pomarède, D., et al. (2017).
Cosmicflows-3: The Dipole Repeller and the Cold Spot Repeller. The Astrophysical Journal, 880(2), 154.
This project is open-source under the MIT License.








