pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
1 lines • 1.07 kB
Source Map (JSON)
{"version":3,"file":"getTestContext.mjs","sources":["../../../../../../src/rendering/renderers/gl/shader/program/getTestContext.ts"],"sourcesContent":["import { DOMAdapter } from '../../../../../environment/adapter';\n\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\n\nlet context: GlRenderingContext;\n\n/**\n * returns a little WebGL context to use for program inspection.\n * @private\n * @returns {WebGLRenderingContext} a gl context to test with\n */\nexport function getTestContext(): GlRenderingContext\n{\n if (!context || context?.isContextLost())\n {\n const canvas = DOMAdapter.get().createCanvas();\n\n context = canvas.getContext('webgl', {}) as GlRenderingContext;\n }\n\n return context;\n}\n"],"names":[],"mappings":";;;AAIA,IAAI,OAAA,CAAA;AAOG,SAAS,cAChB,GAAA;AACI,EAAA,IAAI,CAAC,OAAA,IAAW,OAAS,EAAA,aAAA,EACzB,EAAA;AACI,IAAA,MAAM,MAAS,GAAA,UAAA,CAAW,GAAI,EAAA,CAAE,YAAa,EAAA,CAAA;AAE7C,IAAA,OAAA,GAAU,MAAO,CAAA,UAAA,CAAW,OAAS,EAAA,EAAE,CAAA,CAAA;AAAA,GAC3C;AAEA,EAAO,OAAA,OAAA,CAAA;AACX;;;;"}