-
Notifications
You must be signed in to change notification settings - Fork 0
Particles
spad4 edited this page Jun 18, 2026
·
8 revisions
A particle is a single instance of a string, line, circle, triangle, or rectangle.
Add new particles in data/dandelion/particles.json
{
"name": string, REQUIRED
"duration": number or chunk, in seconds | default 1
"dx": number or chunk, in pixels | default 0
"dy": number or chunk, in pixels | default 0
"color": color or chunk | default gfx.COLOR_TRUE_WHITE
"type": text|triangle|circle|line, REQUIRED
"config": {
...
}
}{
"text": string or chunk | default '.'
"alpha": number or chunk, range 0-1 | default 1
"shadow": color or chunk | default nil
"rotation": number or chunk, in radians | default 0
"scale": number or chunk | default 1
}{
"size": number or chunk, in pixels | default 1
"rotation": number or chunk, in radians | default 0
"outline": boolean | default false
}{
"radius": number or chunk, in pixels | default 1
"outline": number or chunk, in pixels | default nil
}{
"width": number or chunk, in pixels | default 16
"height": number or chunk, in pixels | default 16
"outline": number or chunk, in pixels | default nil
"rotation": number or chunk, in radians | default 0
}{
"length": number or chunk, in pixels | default 16
"thickness": number or chunk, in pixels | default 1
"rotation": number or chunk, in radians | default 0
"centered": boolean | default false
}{
"name": "text",
"duration": 1,
"type": "text",
"color": "gfx.COLOR_GREEN",
"config": {
"text": "'TEXT'",
"shadow": "gfx.COLOR_DARK_GREEN",
"alpha": "1 - self.age / self.duration"
}
}{
"name": "circle",
"duration": 1,
"type": "circle",
"color": "gfx.COLOR_GREEN",
"config": {
"radius": 10,
"outline": 5
}
}{
"name": "triangle",
"duration": 1,
"type": "triangle",
"color": "gfx.COLOR_GREEN",
"config": {
"size": 10,
"rotation": "self.age",
"outline": true
}
}{
"name": "line",
"duration": 1,
"type": "line",
"color": "gfx.COLOR_GREEN",
"config": {
"thickness": 2,
"length": "64 * (1 - self.age / self.duration)",
"centered": true,
"rotation": "self.age"
}
}
{
"name": "flame",
"duration": 0.6,
"color": "self.age > 0.25 and gfx.COLOR_RED or self.age > 0.1 and gfx.COLOR_ORANGE or gfx.COLOR_YELLOW",
"dx": "self.age * -1 * (self.random_1 * 4 + 2)",
"dy": "self.age * -10",
"type": "triangle",
"config": {
"size": "(self.random_2 * 2 + 3) * (1 - self.age / self.duration + 0.5)",
"rotation": "self.age * 4 - (self.random_1 * 4)"
}
}{
"name": "small_smoke",
"duration": 1.5,
"color": "self.random_1 > 0.5 and gfx.COLOR_DARK_GRAY or gfx.COLOR_BLACK",
"dx": "self.age * -1 * (self.random_1 * 4 + 2)",
"dy": "self.age * -10",
"type": "circle",
"config": {
"radius": "(self.random_1 + 2) * (1 - self.age / self.duration)"
}
}{
"name": "rain",
"duration": 4,
"type": "line",
"color": "gfx.COLOR_DARK_BLUE",
"dx": "-100 + self.age * 50",
"dy": "-400 + self.age * 300",
"config": {
"length": "self.random_1 * 24 + 12",
"rotation": "0.4"
}
}