Light-assisted, templated self-assembly using a photonic-crystal slab.