# Orbit Lab: Gravity on a Glass Plate

- Author: @bluumik
- Card: Creator prompt
- Theme: Simulations
- Stack: Not rebuilt
- Interaction: Pointer
- Licence: Credited link (Shared publicly by the author; full text with credit, removed on request)
- Verified: not yet
- Original post: https://x.com/bluumik/status/2114776515669791182

## Original prompt

```text
PROMT- Build a single-file interactive 3D web experience called "Orbit Lab." using Three.js (WebGL), all procedural, zero external assets. A glowing star sits at the center of a round glass plate in space, and the user launches planets with a slingshot gesture so they fall into orbit.

LOOK AND FEEL
- Near-black starfield background with a soft colored glow around the plate that matches the star color.
- Serif title "Orbit Lab." top left with a small italic hint under it: "Drag back and release to launch a planet. Hold to make it bigger."
- A large round glass plate with a thick glossy white rim, seen from a three-quarter top view, lit by the star's glow.
- Small refined UI. Calm, premium, like a limited edition desk toy.

THE STAR
- A flat glowing disc or soft sphere at the center with a bright corona, gentle pulsing and light rays across the plate.
- Star colors: yellow, red, blue, white and purple. Switching one smoothly recolors the star, the plate glow and the room tint.

THE PLANETS
- Small glossy spheres with procedural surface variation: banded gas giants, speckled rocky planets, ringed planets with thin translucent rings, half-lit planets with day and night shading.
- Pastel to jewel tones that complement the current star color.
- Each planet leaves a thin glowing orbit trail that fades over time.

PHYSICS
- Simple N-body gravity from the star (and weak mutual attraction between planets): planets follow elliptical, circular or escape trajectories depending on launch speed and angle.
- Launch gesture: click and drag backward from the star, a thin aim line and arc preview appear, release to launch. Longer hold before release makes a larger planet with more mass.
- Planets can collide and merge, with a small flash and a bigger combined planet, or get thrown out of the system.
- Planets that fly far off the plate fade out and are removed.
- Tiny dust sparkles drift along the orbits.

CONTROLS
- A yellow pill button "New system" that clears all planets, picks a new star color and plays a short bloom animation (also Space bar).
- Star color swatches along the bottom left.
- Top right buttons: "Room view" (wider camera) and "Settings".
- Settings panel: gravity strength slider, trail length slider, show trails toggle, auto-rotate toggle, sound on or off.
- Keyboard: Space for a new system, C to clear planets, 1 to 5 to switch star colors.

SOUND AND POLISH
- Soft whooshes on launch, gentle chimes on merges and a low ambient hum synthesized with WebAudio (no files), pitch tied to planet size and speed.
- 60 fps, adaptive pixel ratio, filmic tone mapping, strong bloom on the star, soft contact shadows on the plate.
- Smooth camera orbit with inertia and an optional gentle auto-rotate.
- Works on desktop and mobile touch. Clean, commented code in one HTML file with constants grouped at the top.
```

Not rebuilt by 3dmotion yet. Credit stays with @bluumik.

Prompt by @bluumik (https://x.com/bluumik/status/2114776515669791182) via 3dmotion.io/e/orbit-lab-gravity-on-a-glass-plate
