/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/rendering/renderers/gl/shader/program/getTestContext.ts
22 строки
589 B
Zyie
chore: documentation overhaul with typedoc (#11423)
19 май 2025, 11:44
Не верифицирован
19 май 2025, 11:44
34926f0
Код
Авторство
О чём код?
import { DOMAdapter } from '../../../../../environment/adapter'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; let context: GlRenderingContext; /** * returns a little WebGL context to use for program inspection. * @private * @returns {WebGLRenderingContext} a gl context to test with */ export function getTestContext(): GlRenderingContext { if (!context || context?.isContextLost()) { const canvas = DOMAdapter.get().createCanvas(); context = canvas.getContext('webgl', {}) as GlRenderingContext; } return context; }