natiny.particles.set_frames
natiny.particles.set_frames(particles, columns, rows [, fps [, random_start]])
Treats the texture as a grid of animation frames and plays them on each particle.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
particles |
number |
Particle system handle from natiny.particles.create |
|
columns |
integer |
Frames across the texture | |
rows |
integer |
Frames down the texture | |
fps |
number |
0 |
Frames per second; 0 plays the whole grid once over each particle's life |
random_start |
boolean |
false |
Start each particle on a random frame |
Example
natiny.particles.set_frames(explosion, 8, 8, 0)