message: isWebGLSupported util function is now cached
  Avoid creating a new context each time it's called
diff: +let supported;
  +
  /**
  * Helper for checking for WebGL support.
  *
  * @return {boolean} Is WebGL supported.
  */
  export function isWebGLSupported()
  +{
  + if (typeof supported === 'undefined')
  + {
  + supported = (function supported()
  {
  const contextOptions = { stencil: true, failIfMajorPerformanceCaveat: true };
  @@ -17,7 +23,8 @@ export function isWebGLSupported()
  }
  const canvas = document.createElement('canvas');
  - let gl = canvas.getContext('webgl', contextOptions) || canvas.getContext('experimental-webgl', contextOptions);
  + let gl = canvas.getContext('webgl', contextOptions)
  + || canvas.getContext('experimental-webgl', contextOptions);
  const success = !!(gl && gl.getContextAttributes().stencil);
  @@ -39,5 +46,8 @@ export function isWebGLSupported()
  {
  return false;
  }
  + })();
  }
  + return supported;
  +}
  