code: function indexPairs(num_pairs, context){
      var vertex_elements = context.vertex_data.vertex_elements;
      var num_vertices = context.vertex_data.vertex_count;
      var offset = num_vertices - 2 * num_pairs - 2;
  
      for (var i = 0; i < num_pairs; i++){
          vertex_elements.push(offset + 2 * i + 2);
          vertex_elements.push(offset + 2 * i + 1);
          vertex_elements.push(offset + 2 * i + 0);
          vertex_elements.push(offset + 2 * i + 2);
          vertex_elements.push(offset + 2 * i + 3);
          vertex_elements.push(offset + 2 * i + 1);
          context.geom_count += 2;
      }
  }
docs: Add indices to vertex_elements