Particle
The particle interface
Functions
spray
Particle.spray(x: number,--
horizontal coordinate
y: number,--
vertical coordinate
options: table--
settings
) → ()Sprays particles at a position into a direction
Options
| Name | Type | Default | Description |
|---|---|---|---|
| amount | number | 0 | amount to spawn |
| color | table | white | start color |
| color_fade | table | - | end color |
| alpha | number | 1 | start transparency |
| alpha_fade | number | - | end transparency |
| speed | number | 8 | speed of movement |
| speed_dist | number | 0 | variance in speed |
| ttl | number | 1 | time to live |
| ttl_dist | number | 0 | variance in time to live |
| collision | bool | true | world collision |
| overwrite | bool | false | special render setting |
| overlay | bool | false | foreground particles |
| angle | number | 0 | spray angle in [0, 1] |
| angle_dist | number | 0 | variance in spray angle |
| x_dist | number | 0 | horizontal variance |
| y_dist | number | 0 | vertical variance |
circle
Particle.circle(x: number,--
horizontal coordinate
y: number,--
vertical coordinate
options: table--
settings
) → ()Creates particles in a circle at a position moving outside
Options
| Name | Type | Default | Description |
|---|---|---|---|
| amount | number | 0 | amount to spawn |
| radius | number | 8 | circle radius |
| color | table | white | start color |
| color_fade | table | - | end color |
| alpha | number | 1 | start transparency |
| alpha_fade | number | - | end transparency |
| speed | number | 8 | speed of movement |
| speed_dist | number | 0 | variance in speed |
| ttl | number | 1 | time to live |
| ttl_dist | number | 0 | variance in time to live |
| collision | bool | true | world collision |
| overwrite | bool | false | special render setting |
| overlay | bool | false | foreground particles |
| x_dist | number | 0 | horizontal variance |
| y_dist | number | 0 | vertical variance |