UNPKG

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.77 kB
{"version":3,"file":"FilterEffect.mjs","sources":["../../src/filters/FilterEffect.ts"],"sourcesContent":["import type { Rectangle } from '../maths/shapes/Rectangle';\nimport type { Effect } from '../scene/container/Effect';\nimport type { Filter } from './Filter';\n\n/**\n * A filter effect is an effect that can be applied to a container that involves applying special pixel effects\n * to that container as it is rendered. Used internally when the filters property is modified on a container.\n * @internal\n */\nexport class FilterEffect implements Effect\n{\n /** read only filters array - to modify, set it again! */\n public filters: readonly Filter[];\n /**\n * If specified, rather than calculating the bounds of the container that the filter\n * will apply to, we use this rect instead. This is a local rect - so will have the containers transform\n * applied to it\n */\n public filterArea?: Rectangle;\n\n /** the pipe that knows how to handle this effect */\n public pipe = 'filter';\n /** the priority of this effect */\n public priority = 1;\n\n public destroy(): void\n {\n for (let i = 0; i < this.filters.length; i++)\n {\n this.filters[i].destroy();\n }\n\n this.filters = null;\n this.filterArea = null;\n }\n}\n"],"names":[],"mappings":";AASO,MAAM,YACb,CAAA;AAAA,EADO,WAAA,GAAA;AAYH;AAAA,IAAA,IAAA,CAAO,IAAO,GAAA,QAAA,CAAA;AAEd;AAAA,IAAA,IAAA,CAAO,QAAW,GAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAEX,OACP,GAAA;AACI,IAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,IAAK,CAAA,OAAA,CAAQ,QAAQ,CACzC,EAAA,EAAA;AACI,MAAK,IAAA,CAAA,OAAA,CAAQ,CAAC,CAAA,CAAE,OAAQ,EAAA,CAAA;AAAA,KAC5B;AAEA,IAAA,IAAA,CAAK,OAAU,GAAA,IAAA,CAAA;AACf,IAAA,IAAA,CAAK,UAAa,GAAA,IAAA,CAAA;AAAA,GACtB;AACJ;;;;"}