BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/terrae/fire

Map Fire

terrae/fire
FreeComponent

Realistic animated fire effect with particle simulation.

Install it

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

Source

src/registry/map/fire.tsxwww.terrae.dev/fire.json · first 6 KB
1"use client"
2
3import { useEffect, useRef, useState, useCallback } from "react"
4import { useMap } from "./hooks"
5import type { MapCoordinates } from "./types"
6
7type FireParticle = {
8 x: number
9 y: number
10 velocityX: number
11 velocityY: number
12 radius: number
13 life: number
14 maxLife: number
15}
16
17type FireSource = {
18 x: number
19 y: number
20 particles: FireParticle[]
21 spawnTime: number
22 intensity: number
23}
24
25type MapFireProps = {
26 id: string
27 coordinates: MapCoordinates
28 size?: number
29 intensity?: number
30 particleCount?: number
31 baseColor?: string
32 tipColor?: string
33 spread?: boolean
34 spreadSpeed?: number
35 spreadRadius?: number
36 maxSpreadPoints?: number
37 autoStart?: boolean
38}
39
40type FireRenderer = {
41 width: number
42 height: number
43 data: Uint8ClampedArray
44 context?: CanvasRenderingContext2D
45 sources: FireSource[]
46 isActive: boolean
47 startTime: number
48 currentIntensity: number
49 onAdd: () => void
50 render: () => boolean
51 start: () => void
52 stop: () => void
53 addSource: (x: number, y: number) => void
54 setIntensity: (intensity: number) => void
55}
56
57type FireControl = {
58 start: () => void
59 stop: () => void
60 setIntensity: (intensity: number) => void
61 isActive: boolean
62 spreadProgress: number
63}
64
65type RgbColor = {
66 r: number
67 g: number
68 b: number
69}
70
71const DEFAULT_SIZE = 120
72const DEFAULT_INTENSITY = 1
73const DEFAULT_PARTICLE_COUNT = 50
74const DEFAULT_BASE_COLOR = "#ffcc00"
75const DEFAULT_TIP_COLOR = "#ff3300"
76const DEFAULT_SPREAD_SPEED = 2000
77const DEFAULT_SPREAD_RADIUS = 0.4
78const DEFAULT_MAX_SPREAD_POINTS = 8
79
80const INITIAL_Y_POSITION = 0.85
81const SPREAD_SCALE = 1.5
82const MIN_PARTICLES_PER_SOURCE = 15
83const VELOCITY_DECAY = 0.98
84const FLICKER_BASE = 0.9
85const FLICKER_RANGE = 0.2
86const COLOR_GRADIENT_INNER = 0.3
87const ALPHA_MULTIPLIER = 0.8
88const INTENSITY_VARIATION_BASE = 0.7
89const INTENSITY_VARIATION_RANGE = 0.3
90const MIN_INTENSITY = 0.1
91const MAX_INTENSITY = 3
92const CANVAS_PADDING = 0.1
93const VERTICAL_VARIATION = 0.1
94const GLOW_SIZE_SPREAD = 0.08
95const GLOW_SIZE_NORMAL = 0.15
96const GLOW_OPACITY = 0.25
97const PARTICLE_SPREAD_X = 20
98const BASE_VELOCITY_Y = -1.5
99const VELOCITY_X_RANGE = 0.8
100const VELOCITY_Y_RANGE = -1
101const PARTICLE_Y_OFFSET = 10
102const BASE_RADIUS = 4
103const RADIUS_RANGE = 8
104const BASE_LIFE = 40
105const LIFE_RANGE = 40
106const LIFE_RADIUS_DECAY = 0.5
107const COLOR_FACTOR_MULTIPLIER = 1.5
108const PIXEL_RATIO = 2
109const CONTROL_UPDATE_INTERVAL = 100
110
111const fireControls = new Map<string, FireControl>()
112
113// … truncated

What it pulls in

npm packages

  • mapbox-gl

Other registry items

  • https://www.terrae.dev/map.json

Files it writes

  • src/registry/map/fire.tsx

Facts

Registry
terrae
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

www.terrae.dev alamenai/terrae on GitHub Raw registry item This item as JSON

More from terrae

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Map Animated Circleanimated-circleterraeComponentsFree1 dep
Map Animated Footprintanimated-footprintterraeComponentsFree2 deps
Map Animated Polygonanimated-polygonterraeComponentsFree1 dep
Map Animated Pulseanimated-pulseterraeComponentsFree1 dep
Map Arc Animatedarc-animatedterraeComponentsFree1 dep
Map Blur Areablur-areaterraeComponentsFree1 dep
Map Camera Followcamera-followterraeComponentsFree1 dep
Map ChoroplethchoroplethterraeComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex