code: function render () {
    update(cloth)
  
    var width = canvas.width
    var height = canvas.height
  
    gl.viewport(0, 0, width, height)
    clear(gl)
  
    mat4.perspective(proj, Math.PI / 4, width / height, 0.001, 1000)
  
    // Update camera rotation angle
    camera.rotation = Date.now() * 0.0002
  
    cloth.bind(shader)
    shader.uniforms.uProjection = proj
    shader.uniforms.uView = camera.view()
    cloth.draw()
  
    cube.bind(shader)
    shader.uniforms.uProjection = proj
    shader.uniforms.uView = camera.view()
    cube.draw()
  }
docs: Main loop