natiny_particles_set_frames

C
void natiny_particles_set_frames(NatinyParticles particles, uint32_t columns, uint32_t rows,
                                 float fps, bool random_start);

Treats the texture as a grid of animation frames and plays them on each particle.

Parameters

Name Type Description
particles NatinyParticles Particle system handle from natiny_particles_create
columns uint32_t Frames across the texture
rows uint32_t Frames down the texture
fps float Frames per second; 0 plays the whole grid once over each particle's life
random_start bool Start each particle on a random frame

Example

C
natiny_particles_set_frames(explosion, 8, 8, 0.0f, false);