function create3DContext(canvas, opt_attribs) {
    var names = ["webgl", "experimental-webgl"];
    var context = null;
    for (var ii = 0; ii < names.length; ++ii) {
      try {
        context = canvas.getContext(names[ii], opt_attribs);
      } catch(e) {}  // eslint-disable-line
      if (context) {
        break;
      }
    }
    return context;
  }
Creates a webgl context.
@param {HTMLCanvasElement} canvas The canvas tag to get
    context from. If one is not passed in one will be
    created.
@return {WebGLRenderingContext} The created context.