Set up trackball camera

Note that it works only during animation playback. Need to make this work
otherwise too later.
Fix preview#render

Had to perform parseInt for each coordinate separately. Previously the order of
calculations was a bit messed up.
Attach trackball control to the right element

It's not a good idea to attach that directly to window as that messes up things.