Separate render code into webgl-render.js