       gl.drawElements(gl.LINES, object.indices.length, gl.UNSIGNED_SHORT, 0);
          }
          else {
            gl.drawElements(gl.TRIANGLES, object.indices.length, gl.UNSIGNED_SHORT, 0);
          }

          // Clean
          gl.bindVertexArray(null);
          gl.bindBuffer(gl.ARRAY_BUFFER, null);
          gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
        });
      }
      catch (error) {
        console.error(error);
      }
    }

    // Update object positions
    function animate() {
 