1 line
7.5 KiB
Plaintext
1 line
7.5 KiB
Plaintext
{"version":3,"file":"const.mjs","sources":["../../../../../src/rendering/renderers/shared/texture/const.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/indent */\n\nimport { 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 * @typedef {'no-premultiply-alpha' | 'premultiply-alpha-on-upload' | 'premultiplied-alpha'} ALPHA_MODES\n */\nexport type ALPHA_MODES =\n 'no-premultiply-alpha' |\n 'premultiply-alpha-on-upload' |\n 'premultiplied-alpha';\n\n/**\n * Constants for multi-sampling antialiasing.\n * @see Framebuffer#multisample\n * @name MSAA_QUALITY\n * @static\n * @enum {number}\n * @property {number} NONE - No multisampling for this renderTexture\n * @property {number} LOW - Try 2 samples\n * @property {number} MEDIUM - Try 4 samples\n * @property {number} HIGH - Try 8 samples\n */\nexport enum MSAA_QUALITY\n // eslint-disable-next-line @typescript-eslint/indent\n{\n NONE = 0,\n LOW = 2,\n MEDIUM = 4,\n HIGH = 8\n}\n\nexport type TEXTURE_FORMATS =\n // eslint-disable-next-line @typescript-eslint/indent\n\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\nexport type TEXTURE_VIEW_DIMENSIONS =\n '1d' |\n '2d' |\n '2d-array' |\n 'cube' |\n 'cube-array' |\n '3d';\n\nexport type TEXTURE_DIMENSIONS =\n | '1d'\n | '2d'\n | '3d';\n\nexport type WRAP_MODE =\n /**\n * The texture uvs are clamped\n * @default 33071\n */\n | 'clamp-to-edge'\n /**\n * The texture uvs tile and repeat\n * @default 10497\n */\n | 'repeat'\n /**\n * The texture uvs tile and repeat with mirroring\n * @default 33648\n */\n | 'mirror-repeat';\n\nexport enum DEPRECATED_WRAP_MODES\n{\n CLAMP = 'clamp-to-edge',\n\n REPEAT = 'repeat',\n\n MIRRORED_REPEAT = 'mirror-repeat',\n}\n\n/** @deprecated since 8.0.0 */\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 {@link settings.SCALE_MODE} 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 * @static\n */\nexport type SCALE_MODE =\n /** Pixelating scaling */\n | 'nearest'\n /** Smooth scaling */\n | 'linear';\n\nexport enum DEPRECATED_SCALE_MODES\n{\n NEAREST = 'nearest',\n LINEAR = 'linear',\n}\n\n/**\n * @deprecated since 8.0.0\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\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":["MSAA_QUALITY","DEPRECATED_WRAP_MODES","DEPRECATED_SCALE_MODES"],"mappings":";;;AA4BY,IAAA,YAAA,qBAAAA,aAAL,KAAA;AAGH,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,UAAO,CAAP,CAAA,GAAA,MAAA,CAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,SAAM,CAAN,CAAA,GAAA,KAAA,CAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,YAAS,CAAT,CAAA,GAAA,QAAA,CAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,UAAO,CAAP,CAAA,GAAA,MAAA,CAAA;AANQ,EAAAA,OAAAA,aAAAA,CAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA,EAAA;AAgKA,IAAA,qBAAA,qBAAAC,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;AAUC,MAAA,UAAA,GAAa,IAAI,KAAA,C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