moved some canvas stuff out of webgl.js, fixed heightwidth bug