-
Notifications
You must be signed in to change notification settings - Fork 0
Particles
spad4 edited this page Jun 17, 2026
·
8 revisions
A particle is a single instance of a string, line, circle, or triangle.
{
"name": string, REQUIRED
"duration": number, in seconds | REQUIRED
"dx": number or chunk, in pixels | default 0
"dy": number or chunk, in pixels | default 0
"color": color or chunk| default '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 'COLOR_TRUE_WHITE'
}{
"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
}{
"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": "'COLOR_GREEN'",
"config": {
"text": "'TEXT'",
"shadow": "'COLOR_DARK_GREEN'",
"alpha": "1 - self.age / self.duration"
}
}{
"name": "circle",
"duration": 1,
"type": "circle",
"color": "'COLOR_GREEN'",
"config": {
"radius": 10,
"outline": 5
}
}{
"name": "triangle",
"duration": 1,
"type": "triangle",
"color": "'COLOR_GREEN'",
"config": {
"size": 10,
"rotation": "self.age",
"outline": true
}
}{
"name": "line",
"duration": 1,
"type": "line",
"color": "'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 'COLOR_RED' or self.age > 0.1 and 'COLOR_ORANGE' or '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 'COLOR_DARK_GRAY' or '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": "'COLOR_DARK_BLUE'",
"dx": "-100 + self.age * 50",
"dy": "-400 + self.age * 300",
"config": {
"length": "self.random_1 * 24 + 12",
"rotation": "0.4"
}
}