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":"getAdjustedBlendModeBlend.mjs","sources":["../../../../../src/rendering/renderers/shared/state/getAdjustedBlendModeBlend.ts"],"sourcesContent":["import { type BLEND_MODES, BLEND_TO_NPM } from './const';\n\nimport type { TextureSource } from '../texture/sources/TextureSource';\n\n/**\n * Adjusts a blend mode for the current alpha mode. Returns the blend mode that works with that format.\n * eg 'normal' blend mode will return 'normal-npm' when rendering with premultiplied alpha.\n * and 'normal' if the texture is already premultiplied (the default)\n * @param blendMode - The blend mode to get the adjusted blend mode for.\n * @param textureSource - The texture to test the format of.\n * @returns - the blend mode that should be used to render this texture correctly based on its alphaMode\n * @internal\n */\nexport function getAdjustedBlendModeBlend(blendMode: BLEND_MODES, textureSource: TextureSource): BLEND_MODES\n{\n if (textureSource.alphaMode === 'no-premultiply-alpha')\n {\n return (BLEND_TO_NPM[blendMode as keyof typeof BLEND_TO_NPM] || blendMode) as BLEND_MODES;\n }\n\n return blendMode;\n}\n"],"names":[],"mappings":";;;AAagB,SAAA,yBAAA,CAA0B,WAAwB,aAClE,EAAA;AACI,EAAI,IAAA,aAAA,CAAc,cAAc,sBAChC,EAAA;AACI,IAAQ,OAAA,YAAA,CAAa,SAAsC,CAAK,IAAA,SAAA,CAAA;AAAA,GACpE;AAEA,EAAO,OAAA,SAAA,CAAA;AACX;;;;"}