pixi.js
Version:
PixiJS — The HTML5 Creation Engine =============
15 lines (12 loc) • 365 B
JavaScript
import { DOMAdapter } from '../../../../../environment/adapter.mjs';
;
let context;
function getTestContext() {
if (!context || context?.isContextLost()) {
const canvas = DOMAdapter.get().createCanvas();
context = canvas.getContext("webgl", {});
}
return context;
}
export { getTestContext };
//# sourceMappingURL=getTestContext.mjs.map