Volcano

Animated volcanic eruption with lava, ash plume, and particle effects.

Installation

First, make sure you have the base map component installed:

npx shadcn@latest add https://www.terrae.dev/map.json

Then install the volcano component:

npx shadcn@latest add https://www.terrae.dev/volcano.json

Intensity

Control the eruption intensity with the intensity prop. Higher values create larger lava bursts with more particles. Combine with size to create volcanoes of different scales.

Custom Colors

Customize the lava and ash colors with lavaColor and ashColor. Create blue volcanic eruptions, green toxic blasts, or any color combination.

Eruption Phases

Control the eruption state with the phase prop. The volcano supports three phases: dormant (inactive cone with dim glow), rumbling (shaking cone with pulsing glow and reduced particles), and erupting (full eruption). Use the useVolcanoControl hook to switch phases dynamically.

Lava Spread

Enable spread to simulate lava spreading outward from the volcano base. Control the spread behavior with spreadSpeed (time between new lava sources), spreadRadius (how far lava spreads), and maxSpreadPoints (maximum number of lava pools). Spread only activates during the erupting phase.

Properties

PropertyTypeDefaultDescription
idstringrequiredUnique identifier for the volcano effect
coordinates[number, number]requiredVolcano location as [longitude, latitude]
sizenumber200Volcano size in pixels
intensitynumber0.4Eruption intensity (0.1 to 1)
particleCountnumber100Number of eruption particles
lavaColorstring#FF4500Lava and ember particle color
ashColorstring#555555Ash cloud particle color
phase"dormant" | "rumbling" | "erupting"eruptingEruption phase controlling visual behavior
spreadbooleanfalseEnable lava spreading from volcano base
spreadSpeednumber2000Time in ms between new lava spread sources
spreadRadiusnumber0.3Spread radius as fraction of size (0-1)
maxSpreadPointsnumber6Maximum number of lava spread sources
autoStartbooleantrueStart eruption on mount

Use Cases

Geological Visualization

Display active volcanoes on geological survey maps

Disaster Monitoring

Visualize eruption risk levels on emergency response dashboards