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 • 7.83 kB
Source Map (JSON)
{"version":3,"file":"const.mjs","sources":["../../../../../src/rendering/renderers/shared/texture/const.ts"],"sourcesContent":["import { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\n\n/**\n * Specifies the alpha composition mode for textures.\n *\n * - `no-premultiply-alpha`: Does not premultiply alpha.\n * - `premultiply-alpha-on-upload`: Premultiplies alpha on texture upload.\n * - `premultiplied-alpha`: Assumes the texture is already in premultiplied alpha format.\n * @category rendering\n * @advanced\n */\nexport type ALPHA_MODES =\n 'no-premultiply-alpha' |\n 'premultiply-alpha-on-upload' |\n 'premultiplied-alpha';\n\n/**\n * The texture formats that are supported by pixi.\n *\n * These formats are used to specify the format of textures in WebGPU and WebGL.\n * They include various uncompressed, compressed, and depth/stencil formats.\n * @category rendering\n * @advanced\n */\nexport type TEXTURE_FORMATS =\n // 8-bit formats\n 'r8unorm' |\n 'r8snorm' |\n 'r8uint' |\n 'r8sint' |\n\n // 16-bit formats\n 'r16uint' |\n 'r16sint' |\n 'r16float' |\n 'rg8unorm' |\n 'rg8snorm' |\n 'rg8uint' |\n 'rg8sint' |\n\n // 32-bit formats\n 'r32uint' |\n 'r32sint' |\n 'r32float' |\n 'rg16uint' |\n 'rg16sint' |\n 'rg16float' |\n 'rgba8unorm' |\n 'rgba8unorm-srgb' |\n 'rgba8snorm' |\n 'rgba8uint' |\n 'rgba8sint' |\n 'bgra8unorm' |\n 'bgra8unorm-srgb' |\n // Packed 32-bit formats\n 'rgb9e5ufloat' |\n 'rgb10a2unorm' |\n 'rg11b10ufloat' |\n\n // 64-bit formats\n 'rg32uint' |\n 'rg32sint' |\n 'rg32float' |\n 'rgba16uint' |\n 'rgba16sint' |\n 'rgba16float' |\n\n // 128-bit formats\n 'rgba32uint' |\n 'rgba32sint' |\n 'rgba32float' |\n\n // Depth/stencil formats\n 'stencil8' |\n 'depth16unorm' |\n 'depth24plus' |\n 'depth24plus-stencil8' |\n 'depth32float' |\n\n // \"depth32float-stencil8\" feature\n 'depth32float-stencil8' |\n\n // BC compressed formats usable if \"texture-compression-bc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'bc1-rgba-unorm' |\n 'bc1-rgba-unorm-srgb' |\n 'bc2-rgba-unorm' |\n 'bc2-rgba-unorm-srgb' |\n 'bc3-rgba-unorm' |\n 'bc3-rgba-unorm-srgb' |\n 'bc4-r-unorm' |\n 'bc4-r-snorm' |\n 'bc5-rg-unorm' |\n 'bc5-rg-snorm' |\n 'bc6h-rgb-ufloat' |\n 'bc6h-rgb-float' |\n 'bc7-rgba-unorm' |\n 'bc7-rgba-unorm-srgb' |\n\n // ETC2 compressed formats usable if \"texture-compression-etc2\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'etc2-rgb8unorm' |\n 'etc2-rgb8unorm-srgb' |\n 'etc2-rgb8a1unorm' |\n 'etc2-rgb8a1unorm-srgb' |\n 'etc2-rgba8unorm' |\n 'etc2-rgba8unorm-srgb' |\n 'eac-r11unorm' |\n 'eac-r11snorm' |\n 'eac-rg11unorm' |\n 'eac-rg11snorm' |\n\n // ASTC compressed formats usable if \"texture-compression-astc\" is both\n // supported by the device/user agent and enabled in requestDevice.\n 'astc-4x4-unorm' |\n 'astc-4x4-unorm-srgb' |\n 'astc-5x4-unorm' |\n 'astc-5x4-unorm-srgb' |\n 'astc-5x5-unorm' |\n 'astc-5x5-unorm-srgb' |\n 'astc-6x5-unorm' |\n 'astc-6x5-unorm-srgb' |\n 'astc-6x6-unorm' |\n 'astc-6x6-unorm-srgb' |\n 'astc-8x5-unorm' |\n 'astc-8x5-unorm-srgb' |\n 'astc-8x6-unorm' |\n 'astc-8x6-unorm-srgb' |\n 'astc-8x8-unorm' |\n 'astc-8x8-unorm-srgb' |\n 'astc-10x5-unorm' |\n 'astc-10x5-unorm-srgb' |\n 'astc-10x6-unorm' |\n 'astc-10x6-unorm-srgb' |\n 'astc-10x8-unorm' |\n 'astc-10x8-unorm-srgb' |\n 'astc-10x10-unorm' |\n 'astc-10x10-unorm-srgb' |\n 'astc-12x10-unorm' |\n 'astc-12x10-unorm-srgb' |\n 'astc-12x12-unorm' |\n 'astc-12x12-unorm-srgb';\n\n/**\n * The texture dimensions that are supported by pixi.\n *\n * - `1d` is a one-dimensional texture, which is typically used for linear data.\n * - `2d` is a two-dimensional texture, which is commonly used for images and textures.\n * - `3d` is a three-dimensional texture, which is used for volumetric data or 3D textures.\n * @category rendering\n * @advanced\n */\nexport type TEXTURE_DIMENSIONS =\n | '1d'\n | '2d'\n | '3d';\n\n/**\n * The wrap modes that are supported by pixi.\n *\n * The wrap mode affects the default wrapping mode of future operations.\n * - `clamp-to-edge` is the default mode, which clamps the texture coordinates to the edge of the texture.\n * - `repeat` allows the texture to repeat in both u and v directions.\n * - `mirror-repeat` allows the texture to repeat in both u and v directions, but mirrors the texture on every other repeat.\n * @category rendering\n * @standard\n */\nexport type WRAP_MODE =\n | 'clamp-to-edge'\n | 'repeat'\n | 'mirror-repeat';\n\n/** @internal */\nexport enum DEPRECATED_WRAP_MODES\n{\n CLAMP = 'clamp-to-edge',\n\n REPEAT = 'repeat',\n\n MIRRORED_REPEAT = 'mirror-repeat',\n}\n\n/**\n * The wrap modes that are supported by pixi.\n * @deprecated since 8.0.0\n * @category rendering\n * @see WRAP_MODE\n * @advanced\n */\nexport const WRAP_MODES = new Proxy(DEPRECATED_WRAP_MODES, {\n get(target, prop: keyof typeof DEPRECATED_WRAP_MODES)\n {\n // #if _DEBUG\n deprecation(v8_0_0, `DRAW_MODES.${prop} is deprecated, use '${DEPRECATED_WRAP_MODES[prop]}' instead`);\n // #endif\n\n return target[prop];\n },\n});\n\n/**\n * The scale modes that are supported by pixi.\n *\n * The scale mode affects the default scaling mode of future operations.\n * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.\n *\n * - `nearest` is a pixelating scaling mode, which does not interpolate pixels.\n * - `linear` is a smooth scaling mode, which interpolates pixels for smoother results.\n * @category rendering\n * @standard\n */\nexport type SCALE_MODE = | 'nearest' | 'linear';\n\n/** @internal */\nexport enum DEPRECATED_SCALE_MODES\n{\n NEAREST = 'nearest',\n LINEAR = 'linear',\n}\n\n/**\n * The scale modes that are supported by pixi.\n * @deprecated since 8.0.0\n * @category rendering\n * @see SCALE_MODE\n * @advanced\n */\nexport const SCALE_MODES = new Proxy(DEPRECATED_SCALE_MODES, {\n get(target, prop: keyof typeof DEPRECATED_SCALE_MODES)\n {\n // #if _DEBUG\n deprecation(v8_0_0, `DRAW_MODES.${prop} is deprecated, use '${DEPRECATED_SCALE_MODES[prop]}' instead`);\n // #endif\n\n return target[prop];\n },\n});\n\n/**\n * The compare function types used for comparing values in various operations.\n * @category rendering\n * @advanced\n */\nexport type COMPARE_FUNCTION =\n | 'never'\n | 'less'\n | 'equal'\n | 'less-equal'\n | 'greater'\n | 'not-equal'\n | 'greater-equal'\n | 'always';\n"],"names":["DEPRECATED_WRAP_MODES","DEPRECATED_SCALE_MODES"],"mappings":";;;AA6KY,IAAA,qBAAA,qBAAAA,sBAAL,KAAA;AAEH,EAAAA,uBAAA,OAAQ,CAAA,GAAA,eAAA,CAAA;AAER,EAAAA,uBAAA,QAAS,CAAA,GAAA,QAAA,CAAA;AAET,EAAAA,uBAAA,iBAAkB,CAAA,GAAA,eAAA,CAAA;AANV,EAAAA,OAAAA,sBAAAA,CAAAA;AAAA,CAAA,EAAA,qBAAA,IAAA,EAAA,EAAA;AAgBC,MAAA,UAAA,GAAa,IAAI,KAAA,CAAM,qBAAuB,EAAA;AAAA,EACvD,GAAA,CAAI,QAAQ,IACZ,EAAA;AAEI,IAAA,WAAA,CAAY,QAAQ,CAAc,WAAA,EAAA,IAAI,wBAAwB,qBAAsB,CAAA,IAAI,CAAC,CAAW,SAAA,CAAA,CAAA,CAAA;AAGpG,IA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