Pyrotechnicians (fireworks experts) cover the fireworks setup with thin plastic sheets if there's a threat of rain. That's keeps them dry and when fired, they go right through the plastic and everything happens fast enough to not affect the 'explosions'.