natiny_particles_set_sizes

C
void natiny_particles_set_sizes(NatinyParticles particles, const float* sizes, uint32_t count);

Sets how a particle's size changes over its life, as evenly spaced factors from birth to death.

Parameters

Name Type Description
particles NatinyParticles Particle system handle from natiny_particles_create
sizes const float* Factors, copied; may be NULL when count is 0
count uint32_t Number of factors, 0 to 8; 0 removes the curve

Example

C
const float sizes[] = { 0.5f, 1.5f, 2.5f };
natiny_particles_set_sizes(smoke, sizes, 3);

Notes

  • A count above 8 is clamped to 8.