message: 16bits fallback for edge indices
diff: @@ -75,9 +75,14 @@ export default class EdgeProgram extends Program {
  );
  // Enabling the OES_element_index_uint extension
  - // TODO: fallback if not enabled!
  - // TODO: use mnemonist to use the right kind of index to save up memory
  - gl.getExtension('OES_element_index_uint');
  + // NOTE: on older GPUs, this means that really large graphs won't
  + // have all their edges rendered. But it seems that the
  + // `OES_element_index_uint` is quite everywhere so we'll handle
  + // the potential issue if it really arises.
  + const extension = gl.getExtension('OES_element_index_uint');
  + this.canUse32BitsIndices = !!extension;
  + this.IndicesArray = this.canUse32BitsIndices ? Uint32Array : Uint16Array;
  + this.indicesType = this.canUse32BitsIndices ? gl.UNSIGNED_INT : gl.UNSIGNED_SHORT;
  }
  process(array, sourceData, targetData, data, i) {
  @@ -147,7 +152,7 @@ export default class EdgeProgram extends Program {
  const size = l + (l / 2);
  - const indices = new Uint32Array(size);
  + const indices = new this.IndicesArray(size);
  for (let i = 0, c = 0; i < size; i += 4) {
  indices[c++] = i;
  @@ -184,7 +189,7 @@ export default class EdgeProgram extends Program {
  gl.drawElements(
  gl.TRIANGLES,
  params.indices.length,
  - gl.UNSIGNED_INT,
  + this.indicesType,
  0
  );
  }
  