We show that the liquid-to-crystal quantum phase transition in the Rokhsar-Kivelson dimer model on the two-dimensional triangular lattice occurs as a condensation of vortexlike excitations called "visons." This conclusion is drawn from numerical studies of the vison spectrum in the liquid phase by using the Green's function Monte Carlo method. We find that visons remain the lowest excitation throughout the liquid phase and that their gap decreases continuously to zero at the phase transition. The nature of the crystal phase and the second order of the phase transition are in agreement with an earlier prediction of Moessner and Sondhi.