Hi ruwix, thanks for pointing that out. I've built a new version that has a bunch of improvements, and this fix. It is available here:
http://cube.crider.co.uk/twistysim.html
I'll write up an API when I have time. In the mean time have a look at these pages for some idea of how to use it in...