Overview
Lunar Basin is a full-screen 3D environment that runs in the browser with three.js. A flawless glass sphere rests on pale grey lunar ground under a black sky, a blue planet rises over the crater rim behind it, and the ball holds a small inverted copy of the planet. The glass is solved per pixel with reflection and refraction, and a bright caustic falls on the ground beside its long shadow. In a calm 12 second loop the planet clouds drift, the caustic rays sway and the camera glides in toward the sphere and back. Everything is procedural, about 506,000 triangles (mostly the ground), and the whole source is about 50 KB. What you can do with it: - Use it as a quiet, otherworldly background for a hero, a tech or science launch, a space brand or a product reveal. - Change the mood: sun angle and colour, cloud drift, ground colour and caustic are named values in a few files. - Drop your own content on top: the canvas is fixed behind the page. How it behaves: - A seamless 12 second loop: every motion repeats exactly, so recordings loop without a seam. - The camera makes a slow dolly in and back on the loop, and leans towards the mouse on desktop. - Respects the Reduce motion system setting. - Adapts to the device: quality tiers with a pixel budget, stepping down when frames run slow. - A ?hud readout to measure frame rate on any device, and ?t to freeze any moment for stills. Included: the source (static HTML and JavaScript modules, no build step), a buyer guide, credits, and AGENTS.md plus CLAUDE.md so AI coding agents such as Claude Code or Codex can customise or port it. three.js 0.186.1 loads from a CDN under its MIT license.
Highlights
- Glass sphere refracting a rising planet
- Fully procedural: no textures or models
- Seamless 12 second loop, no build step
- Adaptive quality, mouse response and reduced motion


