Added rotation support to demo.