Scriptable viewports

This should resolve #24. See res/dist/scripts/sandbox/camera.lua for an example usage of viewports.