Updating the emitter

After the add_emitter code, the next function that is set up for an external call is update_emitter. This function first checks to see if there is a defined emitter, and if so, calls an update function that updates all of the attributes on the emitter to the values passed in from the HTML input elements. Here is what the code looks like:

extern "C"
EMSCRIPTEN_KEEPALIVE
void update_emitter(int max_particles, float min_angle, float
max_angle, Uint32 particle_lifetime, float acceleration, bool
alpha_fade, float min_starting_velocity, float
max_starting_velocity, Uint32 emission_rate, float x_pos, float
y_pos, float radius ) {
if( emitter == NULL ) {
return;
}
emitter->Update(max_particles, min_angle, max_angle,
particle_lifetime, acceleration, alpha_fade,
min_starting_velocity, max_starting_velocity,
emission_rate, x_pos, y_pos, radius );
}