code: function convertBoxes(boxes, d, data, ids) {
    var ptr = 0
    var count = 0
    for(var i=0, n=boxes.length; i<n; ++i) {
      var b = boxes[i]
      if(boxEmpty(d, b)) {
        continue
      }
      for(var j=0; j<2*d; ++j) {
        data[ptr++] = b[j]
      }
      ids[count++] = i
    }
    return count
  }
docs: Unpack boxes into a flat typed array, remove empty boxes