index.js
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
}
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
}
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 }
Unpack boxes into a flat typed array, remove empty boxes
Unpack boxes into a flat typed array remove empty boxes