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.05 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;AAOG,SAAS,cAAA,GAChB;AACI,EAAA,IAAI,CAAC,OAAA,IAAW,OAAA,EAAS,aAAA,EAAc,EACvC;AACI,IAAA,MAAM,MAAA,GAAS,UAAA,CAAW,GAAA,EAAI,CAAE,YAAA,EAAa;AAE7C,IAAA,OAAA,GAAU,MAAA,CAAO,UAAA,CAAW,OAAA,EAAS,EAAE,CAAA;AAAA,EAC3C;AAEA,EAAA,OAAO,OAAA;AACX;;;;"}