This library is not production-ready yet. Developers should use it with caution and expect breaking changes.

Cyclone

Animated cyclone funnel with swirling particles and debris.

Installation

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

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

Then install the cyclone component:

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

Intensity Levels

Control the cyclone strength with the intensity prop. Lower values create weaker cyclones with slower rotation, while higher values produce violent storms with faster swirling and wider spread.

Programmatic Control

Use the useCycloneControl hook to start, stop, or dynamically change the cyclone intensity. The cyclone smoothly transitions between intensity levels.

Movement

Make the cyclone travel along a path using the path prop. Control the travel time with duration and enable continuous movement with loop.

Growing Storm

Use the setScale method to dynamically change the cyclone size. This example shows a hurricane forming over the ocean and growing larger as it approaches the Florida coast, simulating real storm intensification.

Rotation Speed

Use the setRotationSpeed method to dynamically change how fast the cyclone spins.

Properties

PropertyTypeDefaultDescription
idstringrequiredUnique identifier for the cyclone
coordinates[number, number]requiredCyclone location as [longitude, latitude]
path[number, number][]-Array of coordinates for cyclone movement
durationnumber10000Time in milliseconds to traverse the path
loopbooleanfalseRepeat path movement continuously
sizenumber200Cyclone size in pixels
intensitynumber1Cyclone strength (0-2)
scalenumber1Cyclone scale multiplier (0.2-2)
particleCountnumber120Number of particles
funnelColorstring#8b9dc3Funnel cloud color
debrisColorstring#5c4033Debris and dust color
rotationSpeednumber1Rotation speed multiplier
autoStartbooleantrueStart animation on mount

Use Cases

Weather Maps

Visualize cyclone warnings and storm tracking

Emergency Services

Display active severe weather on emergency maps