Skip to content

Repository files navigation

Protoverse Lab

Created by Matthew Bateman.

Protoverse Lab is a seeded universe-evolution sandbox built with React, TypeScript, and Three.js. It lets you generate small “possible universe” runs, tune the starting conditions, watch matter cluster and enrich, and save interesting seeds for later.

Like this project? You can support ongoing development on Ko-fi, helping me maintain existing tools and release more public projects.

This is not meant to be a literal physics engine. The simulation uses coarse packets that stand in for matter, radiation, proto-particles, enriched material, and habitability potential. The goal is to make the chain from early packets to stars, enrichment, rocky worlds, and life-capable regions understandable and interactive.

The default run starts with 8,000 packets so movement and camera controls stay smooth. Higher counts are available up to 60,000 packets for stronger machines.

How it works

  1. A seed and parameter set initialize repeatable particle species, positions, velocities, temperatures, and material traits.
  2. The TypeScript simulation advances expansion, gravity, cooling, clustering, stellar formation, supernova enrichment, and coarse planetary potential.
  3. Each tick derives metrics and events from the simulated state while React keeps controls and saved seed data synchronized.
  4. React Three Fiber and Three.js render sampled particles and highlights in the browser with no server-side simulation.

There is no AI backend, model inference, training data, or generative-AI service. The simulation is deterministic TypeScript math running locally in the browser.

What It Does

  • Generates deterministic universes from a seed and parameter set
  • Lets you tune density, expansion, cooling, gravity, particle balance, enrichment, planets, and life probability
  • Tracks coarse proto-particle species and isotope-like variants
  • Evolves enriched matter into periodic-table-inspired element families
  • Shows metrics for stars, supernovae, rocky worlds, habitability, enrichment, density, heat, dominant species, and dominant element family
  • Renders the universe with WebGL shader particles, glow layers, adaptive sampling, and star/enrichment highlights
  • Saves seeds locally, with editable titles and descriptions
  • Imports and exports seed libraries as JSON, with a 1.5 MB import limit to keep the browser responsive

Stack

  • Vite
  • TypeScript
  • React
  • Three.js
  • React Three Fiber
  • lucide-react
  • Vitest
  • Playwright smoke checks

Run It Locally

npm install
npm run dev

Vite usually opens at http://127.0.0.1:5173. If that port is busy, it will print the next available local URL.

Live Site

GitHub Pages serves the public build here:

https://matt-bat.github.io/protoverse-lab/

Test And Build

npm run check

That runs TypeScript checks, the simulation regression tests, and a production build.

With the dev server running, you can also run the browser smoke check:

npm run smoke:browser

Scientific Framing

Protoverse Lab is intentionally conceptual. A run roughly follows this path:

primordial packets
-> cooling and clustering
-> stellar populations
-> supernova enrichment
-> rocky world candidates
-> habitability potential

Particle species are not literal Standard Model particles. They are coarse simulation packets with different interaction rules. Element families are also simplified; they mirror periodic-table behavior categories so enriched regions can become more chemistry-friendly over time without simulating atoms one by one.

Project Notes

Credit

Designed and created by Matthew Bateman.

About

This Three-JS app simulates a 'big bang' event and distributes proto-particles into a virtual 3D space. You can change seeds, parameters, simulation speed, and more. There are various metrics displayed as the simulation progresses, and you can save interesting seeds!

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages