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.36 kB
Source Map (JSON)
{"version":3,"file":"mapViewDimensionToGlTarget.mjs","sources":["../../../../../../src/rendering/renderers/gl/texture/utils/mapViewDimensionToGlTarget.ts"],"sourcesContent":["import type { TextureSource } from '../../../shared/texture/sources/TextureSource';\nimport type { GlRenderingContext } from '../../context/GlRenderingContext';\n\n/**\n * Builds a lookup table that maps Pixi's texture view dimension to the appropriate WebGL texture target.\n *\n * This is about how the texture is *bound/viewed* in shaders, not about how pixel data is uploaded.\n * @param gl - WebGL context.\n * @internal\n */\nexport function mapViewDimensionToGlTarget(\n gl: GlRenderingContext,\n): Record<TextureSource['viewDimension'], number | null>\n{\n return {\n '2d': gl.TEXTURE_2D,\n cube: gl.TEXTURE_CUBE_MAP,\n '1d': null,\n // WebGL2 only\n '3d': (gl as any)?.TEXTURE_3D || null,\n '2d-array': (gl as any)?.TEXTURE_2D_ARRAY || null,\n 'cube-array': (gl as any)?.TEXTURE_CUBE_MAP_ARRAY || null,\n };\n}\n\n"],"names":[],"mappings":";AAUO,SAAS,2BACZ,EAAA,EAEJ;AACI,EAAA,OAAO;AAAA,IACH,MAAM,EAAA,CAAG,UAAA;AAAA,IACT,MAAM,EAAA,CAAG,gBAAA;AAAA,IACT,IAAA,EAAM,IAAA;AAAA;AAAA,IAEN,IAAA,EAAO,IAAY,UAAA,IAAc,IAAA;AAAA,IACjC,UAAA,EAAa,IAAY,gBAAA,IAAoB,IAAA;AAAA,IAC7C,YAAA,EAAe,IAAY,sBAAA,IAA0B;AAAA,GACzD;AACJ;;;;"}