Boost.js 853 B

12345678910111213141516171819202122232425262728293031323334
  1. /* *
  2. *
  3. * Copyright (c) 2019-2020 Highsoft AS
  4. *
  5. * Boost module: stripped-down renderer for higher performance
  6. *
  7. * License: highcharts.com/license
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. 'use strict';
  13. import H from '../../Core/Globals.js';
  14. import butils from './BoostUtils.js';
  15. import init from './BoostInit.js';
  16. import './BoostOverrides.js';
  17. import './NamedColors.js';
  18. import U from '../../Core/Utilities.js';
  19. var error = U.error;
  20. // These need to be fixed when we support named imports
  21. var hasWebGLSupport = butils.hasWebGLSupport;
  22. if (!hasWebGLSupport()) {
  23. if (typeof H.initCanvasBoost !== 'undefined') {
  24. // Fallback to canvas boost
  25. H.initCanvasBoost();
  26. }
  27. else {
  28. error(26);
  29. }
  30. }
  31. else {
  32. // WebGL support is alright, and we're good to go.
  33. init();
  34. }