isWebGLAvailable () {
    // Adapted from
    // http://stackoverflow.com/questions/9899807/three-js-detect-webgl-support-and-fallback-to-regular-canvas

    const options = {
      failIfMajorPerformanceCaveat: true
    }

    try {
      const canvas = document.createElement('canvas')
      return Boolean(window.WebGLRenderingContext) &&
        (canvas.getContext('webgl', options) || canvas.getContext('experimental-webgl', options))
    } catch (e) {
      return false
    }
  }
/** Checks WebGL capabilities
   * @returns {boolean}
   */
Checks WebGL capabilities
@returns {boolean}
Checks WebGL capabilities @returns { boolean }
isWebGLAvailable () {
    const options = {
      failIfMajorPerformanceCaveat: true
    }
    try {
      const canvas = document.createElement('canvas')
      return Boolean(window.WebGLRenderingContext) &&
        (canvas.getContext('webgl', options) || canvas.getContext('experimental-webgl', options))
    } catch (e) {
      return false
    }
  }
isWebGLAvailable ( ) { const options = { failIfMajorPerformanceCaveat : true } try { const canvas = document . createElement ( 'canvas' ) return Boolean ( window . WebGLRenderingContext ) && ( canvas . getContext ( 'webgl' , options ) || canvas . getContext ( 'experimental-webgl' , options ) ) } catch ( e ) { return false } }
Checks WebGL capabilities
 @returns {boolean}
Checks WebGL capabilities @returns { boolean }
// Adapted from // http://stackoverflow.com/questions/9899807/three-js-detect-webgl-support-and-fallback-to-regular-canvas