v0.0.1

Planet

A WebGL planet seen from orbit, switchable between Mars, Jupiter and Earth: procedural Martian terrain and craters drift past; Jupiter’s cloud bands slide along alternating jets with the Great Red Spot and white ovals churning in the turbulence; Earth’s continents, oceans and shadow-casting clouds roll by, with sun glint on the sea and city lights across the night side. Single-scattering atmosphere lights up the limb with its complementary tint at grazing angles, and the sun follows the pointer along the horizon.

Show hero

Customize

Surface
#c1532b
Dark terrain
#4e1e12
Atmosphere
#f2a57c

Props

PropTypeDefaultDescription
childrenReactNode—Content layered above the background
planet'mars' | 'jupiter' | 'earth''mars'Which planet to render, 'mars', 'jupiter' or 'earth'; switches the surface shading and default palette
colorstring—Main surface color (hex); the light zones on Jupiter, vegetation on Earth. Defaults to the planet palette
terrainColorstring—Dark terrain color (hex); the dark belts on Jupiter, the oceans on Earth. Defaults to the planet palette
atmosphereColorstring—Atmosphere scattering color (hex); grazing views reveal its complement. Defaults to the planet palette
atmospherenumber—Atmosphere density, 0 disables it. Defaults to the planet preset
cratersnumber0.6Crater count and depth, 0 disables them; Mars only
cityLightsbooleantrueWhether city lights glow on the night side; Earth only
starsnumber0.6Star density, 0 disables them
horizonnumber0.62Distance from the top of the container to the horizon crest, as a fraction
speednumber1Animation speed multiplier
sunbooleanfalseWhether to render the sun
sunPosition{ x: number; y: number }—Fixed normalized position of the sun (0-1, origin top-left, x azimuth, y elevation); stops following the pointer
interactivebooleantrueWhether the sun follows the pointer
classNamestring—Extra class name

Dependencies

WebGL