Skip to main content
Primordial provides three ways to save and share your simulation configurations, plus a built-in session recorder. All controls are in the World tab of the left panel. The Share Link button encodes your entire simulation configuration as base64 JSON and appends it to the current URL as a ?s= query parameter. When you click Share Link:
  1. All slider and checkbox values are captured via captureSettings().
  2. The settings object is serialized to JSON and encoded with btoa() (base64).
  3. The encoded string is appended to the page URL: ?s=<base64-encoded-settings>.
  4. The full URL is copied to your clipboard via navigator.clipboard.
  5. If clipboard access is denied (e.g. non-HTTPS context), the full URL is displayed in the UI instead so you can copy it manually.
When someone opens a Share Link, the simulation automatically decodes the ?s= parameter on load and applies the settings before the world initializes.
Share Link URLs encode the full settings object as base64 JSON. With all 23 sliders and 10 checkboxes included, these URLs can be quite long. Some platforms truncate long URLs. For reliable sharing of named configurations, use Export instead.

Export & Import .primordial Files

Use Export when you want to save a named configuration locally — it produces a human-readable JSON file you can organize, version, and share as an attachment.

Exporting Settings

The Export button downloads a .primordial file containing all current slider and checkbox values. Filename format: primordial-[preset]-[date].primordial For example: primordial-armsrace-2024-11-15.primordial If the preset is set to Custom, the filename uses custom as the preset segment.

File Format

The file is plain JSON with a .primordial extension. Version 3 format:

Slider IDs included in export

Checkbox IDs included in export

Importing Settings

The Import button opens a file picker that accepts .primordial and .json files. When a file is selected:
  1. The file is read as text and parsed as JSON.
  2. The importer checks that _format === 'primordial-settings'. Files that fail this check are rejected with an error message.
  3. If valid, all slider and checkbox values are applied and the world resets automatically.
  4. A confirmation message shows the version and preset name of the loaded file.

Session Recording

Session recording uses the MediaRecorder API. Chrome and Firefox have full support. Safari has limited MediaRecorder support and may not be able to record — Chrome or Firefox is recommended for reliable recording.
The Record button (in the World tab) captures the simulation canvas as a video file.

How it works

  • The canvas is captured at 30 fps using canvas.captureStream(30).
  • If sound is enabled, audio is captured via a MediaStreamDestination on the Web Audio graph and merged into the stream.
  • The video is encoded using the best available codec in priority order: VP9+Opus, VP8+Opus, VP9, VP8, or plain WebM.
  • Video bitrate is set to 5 Mbps.
  • The output file is a .webm container.

Output filename

Filenames use an ISO timestamp with colons and T replaced by dashes:
The download is triggered automatically when recording stops.

Recording states

Clicking Record while already recording stops the recording and triggers the download immediately.