Emulsion droplets as reactors for assembling nanoparticles