{"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,YAAA,CACb;AAAA,EADO,WAAA,GAAA;AAYH;AAAA,IAAA,IAAA,CAAO,IAAA,GAAO,QAAA;AAEd;AAAA,IAAA,IAAA,CAAO,QAAA,GAAW,CAAA;AAAA,EAAA;AAAA,EAEX,OAAA,GACP;AACI,IAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,OAAA,CAAQ,QAAQ,CAAA,EAAA,EACzC;AACI,MAAA,IAAA,CAAK,OAAA,CAAQ,CAAC,CAAA,CAAE,OAAA,EAAQ;AAAA,IAC5B;AAEA,IAAA,IAAA,CAAK,OAAA,GAAU,IAAA;AACf,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA;AAAA,EACtB;AACJ;;;;"}