[CSM] Add functions to create particles and particlespawners. (#6072)