code: function getCubeFacesWithNdx(gl, options) {
    const faces = getCubeFaceOrder(gl, options);
    // work around bug in NVidia drivers. We have to upload the first face first else the driver crashes :(
    const facesWithNdx = faces.map(function(face, ndx) {
      return { face: face, ndx: ndx };
    });
    facesWithNdx.sort(function(a, b) {
      return a.face - b.face;
    });
    return facesWithNdx;
  }
docs: @typedef {Object} FaceInfo
  @property {number} face gl enum for texImage2D
  @property {number} ndx face index (0 - 5) into source data
  @ignore
   
  Gets an array of FaceInfos
  There's a bug in some NVidia drivers that will crash the driver if
  `gl.TEXTURE_CUBE_MAP_POSITIVE_X` is not uploaded first. So, we take
  the user's desired order from his faces to WebGL and make sure we
  do the faces in WebGL order
  
  @param {WebGLRenderingContext} gl the WebGLRenderingContext
  @param {module:twgl.TextureOptions} options A TextureOptions object with whatever parameters you want set.
  @return {FaceInfo[]} cubemap face infos. Arguably the `face` property of each element is redundent but
  it's needed internally to sort the array of `ndx` properties by `face`.
  @private