I have a following implementation where there is a container which can be dragged and rotated using matrix3d.