Coooool. I so wanna know how this works.
On a related note, holodecks will only signal the end of a certain kind of civilisation. There will be people who don't want to give up on the Real World. Very few people, probably, but they will inherit the future. And so the generation after the holodeck is invented, the world will be ruled by really motivated people who care about the real world, creating a society where leisure is minimal and Things Get Done.
If civilisation crashed because of the holodecks, they'll likely be subsistence-level farmers. When they regain the ability to build holodecks, they'll probably have a huge and diverse population, most of whom will dive back into them and restart the cycle. But if they retained enough infrastructure, they'll be able to use that extra time to revolutionise the way the world works (via cybernetics, genetic engineering, massive terraforming projects), and society will never be the same.