How to use the @pixi/settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT function in @pixi/settings

To help you get started, we’ve selected a few @pixi/settings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pixijs / pixi.js / packages / utils / src / settings.ts View on Github external
* @example `@2x`
 */
settings.RETINA_PREFIX = /@([0-9\.]+)x/;

/**
 * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported` function.
 * For most scenarios this should be left as true, as otherwise the user may have a poor experience.
 * However, it can be useful to disable under certain scenarios, such as headless unit tests.
 *
 * @static
 * @name FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
 * @memberof PIXI.settings
 * @type {boolean}
 * @default true
 */
settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true;

export { settings };