{"version":3,"file":"pixi-filters.js","sources":["../../node_modules/tslib/tslib.es6.js","../../adjustment/src/AdjustmentFilter.ts","../../advanced-bloom/src/ExtractBrightnessFilter.ts","../../kawase-blur/src/KawaseBlurFilter.ts","../../advanced-bloom/src/AdvancedBloomFilter.ts","../../ascii/src/AsciiFilter.ts","../../bevel/src/BevelFilter.ts","../../bloom/src/BloomFilter.ts","../../bulge-pinch/src/BulgePinchFilter.ts","../../color-map/src/ColorMapFilter.ts","../../color-overlay/src/ColorOverlayFilter.ts","../../color-replace/src/ColorReplaceFilter.ts","../../convolution/src/ConvolutionFilter.ts","../../cross-hatch/src/CrossHatchFilter.ts","../../crt/src/CRTFilter.ts","../../dot/src/DotFilter.ts","../../drop-shadow/src/DropShadowFilter.ts","../../emboss/src/EmbossFilter.ts","../../glitch/src/GlitchFilter.ts","../../glow/src/GlowFilter.ts","../../godray/src/GodrayFilter.ts","../../motion-blur/src/MotionBlurFilter.ts","../../multi-color-replace/src/MultiColorReplaceFilter.ts","../../old-film/src/OldFilmFilter.ts","../../outline/src/OutlineFilter.ts","../../pixelate/src/PixelateFilter.ts","../../radial-blur/src/RadialBlurFilter.ts","../../reflection/src/ReflectionFilter.ts","../../rgb-split/src/RGBSplitFilter.ts","../../shockwave/src/ShockwaveFilter.ts","../../simple-lightmap/src/SimpleLightmapFilter.ts","../../tilt-shift/src/TiltShiftAxisFilter.ts","../../tilt-shift/src/TiltShiftXFilter.ts","../../tilt-shift/src/TiltShiftYFilter.ts","../../tilt-shift/src/TiltShiftFilter.ts","../../twist/src/TwistFilter.ts","../../zoom-blur/src/ZoomBlurFilter.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { vertex } from '@tools/fragments';\nimport fragment from './adjustment.frag';\nimport { Filter } from '@pixi/core';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ninterface AdjustmentFilterOptions {\n gamma: number;\n saturation: number;\n contrast: number;\n brightness: number;\n red: number;\n green: number;\n blue: number;\n alpha: number;\n}\n\n/**\n * The ability to adjust gamma, contrast, saturation, brightness, alpha or color-channel shift.\n * This is a faster and much simpler to use than\n * {@link http://pixijs.download/release/docs/PIXI.filters.ColorMatrixFilter.html ColorMatrixFilter}\n * because it does not use a matrix.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/adjustment.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-adjustment|@pixi/filter-adjustment}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass AdjustmentFilter extends Filter\n{\n /** The amount of luminance */\n public gamma = 1;\n\n /** The amount of saturation */\n public saturation = 1;\n\n /** The amount of contrast */\n public contrast = 1;\n\n /** The amount of brightness */\n public brightness = 1;\n\n /** The amount of red channel */\n public red = 1;\n\n /** The amount of green channel */\n public green = 1;\n\n /** The amount of blue channel */\n public blue = 1;\n\n /** The amount of alpha channel */\n public alpha = 1;\n\n /**\n * @param {object|number} [options] - The optional parameters of the filter.\n * @param {number} [options.gamma=1] - The amount of luminance\n * @param {number} [options.saturation=1] - The amount of color saturation\n * @param {number} [options.contrast=1] - The amount of contrast\n * @param {number} [options.brightness=1] - The overall brightness\n * @param {number} [options.red=1] - The multipled red channel\n * @param {number} [options.green=1] - The multipled green channel\n * @param {number} [options.blue=1] - The multipled blue channel\n * @param {number} [options.alpha=1] - The overall alpha amount\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n\n Object.assign(this, options);\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @ignore\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.gamma = Math.max(this.gamma, 0.0001);\n this.uniforms.saturation = this.saturation;\n this.uniforms.contrast = this.contrast;\n this.uniforms.brightness = this.brightness;\n this.uniforms.red = this.red;\n this.uniforms.green = this.green;\n this.uniforms.blue = this.blue;\n this.uniforms.alpha = this.alpha;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n}\n\nexport { AdjustmentFilter };\nexport type { AdjustmentFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './extract-brightness.frag';\nimport { Filter } from '@pixi/core';\n\n/**\n * Internal filter for AdvancedBloomFilter to get brightness.\n * @class\n * @private\n */\nclass ExtractBrightnessFilter extends Filter\n{\n /**\n * @param {number} [threshold] - Defines how bright a color needs to be extracted.\n */\n constructor(threshold = 0.5)\n {\n super(vertex, fragment);\n\n this.threshold = threshold;\n }\n\n /**\n * Defines how bright a color needs to be extracted.\n *\n * @default 0.5\n */\n get threshold(): number\n {\n return this.uniforms.threshold;\n }\n set threshold(value: number)\n {\n this.uniforms.threshold = value;\n }\n}\n\nexport { ExtractBrightnessFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './kawase-blur.frag';\nimport fragmentClamp from './kawase-blur-clamp.frag';\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\nimport type { IPoint } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype PixelSizeValue = IPoint | number[] | number;\n\n/**\n * A much faster blur than Gaussian blur, but more complicated to use.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/kawase-blur.png)\n *\n * @see https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-kawase-blur|@pixi/filter-kawase-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass KawaseBlurFilter extends Filter\n{\n private _pixelSize: Point;\n private _clamp: boolean;\n private _kernels: number[] = [];\n private _blur = 4;\n private _quality = 3;\n\n /**\n * @param {number|number[]} [blur=4] - The blur of the filter. Should be greater than `0`. If\n * value is an Array, setting kernels.\n * @param {number} [quality=3] - The quality of the filter. Should be an integer greater than `1`.\n * @param {boolean} [clamp=false] - Clamp edges, useful for removing dark edges\n * from fullscreen filters or bleeding to the edge of filterArea.\n */\n constructor(blur: number | number[] = 4, quality = 3, clamp = false)\n {\n super(vertex, clamp ? fragmentClamp : fragment);\n this.uniforms.uOffset = new Float32Array(2);\n\n this._pixelSize = new Point();\n this.pixelSize = 1;\n this._clamp = clamp;\n\n // if `blur` is array , as kernels\n if (Array.isArray(blur))\n {\n this.kernels = blur;\n }\n else\n {\n this._blur = blur;\n this.quality = quality;\n }\n }\n\n /**\n * Overrides apply\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const uvX = this._pixelSize.x / input._frame.width;\n const uvY = this._pixelSize.y / input._frame.height;\n let offset;\n\n if (this._quality === 1 || this._blur === 0)\n {\n offset = this._kernels[0] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, input, output, clear);\n }\n else\n {\n const renderTarget = filterManager.getFilterTexture();\n\n let source = input;\n let target = renderTarget;\n let tmp;\n\n const last = this._quality - 1;\n\n for (let i = 0; i < last; i++)\n {\n offset = this._kernels[i] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, target, 1);\n\n tmp = source;\n source = target;\n target = tmp;\n }\n offset = this._kernels[last] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, output, clear);\n\n filterManager.returnFilterTexture(renderTarget);\n }\n }\n\n private _updatePadding()\n {\n this.padding = Math.ceil(this._kernels.reduce((acc, v) => acc + v + 0.5, 0));\n }\n\n /**\n * Auto generate kernels by blur & quality\n * @private\n */\n private _generateKernels()\n {\n const blur = this._blur;\n const quality = this._quality;\n const kernels: number[] = [blur];\n\n if (blur > 0)\n {\n let k = blur;\n const step = blur / quality;\n\n for (let i = 1; i < quality; i++)\n {\n k -= step;\n kernels.push(k);\n }\n }\n\n this._kernels = kernels;\n\n this._updatePadding();\n }\n\n /**\n * The kernel size of the blur filter, for advanced usage.\n * @default [0]\n */\n get kernels(): number[]\n {\n return this._kernels;\n }\n set kernels(value: number[])\n {\n if (Array.isArray(value) && value.length > 0)\n {\n this._kernels = value;\n this._quality = value.length;\n this._blur = Math.max(...value);\n }\n else\n {\n // if value is invalid , set default value\n this._kernels = [0];\n this._quality = 1;\n }\n }\n\n /**\n * Get the if the filter is clampped.\n *\n * @readonly\n * @default false\n */\n get clamp(): boolean\n {\n return this._clamp;\n }\n\n /**\n * Sets the pixel size of the filter. Large size is blurrier. For advanced usage.\n *\n * @member {PIXI.Point|number[]}\n * @default [1, 1]\n */\n set pixelSize(value: PixelSizeValue)\n {\n if (typeof value === 'number')\n {\n this._pixelSize.x = value;\n this._pixelSize.y = value;\n }\n else if (Array.isArray(value))\n {\n this._pixelSize.x = value[0];\n this._pixelSize.y = value[1];\n }\n else if (value instanceof Point)\n {\n this._pixelSize.x = value.x;\n this._pixelSize.y = value.y;\n }\n else\n {\n // if value is invalid , set default value\n this._pixelSize.x = 1;\n this._pixelSize.y = 1;\n }\n }\n get pixelSize(): PixelSizeValue\n {\n return this._pixelSize;\n }\n\n /**\n * The quality of the filter, integer greater than `1`.\n * @default 3\n */\n get quality(): number\n {\n return this._quality;\n }\n set quality(value: number)\n {\n this._quality = Math.max(1, Math.round(value));\n this._generateKernels();\n }\n\n /**\n * The amount of blur, value greater than `0`.\n * @default 4\n */\n get blur(): number\n {\n return this._blur;\n }\n set blur(value: number)\n {\n this._blur = value;\n this._generateKernels();\n }\n}\n\nexport { KawaseBlurFilter };\nexport type { PixelSizeValue };\n","import { ExtractBrightnessFilter } from './ExtractBrightnessFilter';\nimport { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { vertex } from '@tools/fragments';\nimport fragment from './advanced-bloom.frag';\nimport { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport type { FilterSystem, FilterState, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\nimport type { PixelSizeValue } from '@pixi/filter-kawase-blur';\n\ninterface AdvancedBloomFilterOptions {\n threshold: number,\n bloomScale: number,\n brightness: number,\n kernels: number[] | null,\n blur: number,\n quality: number,\n pixelSize: PixelSizeValue,\n resolution: number,\n}\n\n/**\n * The AdvancedBloomFilter applies a Bloom Effect to an object. Unlike the normal BloomFilter\n * this had some advanced controls for adjusting the look of the bloom. Note: this filter\n * is slower than normal BloomFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/advanced-bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-advanced-bloom|@pixi/filter-advanced-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass AdvancedBloomFilter extends Filter\n{\n /** Default construction options. */\n public static readonly defaults: AdvancedBloomFilterOptions = {\n threshold: 0.5,\n bloomScale: 1.0,\n brightness: 1.0,\n kernels: null,\n blur: 8,\n quality: 4,\n pixelSize: 1,\n resolution: settings.FILTER_RESOLUTION,\n };\n\n /** To adjust the strength of the bloom. Higher values is more intense brightness. */\n public bloomScale = 1;\n\n /** The brightness, lower value is more subtle brightness, higher value is blown-out. */\n public brightness = 1;\n\n private _extractFilter: ExtractBrightnessFilter;\n private _blurFilter: KawaseBlurFilter;\n protected _resolution: number = settings.FILTER_RESOLUTION;\n\n /**\n * @param {object|number} [options] - The optional parameters of advanced bloom filter.\n * When options is a number , it will be `options.threshold`.\n * @param {number} [options.threshold=0.5] - Defines how bright a color needs to be to affect bloom.\n * @param {number} [options.bloomScale=1.0] - To adjust the strength of the bloom. Higher values is\n * more intense brightness.\n * @param {number} [options.brightness=1.0] - The brightness, lower value is more subtle brightness,\n * higher value is blown-out.\n * @param {number} [options.blur=8] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=4] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.FILTER_RESOLUTION] - The resolution of the Blur filter.\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n\n if (typeof options === 'number')\n {\n options = { threshold: options };\n }\n\n const opt:AdvancedBloomFilterOptions = Object.assign(AdvancedBloomFilter.defaults, options);\n\n this.bloomScale = opt.bloomScale;\n this.brightness = opt.brightness;\n\n const { kernels, blur, quality, pixelSize, resolution } = opt;\n\n this._extractFilter = new ExtractBrightnessFilter(opt.threshold);\n this._extractFilter.resolution = resolution;\n this._blurFilter = kernels\n ? new KawaseBlurFilter(kernels)\n : new KawaseBlurFilter(blur, quality);\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n *\n * @private\n */\n apply(\n filterManager: FilterSystem,\n input: RenderTexture,\n output: RenderTexture,\n clear: CLEAR_MODES,\n currentState?: FilterState): void\n {\n const brightTarget = filterManager.getFilterTexture();\n\n this._extractFilter.apply(filterManager, input, brightTarget, 1, currentState);\n\n const bloomTarget = filterManager.getFilterTexture();\n\n this._blurFilter.apply(filterManager, brightTarget, bloomTarget, 1);\n\n this.uniforms.bloomScale = this.bloomScale;\n this.uniforms.brightness = this.brightness;\n this.uniforms.bloomTexture = bloomTarget;\n\n filterManager.applyFilter(this, input, output, clear);\n\n filterManager.returnFilterTexture(bloomTarget);\n filterManager.returnFilterTexture(brightTarget);\n }\n\n /**\n * The resolution of the filter.\n * @ignore\n */\n get resolution(): number\n {\n return this._resolution;\n }\n set resolution(value: number)\n {\n this._resolution = value;\n\n if (this._extractFilter)\n {\n this._extractFilter.resolution = value;\n }\n if (this._blurFilter)\n {\n this._blurFilter.resolution = value;\n }\n }\n\n /**\n * Defines how bright a color needs to be to affect bloom.\n *\n * @default 0.5\n */\n get threshold(): number\n {\n return this._extractFilter.threshold;\n }\n set threshold(value: number)\n {\n this._extractFilter.threshold = value;\n }\n\n /**\n * Sets the kernels of the Blur Filter\n */\n get kernels(): number[]\n {\n return this._blurFilter.kernels;\n }\n set kernels(value: number[])\n {\n this._blurFilter.kernels = value;\n }\n\n /**\n * Sets the strength of the Blur properties simultaneously\n *\n * @default 2\n */\n get blur(): number\n {\n return this._blurFilter.blur;\n }\n set blur(value: number)\n {\n this._blurFilter.blur = value;\n }\n\n /**\n * Sets the quality of the Blur Filter\n *\n * @default 4\n */\n get quality(): number\n {\n return this._blurFilter.quality;\n }\n set quality(value: number)\n {\n this._blurFilter.quality = value;\n }\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n get pixelSize(): PixelSizeValue\n {\n return this._blurFilter.pixelSize;\n }\n set pixelSize(value: PixelSizeValue)\n {\n this._blurFilter.pixelSize = value;\n }\n}\n\nexport { AdvancedBloomFilter };\nexport type { AdvancedBloomFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './ascii.frag';\nimport { Filter } from '@pixi/core';\n\n// TODO (cengler) - The Y is flipped in this shader for some reason.\n\n// @author Vico @vicocotea\n// original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h\n\n/**\n * An ASCII filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/ascii.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-ascii|@pixi/filter-ascii}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass AsciiFilter extends Filter\n{\n /**\n * @param {number} [size=8] - Size of the font\n */\n constructor(size = 8)\n {\n super(vertex, fragment);\n this.size = size;\n }\n\n /**\n * The pixel size used by the filter.\n */\n get size(): number\n {\n return this.uniforms.pixelSize;\n }\n set size(value: number)\n {\n this.uniforms.pixelSize = value;\n }\n}\n\nexport { AsciiFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './bevel.frag';\nimport { Filter } from '@pixi/core';\nimport { DEG_TO_RAD } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\ninterface BevelFilterOptions {\n rotation: number,\n thickness: number,\n lightColor: number,\n lightAlpha: number,\n shadowColor: number,\n shadowAlpha: number,\n}\n\n/**\n * Bevel Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bevel.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bevel|@pixi/filter-bevel}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass BevelFilter extends Filter\n{\n private _thickness = 2;\n private _angle = 0;\n\n /**\n * @param {object} [options] - The optional parameters of the filter.\n * @param {number} [options.rotation = 45] - The angle of the light in degrees.\n * @param {number} [options.thickness = 2] - The tickness of the bevel.\n * @param {number} [options.lightColor = 0xffffff] - Color of the light.\n * @param {number} [options.lightAlpha = 0.7] - Alpha of the light.\n * @param {number} [options.shadowColor = 0x000000] - Color of the shadow.\n * @param {number} [options.shadowAlpha = 0.7] - Alpha of the shadow.\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n\n this.uniforms.lightColor = new Float32Array(3);\n this.uniforms.shadowColor = new Float32Array(3);\n\n Object.assign(this, {\n rotation: 45,\n thickness: 2,\n lightColor: 0xffffff,\n lightAlpha: 0.7,\n shadowColor: 0x000000,\n shadowAlpha: 0.7,\n }, options);\n\n // Workaround: https://github.com/pixijs/filters/issues/230\n // applies correctly only if there is at least a single-pixel padding with alpha=0 around an image\n // To solve this problem, a padding of 1 put on the filter should suffice\n this.padding = 1;\n }\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n private _updateTransform()\n {\n this.uniforms.transformX = this._thickness * Math.cos(this._angle);\n this.uniforms.transformY = this._thickness * Math.sin(this._angle);\n }\n\n /**\n * The angle of the light in degrees.\n * @default 45\n */\n get rotation(): number\n {\n return this._angle / DEG_TO_RAD;\n }\n set rotation(value: number)\n {\n this._angle = value * DEG_TO_RAD;\n this._updateTransform();\n }\n\n /**\n * The tickness of the bevel.\n * @default 2\n */\n get thickness(): number\n {\n return this._thickness;\n }\n set thickness(value: number)\n {\n this._thickness = value;\n this._updateTransform();\n }\n\n /**\n * Color of the light.\n * @default 0xffffff\n */\n get lightColor(): number\n {\n return rgb2hex(this.uniforms.lightColor);\n }\n set lightColor(value: number)\n {\n hex2rgb(value, this.uniforms.lightColor);\n }\n\n /**\n * Alpha of the light.\n * @default 0.7\n */\n get lightAlpha(): number\n {\n return this.uniforms.lightAlpha;\n }\n set lightAlpha(value: number)\n {\n this.uniforms.lightAlpha = value;\n }\n\n /**\n * Color of the shadow.\n * @default 0x000000\n */\n get shadowColor(): number\n {\n return rgb2hex(this.uniforms.shadowColor);\n }\n set shadowColor(value: number)\n {\n hex2rgb(value, this.uniforms.shadowColor);\n }\n\n /**\n * Alpha of the shadow.\n * @default 0.7\n */\n get shadowAlpha(): number\n {\n return this.uniforms.shadowAlpha;\n }\n set shadowAlpha(value: number)\n {\n this.uniforms.shadowAlpha = value;\n }\n}\n\nexport { BevelFilter };\nexport type { BevelFilterOptions };\n","import { Filter } from '@pixi/core';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { AlphaFilter } from '@pixi/filter-alpha';\nimport { BlurFilterPass } from '@pixi/filter-blur';\nimport { settings } from '@pixi/settings';\nimport { Point } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype BlurValue = number | Point | number[];\n\n/**\n * The BloomFilter applies a Gaussian blur to an object.\n * The strength of the blur can be set for x- and y-axis separately.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bloom|@pixi/filter-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass BloomFilter extends Filter\n{\n private blurXFilter: BlurFilterPass;\n private blurYFilter: BlurFilterPass;\n private defaultFilter: AlphaFilter;\n\n /**\n * @param {number|PIXI.Point|number[]} [blur=2] - Sets the strength of both the blurX and blurY properties simultaneously\n * @param {number} [quality=4] - The quality of the blurX & blurY filter.\n * @param {number} [resolution=PIXI.settings.FILTER_RESOLUTION] - The resolution of the blurX & blurY filter.\n * @param {number} [kernelSize=5] - The kernelSize of the blurX & blurY filter.Options: 5, 7, 9, 11, 13, 15.\n */\n constructor(blur: BlurValue = 2, quality = 4, resolution: number = settings.FILTER_RESOLUTION, kernelSize = 5)\n {\n super();\n\n let blurX;\n let blurY;\n\n if (typeof blur === 'number')\n {\n blurX = blur;\n blurY = blur;\n }\n else if (blur instanceof Point)\n {\n blurX = blur.x;\n blurY = blur.y;\n }\n else if (Array.isArray(blur))\n {\n blurX = blur[0];\n blurY = blur[1];\n }\n\n this.blurXFilter = new BlurFilterPass(true, blurX, quality, resolution, kernelSize);\n this.blurYFilter = new BlurFilterPass(false, blurY, quality, resolution, kernelSize);\n this.blurYFilter.blendMode = BLEND_MODES.SCREEN;\n this.defaultFilter = new AlphaFilter();\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const renderTarget = filterManager.getFilterTexture();\n\n // TODO - copyTexSubImage2D could be used here?\n this.defaultFilter.apply(filterManager, input, output, clear);\n\n this.blurXFilter.apply(filterManager, input, renderTarget, 1);\n this.blurYFilter.apply(filterManager, renderTarget, output, 0);\n\n filterManager.returnFilterTexture(renderTarget);\n }\n\n /**\n * Sets the strength of both the blurX and blurY properties simultaneously\n * @default 2\n */\n get blur(): number\n {\n return this.blurXFilter.blur;\n }\n set blur(value: number)\n {\n this.blurXFilter.blur = this.blurYFilter.blur = value;\n }\n\n /**\n * Sets the strength of the blurX property\n * @default 2\n */\n get blurX(): number\n {\n return this.blurXFilter.blur;\n }\n set blurX(value: number)\n {\n this.blurXFilter.blur = value;\n }\n\n /**\n * Sets the strength of the blurY property\n * @default 2\n */\n get blurY(): number\n {\n return this.blurYFilter.blur;\n }\n set blurY(value: number)\n {\n this.blurYFilter.blur = value;\n }\n}\n\nexport { BloomFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './bulgePinch.frag';\nimport { Filter } from '@pixi/core';\nimport type { Point, Rectangle } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype PointLike = Point | number[];\n\ninterface BulgePinchFilterOptions {\n center: PointLike;\n radius: number;\n strength: number;\n}\n\n// @author Julien CLEREL @JuloxRox\n// original filter https://github.com/evanw/glfx.js/blob/master/src/filters/warp/bulgepinch.js\n// by Evan Wallace : http://madebyevan.com/\n\n/**\n * Bulges or pinches the image in a circle.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bulge-pinch.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bulge-pinch|@pixi/filter-bulge-pinch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass BulgePinchFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: BulgePinchFilterOptions = {\n center: [0.5, 0.5],\n radius: 100,\n strength: 1,\n };\n\n /**\n * @param {object} [options] - Options to use for filter.\n * @param {PIXI.Point|Array} [options.center=[0,0]] - The x and y coordinates of the center\n * of the circle of effect.\n * @param {number} [options.radius=100] - The radius of the circle of effect.\n * @param {number} [options.strength=1] - -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, BulgePinchFilter.defaults, options);\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const { width, height } = input.filterFrame as Rectangle;\n\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * The radius of the circle of effect.\n */\n get radius(): number\n {\n return this.uniforms.radius;\n }\n set radius(value: number)\n {\n this.uniforms.radius = value;\n }\n\n /**\n * The strength of the effect. -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n */\n get strength(): number\n {\n return this.uniforms.strength;\n }\n set strength(value: number)\n {\n this.uniforms.strength = value;\n }\n\n /**\n * The x and y coordinates of the center of the circle of effect.\n *\n * @member {PIXI.Point | Array}\n */\n get center(): PointLike\n {\n return this.uniforms.center;\n }\n set center(value: PointLike)\n {\n this.uniforms.center = value;\n }\n}\n\nexport { BulgePinchFilter };\nexport type { BulgePinchFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './color-map.frag';\nimport { Filter, Texture, TextureSource } from '@pixi/core';\nimport { MIPMAP_MODES, SCALE_MODES } from '@pixi/constants';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype ColorMapSource = TextureSource | Texture | null;\n\n/**\n * The ColorMapFilter applies a color-map effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-map.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-map|@pixi/filter-color-map}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass ColorMapFilter extends Filter\n{\n /** The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image. */\n public mix = 1;\n\n private _size = 0;\n private _sliceSize = 0;\n private _slicePixelSize = 0;\n private _sliceInnerSize = 0;\n private _nearest = false;\n private _scaleMode: SCALE_MODES | null = null;\n private _colorMap: Texture | null = null;\n\n /**\n * @param {HTMLImageElement|HTMLCanvasElement|PIXI.BaseTexture|PIXI.Texture} [colorMap] - The\n * colorMap texture of the filter.\n * @param {boolean} [nearest=false] - Whether use NEAREST for colorMap texture.\n * @param {number} [mix=1] - The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.\n */\n constructor(colorMap: ColorMapSource, nearest = false, mix = 1)\n {\n super(vertex, fragment);\n\n this._scaleMode = null;\n this.nearest = nearest;\n this.mix = mix;\n this.colorMap = colorMap;\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms._mix = this.mix;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * The size of one color slice\n * @readonly\n */\n get colorSize(): number\n {\n return this._size;\n }\n\n /**\n * the colorMap texture\n * @member {PIXI.Texture}\n */\n get colorMap(): ColorMapSource\n {\n return this._colorMap;\n }\n set colorMap(colorMap: ColorMapSource)\n {\n if (!colorMap)\n {\n return;\n }\n if (!(colorMap instanceof Texture))\n {\n colorMap = Texture.from(colorMap);\n }\n if ((colorMap as Texture)?.baseTexture)\n {\n colorMap.baseTexture.scaleMode = this._scaleMode as SCALE_MODES;\n colorMap.baseTexture.mipmap = MIPMAP_MODES.OFF;\n\n this._size = colorMap.height;\n this._sliceSize = 1 / this._size;\n this._slicePixelSize = this._sliceSize / this._size;\n this._sliceInnerSize = this._slicePixelSize * (this._size - 1);\n\n this.uniforms._size = this._size;\n this.uniforms._sliceSize = this._sliceSize;\n this.uniforms._slicePixelSize = this._slicePixelSize;\n this.uniforms._sliceInnerSize = this._sliceInnerSize;\n\n this.uniforms.colorMap = colorMap;\n }\n\n this._colorMap = colorMap;\n }\n\n /**\n * Whether use NEAREST for colorMap texture.\n */\n get nearest(): boolean\n {\n return this._nearest;\n }\n set nearest(nearest: boolean)\n {\n this._nearest = nearest;\n this._scaleMode = nearest ? SCALE_MODES.NEAREST : SCALE_MODES.LINEAR;\n\n const texture = this._colorMap;\n\n if (texture && texture.baseTexture)\n {\n texture.baseTexture._glTextures = {};\n\n texture.baseTexture.scaleMode = this._scaleMode;\n texture.baseTexture.mipmap = MIPMAP_MODES.OFF;\n\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n }\n }\n\n /**\n * If the colorMap is based on canvas , and the content of canvas has changed,\n * then call `updateColorMap` for update texture.\n */\n updateColorMap(): void\n {\n const texture = this._colorMap;\n\n if (texture && texture.baseTexture)\n {\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n\n this.colorMap = texture;\n }\n }\n\n /**\n * Destroys this filter\n *\n * @param {boolean} [destroyBase=false] - Whether to destroy the base texture of colorMap as well\n */\n destroy(destroyBase = false): void\n {\n if (this._colorMap)\n {\n this._colorMap.destroy(destroyBase);\n }\n super.destroy();\n }\n}\n\nexport { ColorMapFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './colorOverlay.frag';\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\ntype Color = number | number[] | Float32Array;\n\n/**\n * Replace all colors within a source graphic with a single color.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-overlay.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-replace|@pixi/filter-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * // replaces red with blue\n * someSprite.filters = [new ColorOverlayFilter(\n * [1, 0, 0],\n * [0, 0, 1],\n * 0.001\n * )];\n *\n */\nclass ColorOverlayFilter extends Filter\n{\n private _color = 0x0;\n private _alpha = 1;\n\n /**\n * @param {number|Array} [color=0x000000] - The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @param {number} [alpha=1] - The alpha value of the color\n */\n constructor(color: Color = 0x000000, alpha = 1)\n {\n super(vertex, fragment);\n this.uniforms.color = new Float32Array(3);\n this.color = color;\n this.alpha = alpha;\n }\n\n /**\n * The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @member {number|Array|Float32Array}\n * @default 0x000000\n */\n set color(value: Color)\n {\n const arr = this.uniforms.color;\n\n if (typeof value === 'number')\n {\n hex2rgb(value, arr);\n this._color = value;\n }\n else\n {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._color = rgb2hex(arr);\n }\n }\n get color(): Color\n {\n return this._color;\n }\n\n /**\n * The alpha value of the color\n * @default 0\n */\n set alpha(value: number)\n {\n this.uniforms.alpha = value;\n this._alpha = value;\n }\n get alpha(): number\n {\n return this._alpha;\n }\n}\n\nexport { ColorOverlayFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './colorReplace.frag';\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\ntype Color = number | number[] | Float32Array;\n\n/**\n * ColorReplaceFilter, originally by mishaa, updated by timetocode\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-replace.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-replace|@pixi/filter-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * // replaces true red with true blue\n * someSprite.filters = [new ColorReplaceFilter(\n * [1, 0, 0],\n * [0, 0, 1],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(\n * [220/255.0, 220/255.0, 220/255.0],\n * [225/255.0, 200/255.0, 215/255.0],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(0xdcdcdc, 0xe1c8d7, 0.001)];\n *\n */\nclass ColorReplaceFilter extends Filter\n{\n private _originalColor = 0xff0000;\n private _newColor = 0x0;\n\n /**\n * @param {number|Array|Float32Array} [originalColor=0xFF0000] - The color that will be changed,\n * as a 3 component RGB e.g. `[1.0, 1.0, 1.0]`\n * @param {number|Array|Float32Array} [newColor=0x000000] - The resulting color, as a 3 component\n * RGB e.g. `[1.0, 0.5, 1.0]`\n * @param {number} [epsilon=0.4] - Tolerance/sensitivity of the floating-point comparison between colors\n * (lower = more exact, higher = more inclusive)\n */\n constructor(originalColor: Color = 0xFF0000, newColor: Color = 0x000000, epsilon = 0.4)\n {\n super(vertex, fragment);\n this.uniforms.originalColor = new Float32Array(3);\n this.uniforms.newColor = new Float32Array(3);\n this.originalColor = originalColor;\n this.newColor = newColor;\n this.epsilon = epsilon;\n }\n\n /**\n * The color that will be changed, as a 3 component RGB e.g. [1.0, 1.0, 1.0]\n * @member {number|Array|Float32Array}\n * @default 0xFF0000\n */\n set originalColor(value: Color)\n {\n const arr = this.uniforms.originalColor;\n\n if (typeof value === 'number')\n {\n hex2rgb(value, arr);\n this._originalColor = value;\n }\n else\n {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._originalColor = rgb2hex(arr);\n }\n }\n get originalColor(): Color\n {\n return this._originalColor;\n }\n\n /**\n * The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @member {number|Array|Float32Array}\n * @default 0x000000\n */\n set newColor(value: Color)\n {\n const arr = this.uniforms.newColor;\n\n if (typeof value === 'number')\n {\n hex2rgb(value, arr);\n this._newColor = value;\n }\n else\n {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._newColor = rgb2hex(arr);\n }\n }\n get newColor(): Color\n {\n return this._newColor;\n }\n\n /**\n * Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n * @default 0.4\n */\n set epsilon(value: number)\n {\n this.uniforms.epsilon = value;\n }\n get epsilon(): number\n {\n return this.uniforms.epsilon;\n }\n}\n\nexport { ColorReplaceFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './convolution.frag';\nimport { Filter } from '@pixi/core';\n\n/**\n * The ConvolutionFilter class applies a matrix convolution filter effect.\n * A convolution combines pixels in the input image with neighboring pixels to produce a new image.\n * A wide variety of image effects can be achieved through convolutions, including blurring, edge\n * detection, sharpening, embossing, and beveling. The matrix should be specified as a 9 point Array.\n * See https://docs.gimp.org/2.10/en/gimp-filter-convolution-matrix.html for more info.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/convolution.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-convolution|@pixi/filter-convolution}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass ConvolutionFilter extends Filter\n{\n /**\n * @param {number[]} [matrix=[0,0,0,0,0,0,0,0,0]] - An array of values used for matrix transformation.\n * Specified as a 9 point Array.\n * @param {number} [width=200] - Width of the object you are transforming\n * @param {number} [height=200] - Height of the object you are transforming\n */\n constructor(matrix: number[], width = 200, height = 200)\n {\n super(vertex, fragment);\n this.uniforms.texelSize = new Float32Array(2);\n this.uniforms.matrix = new Float32Array(9);\n if (matrix !== undefined)\n {\n this.matrix = matrix;\n }\n this.width = width;\n this.height = height;\n }\n\n /**\n * An array of values used for matrix transformation. Specified as a 9 point Array.\n */\n get matrix(): number[]\n {\n return this.uniforms.matrix;\n }\n set matrix(matrix: number[])\n {\n matrix.forEach((v, i) =>\n {\n this.uniforms.matrix[i] = v;\n });\n }\n\n /**\n * Width of the object you are transforming\n */\n get width(): number\n {\n return 1 / this.uniforms.texelSize[0];\n }\n set width(value: number)\n {\n this.uniforms.texelSize[0] = 1 / value;\n }\n\n /**\n * Height of the object you are transforming\n */\n get height(): number\n {\n return 1 / this.uniforms.texelSize[1];\n }\n set height(value: number)\n {\n this.uniforms.texelSize[1] = 1 / value;\n }\n}\n\nexport { ConvolutionFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './crosshatch.frag';\nimport { Filter } from '@pixi/core';\n\n/**\n * A Cross Hatch effect filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/cross-hatch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-cross-hatch|@pixi/filter-cross-hatch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass CrossHatchFilter extends Filter\n{\n constructor()\n {\n super(vertex, fragment);\n }\n}\n\nexport { CrossHatchFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './crt.frag';\nimport { Filter } from '@pixi/core';\nimport type { Rectangle } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ninterface CRTFilterOptions {\n curvature: number;\n lineWidth: number;\n lineContrast: number;\n verticalLine: boolean;\n noise: number;\n noiseSize: number;\n seed: number;\n vignetting: number;\n vignettingAlpha: number;\n vignettingBlur: number;\n time: number;\n}\n\n/**\n * The CRTFilter applies a CRT effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/crt.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-crt|@pixi/filter-crt}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass CRTFilter extends Filter\n{\n /** Default constructor options */\n public static readonly defaults: CRTFilterOptions = {\n curvature: 1.0,\n lineWidth: 1.0,\n lineContrast: 0.25,\n verticalLine: false,\n noise: 0.0,\n noiseSize: 1.0,\n seed: 0.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n time: 0.0,\n };\n\n /** For animating interlaced lines */\n public time = 0;\n\n /** A seed value to apply to the random noise generation */\n public seed = 0;\n\n /**\n * @param {object} [options] - The optional parameters of CRT effect\n * @param {number} [options.curvature=1.0] - Bent of interlaced lines, higher value means more bend\n * @param {number} [options.lineWidth=1.0] - Width of the interlaced lines\n * @param {number} [options.lineContrast=0.25] - Contrast of interlaced lines\n * @param {number} [options.verticalLine=false] - `true` is vertical lines, `false` is horizontal\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.seed=0] - A seed value to apply to the random noise generation\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [options.time=0] - For animating interlaced lines\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, CRTFilter.defaults, options);\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const { width, height } = input.filterFrame as Rectangle;\n\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n\n this.uniforms.seed = this.seed;\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * Bent of interlaced lines, higher value means more bend\n * @default 1\n */\n set curvature(value: number)\n {\n this.uniforms.curvature = value;\n }\n get curvature(): number\n {\n return this.uniforms.curvature;\n }\n\n /**\n * Width of interlaced lines\n * @default 1\n */\n set lineWidth(value: number)\n {\n this.uniforms.lineWidth = value;\n }\n get lineWidth(): number\n {\n return this.uniforms.lineWidth;\n }\n\n /**\n * Contrast of interlaced lines\n * @default 0.25\n */\n set lineContrast(value: number)\n {\n this.uniforms.lineContrast = value;\n }\n get lineContrast(): number\n {\n return this.uniforms.lineContrast;\n }\n\n /**\n * `true` for vertical lines, `false` for horizontal lines\n * @default false\n */\n set verticalLine(value: boolean)\n {\n this.uniforms.verticalLine = value;\n }\n get verticalLine(): boolean\n {\n return this.uniforms.verticalLine;\n }\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n * @default 0\n */\n set noise(value: number)\n {\n this.uniforms.noise = value;\n }\n get noise(): number\n {\n return this.uniforms.noise;\n }\n\n /**\n * The size of the noise particles\n * @default 0\n */\n set noiseSize(value: number)\n {\n this.uniforms.noiseSize = value;\n }\n get noiseSize(): number\n {\n return this.uniforms.noiseSize;\n }\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @default 0\n */\n set vignetting(value: number)\n {\n this.uniforms.vignetting = value;\n }\n get vignetting(): number\n {\n return this.uniforms.vignetting;\n }\n\n /**\n * Amount of opacity of vignette\n * @default 0\n */\n set vignettingAlpha(value: number)\n {\n this.uniforms.vignettingAlpha = value;\n }\n get vignettingAlpha(): number\n {\n return this.uniforms.vignettingAlpha;\n }\n\n /**\n * Blur intensity of the vignette\n * @default 0\n */\n set vignettingBlur(value: number)\n {\n this.uniforms.vignettingBlur = value;\n }\n get vignettingBlur(): number\n {\n return this.uniforms.vignettingBlur;\n }\n}\n\nexport { CRTFilter };\nexport type { CRTFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './dot.frag';\nimport { Filter } from '@pixi/core';\n\n// @author Mat Groves http://matgroves.com/ @Doormat23\n// original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/fun/dotscreen.js\n\n/**\n * This filter applies a dotscreen effect making display objects appear to be made out of\n * black and white halftone dots like an old printer.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/dot.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-dot|@pixi/filter-dot}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass DotFilter extends Filter\n{\n /**\n * @param {number} [scale=1] - The scale of the effect.\n * @param {number} [angle=5] - The radius of the effect.\n */\n constructor(scale = 1, angle = 5)\n {\n super(vertex, fragment);\n this.scale = scale;\n this.angle = angle;\n }\n\n /**\n * The scale of the effect.\n * @default 1\n */\n get scale(): number\n {\n return this.uniforms.scale;\n }\n set scale(value: number)\n {\n this.uniforms.scale = value;\n }\n\n /**\n * The radius of the effect.\n * @default 5\n */\n get angle(): number\n {\n return this.uniforms.angle;\n }\n set angle(value: number)\n {\n this.uniforms.angle = value;\n }\n}\n\nexport { DotFilter };\n","import { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { vertex } from '@tools/fragments';\nimport fragment from './dropshadow.frag';\nimport { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { DEG_TO_RAD, Point } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\nimport type { IPoint } from '@pixi/math';\n\ntype PixelSizeValue = number | number[] | IPoint;\n\ninterface DropShadowFilterOptions {\n rotation: number;\n distance: number;\n color: number;\n alpha: number;\n shadowOnly: boolean;\n blur: number;\n quality: number;\n kernels: number[] | null;\n pixelSize: PixelSizeValue;\n resolution: number;\n}\n\n/**\n * Drop shadow filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/drop-shadow.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-drop-shadow|@pixi/filter-drop-shadow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass DropShadowFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: DropShadowFilterOptions = {\n rotation: 45,\n distance: 5,\n color: 0x000000,\n alpha: 0.5,\n shadowOnly: false,\n kernels: null,\n blur: 2,\n quality: 3,\n pixelSize: 1,\n resolution: settings.FILTER_RESOLUTION,\n };\n\n /** Hide the contents, only show the shadow. */\n public shadowOnly: boolean;\n\n /** Angle of the shadow in degrees. */\n public angle = 45;\n\n private _distance = 5;\n private _tintFilter: Filter;\n private _blurFilter: KawaseBlurFilter;\n protected _resolution: number = settings.FILTER_RESOLUTION;\n\n /**\n * @param {object} [options] - Filter options\n * @param {number} [options.rotation=45] - The angle of the shadow in degrees.\n * @param {number} [options.distance=5] - Distance of shadow\n * @param {number} [options.color=0x000000] - Color of the shadow\n * @param {number} [options.alpha=0.5] - Alpha of the shadow\n * @param {boolean} [options.shadowOnly=false] - Whether render shadow only\n * @param {number} [options.blur=2] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=3] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.FILTER_RESOLUTION] - The resolution of the Blur filter.\n */\n constructor(options?: Partial)\n {\n super();\n\n const opt: DropShadowFilterOptions = options\n ? { ...DropShadowFilter.defaults, ...options }\n : DropShadowFilter.defaults;\n\n const { kernels, blur, quality, pixelSize, resolution } = opt;\n\n this._tintFilter = new Filter(vertex, fragment);\n this._tintFilter.uniforms.color = new Float32Array(4);\n this._tintFilter.uniforms.shift = new Point();\n this._tintFilter.resolution = resolution;\n this._blurFilter = kernels\n ? new KawaseBlurFilter(kernels)\n : new KawaseBlurFilter(blur, quality);\n\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n\n const { shadowOnly, rotation, distance, alpha, color } = opt;\n\n this.shadowOnly = shadowOnly;\n this.rotation = rotation;\n this.distance = distance;\n this.alpha = alpha;\n this.color = color;\n\n this._updatePadding();\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const target = filterManager.getFilterTexture();\n\n this._tintFilter.apply(filterManager, input, target, 1);\n this._blurFilter.apply(filterManager, target, output, clear);\n\n if (this.shadowOnly !== true)\n {\n filterManager.applyFilter(this, input, output, 0);\n }\n\n filterManager.returnFilterTexture(target);\n }\n\n /**\n * Recalculate the proper padding amount.\n * @private\n */\n private _updatePadding()\n {\n this.padding = this.distance + (this.blur * 2);\n }\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n private _updateShift()\n {\n this._tintFilter.uniforms.shift.set(\n this.distance * Math.cos(this.angle),\n this.distance * Math.sin(this.angle),\n );\n }\n\n /**\n * The resolution of the filter.\n * @default PIXI.settings.FILTER_RESOLUTION\n */\n get resolution(): number\n {\n return this._resolution;\n }\n set resolution(value: number)\n {\n this._resolution = value;\n\n if (this._tintFilter)\n {\n this._tintFilter.resolution = value;\n }\n if (this._blurFilter)\n {\n this._blurFilter.resolution = value;\n }\n }\n\n /**\n * Distance offset of the shadow\n * @default 5\n */\n get distance(): number\n {\n return this._distance;\n }\n set distance(value: number)\n {\n this._distance = value;\n this._updatePadding();\n this._updateShift();\n }\n\n /**\n * The angle of the shadow in degrees\n * @default 2\n */\n get rotation(): number\n {\n return this.angle / DEG_TO_RAD;\n }\n set rotation(value: number)\n {\n this.angle = value * DEG_TO_RAD;\n this._updateShift();\n }\n\n /**\n * The alpha of the shadow\n * @default 1\n */\n get alpha(): number\n {\n return this._tintFilter.uniforms.alpha;\n }\n set alpha(value: number)\n {\n this._tintFilter.uniforms.alpha = value;\n }\n\n /**\n * The color of the shadow.\n * @default 0x000000\n */\n get color(): number\n {\n return rgb2hex(this._tintFilter.uniforms.color);\n }\n set color(value: number)\n {\n hex2rgb(value, this._tintFilter.uniforms.color);\n }\n\n /**\n * Sets the kernels of the Blur Filter\n */\n get kernels(): number[]\n {\n return this._blurFilter.kernels;\n }\n set kernels(value: number[])\n {\n this._blurFilter.kernels = value;\n }\n\n /**\n * The blur of the shadow\n * @default 2\n */\n get blur(): number\n {\n return this._blurFilter.blur;\n }\n set blur(value: number)\n {\n this._blurFilter.blur = value;\n this._updatePadding();\n }\n\n /**\n * Sets the quality of the Blur Filter\n * @default 4\n */\n get quality(): number\n {\n return this._blurFilter.quality;\n }\n set quality(value: number)\n {\n this._blurFilter.quality = value;\n }\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n get pixelSize(): PixelSizeValue\n {\n return this._blurFilter.pixelSize;\n }\n set pixelSize(value: PixelSizeValue)\n {\n this._blurFilter.pixelSize = value;\n }\n}\n\nexport { DropShadowFilter };\nexport type { DropShadowFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './emboss.frag';\nimport { Filter } from '@pixi/core';\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/emboss.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-emboss|@pixi/filter-emboss}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass EmbossFilter extends Filter\n{\n /**\n * @param {number} [strength=5] - Strength of the emboss.\n */\n constructor(strength = 5)\n {\n super(vertex, fragment);\n this.strength = strength;\n }\n\n /**\n * Strength of emboss.\n */\n get strength(): number\n {\n return this.uniforms.strength;\n }\n set strength(value: number)\n {\n this.uniforms.strength = value;\n }\n}\n\nexport { EmbossFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './glitch.frag';\nimport { Filter, Texture } from '@pixi/core';\nimport { SCALE_MODES } from '@pixi/constants';\nimport { DEG_TO_RAD, Rectangle } from '@pixi/math';\nimport type { IPoint } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype PointLike = IPoint | number[];\n\ninterface GlitchFilterOptions {\n slices: number;\n offset: number;\n direction: number;\n fillMode: number;\n seed: number;\n average: boolean;\n minSize: number;\n sampleSize: number;\n red: PointLike;\n green: PointLike;\n blue: PointLike;\n}\n\n/**\n * The GlitchFilter applies a glitch effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glitch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glitch|@pixi/filter-glitch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass GlitchFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: GlitchFilterOptions = {\n slices: 5,\n offset: 100,\n direction: 0,\n fillMode: 0,\n average: false,\n seed: 0,\n red: [0, 0],\n green: [0, 0],\n blue: [0, 0],\n minSize: 8,\n sampleSize: 512,\n };\n\n /** Fill mode as transparent */\n static readonly TRANSPARENT = 0;\n\n /** Fill mode as original */\n static readonly ORIGINAL = 1;\n\n /** Fill mode as loop */\n static readonly LOOP = 2;\n\n /** Fill mode as clamp */\n static readonly CLAMP = 3;\n\n /** Fill mode as mirror */\n static readonly MIRROR = 4;\n\n /** The maximum offset value for each of the slices. */\n public offset = 100;\n\n /** The fill mode of the space after the offset. */\n public fillMode: number = GlitchFilter.TRANSPARENT;\n\n /**\n * `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n */\n public average = false;\n\n /**\n * A seed value for randomizing color offset. Animating\n * this value to `Math.random()` produces a twitching effect.\n */\n public seed = 0;\n\n /** Minimum size of slices as a portion of the `sampleSize` */\n public minSize = 8;\n\n /** Height of the displacement map canvas. */\n public sampleSize = 512;\n\n /** Internally generated canvas. */\n private _canvas: HTMLCanvasElement;\n\n /**\n * The displacement map is used to generate the bands.\n * If using your own texture, `slices` will be ignored.\n *\n * @member {PIXI.Texture}\n * @readonly\n */\n public texture: Texture;\n\n /** Internal number of slices */\n private _slices = 0;\n\n private _offsets: Float32Array = new Float32Array(1);\n private _sizes: Float32Array = new Float32Array(1);\n\n /** direction is actually a setter for uniform.cosDir and uniform.sinDir.\n * Must be initialized to something different than the default value.\n */\n private _direction = -1;\n\n /**\n * @param {object} [options] - The more optional parameters of the filter.\n * @param {number} [options.slices=5] - The maximum number of slices.\n * @param {number} [options.offset=100] - The maximum offset amount of slices.\n * @param {number} [options.direction=0] - The angle in degree of the offset of slices.\n * @param {number} [options.fillMode=0] - The fill mode of the space after the offset. Acceptable values:\n * - `0` {@link PIXI.filters.GlitchFilter.TRANSPARENT TRANSPARENT}\n * - `1` {@link PIXI.filters.GlitchFilter.ORIGINAL ORIGINAL}\n * - `2` {@link PIXI.filters.GlitchFilter.LOOP LOOP}\n * - `3` {@link PIXI.filters.GlitchFilter.CLAMP CLAMP}\n * - `4` {@link PIXI.filters.GlitchFilter.MIRROR MIRROR}\n * @param {number} [options.seed=0] - A seed value for randomizing glitch effect.\n * @param {boolean} [options.average=false] - `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n * @param {number} [options.minSize=8] - Minimum size of individual slice. Segment of total `sampleSize`\n * @param {number} [options.sampleSize=512] - The resolution of the displacement map texture.\n * @param {number[]} [options.red=[0,0]] - Red channel offset\n * @param {number[]} [options.green=[0,0]] - Green channel offset.\n * @param {number[]} [options.blue=[0,0]] - Blue channel offset.\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n this._canvas = document.createElement('canvas');\n this._canvas.width = 4;\n this._canvas.height = this.sampleSize;\n this.texture = Texture.from(this._canvas, { scaleMode: SCALE_MODES.NEAREST });\n\n Object.assign(this, GlitchFilter.defaults, options);\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const { width, height } = input.filterFrame as Rectangle;\n\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n\n this.uniforms.seed = this.seed;\n this.uniforms.offset = this.offset;\n this.uniforms.fillMode = this.fillMode;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * Randomize the slices size (heights).\n *\n * @private\n */\n private _randomizeSizes()\n {\n const arr = this._sizes;\n const last = this._slices - 1;\n const size = this.sampleSize;\n const min = Math.min(this.minSize / size, 0.9 / this._slices);\n\n if (this.average)\n {\n const count = this._slices;\n let rest = 1;\n\n for (let i = 0; i < last; i++)\n {\n const averageWidth = rest / (count - i);\n const w = Math.max(averageWidth * (1 - (Math.random() * 0.6)), min);\n\n arr[i] = w;\n rest -= w;\n }\n arr[last] = rest;\n }\n else\n {\n let rest = 1;\n const ratio = Math.sqrt(1 / this._slices);\n\n for (let i = 0; i < last; i++)\n {\n const w = Math.max(ratio * rest * Math.random(), min);\n\n arr[i] = w;\n rest -= w;\n }\n arr[last] = rest;\n }\n\n this.shuffle();\n }\n\n /**\n * Shuffle the sizes of the slices, advanced usage.\n */\n shuffle(): void\n {\n const arr = this._sizes;\n const last = this._slices - 1;\n\n // shuffle\n for (let i = last; i > 0; i--)\n {\n const rand = (Math.random() * i) >> 0;\n const temp = arr[i];\n\n arr[i] = arr[rand];\n arr[rand] = temp;\n }\n }\n\n /**\n * Randomize the values for offset from -1 to 1\n *\n * @private\n */\n private _randomizeOffsets(): void\n {\n for (let i = 0; i < this._slices; i++)\n {\n this._offsets[i] = Math.random() * (Math.random() < 0.5 ? -1 : 1);\n }\n }\n\n /**\n * Regenerating random size, offsets for slices.\n */\n refresh(): void\n {\n this._randomizeSizes();\n this._randomizeOffsets();\n this.redraw();\n }\n\n /**\n * Redraw displacement bitmap texture, advanced usage.\n */\n redraw(): void\n {\n const size = this.sampleSize;\n const texture = this.texture;\n const ctx = this._canvas.getContext('2d') as CanvasRenderingContext2D;\n\n ctx.clearRect(0, 0, 8, size);\n\n let offset;\n let y = 0;\n\n for (let i = 0; i < this._slices; i++)\n {\n offset = Math.floor(this._offsets[i] * 256);\n const height = this._sizes[i] * size;\n const red = offset > 0 ? offset : 0;\n const green = offset < 0 ? -offset : 0;\n\n ctx.fillStyle = `rgba(${red}, ${green}, 0, 1)`;\n ctx.fillRect(0, y >> 0, size, height + 1 >> 0);\n y += height;\n }\n\n texture.baseTexture.update();\n this.uniforms.displacementMap = texture;\n }\n\n /**\n * Manually custom slices size (height) of displacement bitmap\n *\n * @member {number[]|Float32Array}\n */\n set sizes(sizes: Float32Array)\n {\n const len = Math.min(this._slices, sizes.length);\n\n for (let i = 0; i < len; i++)\n {\n this._sizes[i] = sizes[i];\n }\n }\n get sizes(): Float32Array\n {\n return this._sizes;\n }\n\n /**\n * Manually set custom slices offset of displacement bitmap, this is\n * a collection of values from -1 to 1. To change the max offset value\n * set `offset`.\n *\n * @member {number[]|Float32Array}\n */\n set offsets(offsets: Float32Array)\n {\n const len = Math.min(this._slices, offsets.length);\n\n for (let i = 0; i < len; i++)\n {\n this._offsets[i] = offsets[i];\n }\n }\n get offsets(): Float32Array\n {\n return this._offsets;\n }\n\n /**\n * The count of slices.\n * @default 5\n */\n get slices(): number\n {\n return this._slices;\n }\n set slices(value: number)\n {\n if (this._slices === value)\n {\n return;\n }\n this._slices = value;\n this.uniforms.slices = value;\n this._sizes = this.uniforms.slicesWidth = new Float32Array(value);\n this._offsets = this.uniforms.slicesOffset = new Float32Array(value);\n this.refresh();\n }\n\n /**\n * The angle in degree of the offset of slices.\n * @default 0\n */\n get direction(): number\n {\n return this._direction;\n }\n set direction(value: number)\n {\n if (this._direction === value)\n {\n return;\n }\n this._direction = value;\n\n const radians = value * DEG_TO_RAD;\n\n this.uniforms.sinDir = Math.sin(radians);\n this.uniforms.cosDir = Math.cos(radians);\n }\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point|number[]}\n */\n get red(): PointLike\n {\n return this.uniforms.red;\n }\n set red(value: PointLike)\n {\n this.uniforms.red = value;\n }\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point|number[]}\n */\n get green(): PointLike\n {\n return this.uniforms.green;\n }\n set green(value: PointLike)\n {\n this.uniforms.green = value;\n }\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point|number[]}\n */\n get blue(): PointLike\n {\n return this.uniforms.blue;\n }\n set blue(value: PointLike)\n {\n this.uniforms.blue = value;\n }\n\n /**\n * Removes all references\n */\n destroy(): void\n {\n this.texture?.destroy(true);\n this.texture\n = this._canvas\n = this.red\n = this.green\n = this.blue\n = this._sizes\n = this._offsets = null as any;\n }\n}\n\nexport { GlitchFilter };\nexport type { GlitchFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './glow.frag';\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\ninterface GlowFilterOptions {\n distance: number;\n outerStrength: number;\n innerStrength: number;\n color: number;\n quality: number;\n knockout: boolean;\n}\n\n/**\n * GlowFilter, originally by mishaa\n * [codepen]{@link http://codepen.io/mishaa/pen/raKzrm}.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glow.png)\n * @class\n *\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glow|@pixi/filter-glow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * someSprite.filters = [\n * new GlowFilter({ distance: 15, outerStrength: 2 })\n * ];\n */\nclass GlowFilter extends Filter\n{\n /** Default values for options. */\n static readonly defaults: GlowFilterOptions = {\n distance: 10,\n outerStrength: 4,\n innerStrength: 0,\n color: 0xffffff,\n quality: 0.1,\n knockout: false,\n };\n\n /**\n * @param {number} [options] - Options for glow.\n * @param {number} [options.distance=10] - The distance of the glow. Make it 2 times more for resolution=2.\n * It can't be changed after filter creation.\n * @param {number} [options.outerStrength=4] - The strength of the glow outward from the edge of the sprite.\n * @param {number} [options.innerStrength=0] - The strength of the glow inward from the edge of the sprite.\n * @param {number} [options.color=0xffffff] - The color of the glow.\n * @param {number} [options.quality=0.1] - A number between 0 and 1 that describes the quality of the glow.\n * The higher the number the less performant.\n * @param {boolean} [options.knockout=false] - Toggle to hide the contents and only show glow.\n */\n constructor(options?: Partial)\n {\n const opts: GlowFilterOptions = Object.assign({}, GlowFilter.defaults, options);\n const {\n outerStrength,\n innerStrength,\n color,\n knockout,\n quality } = opts;\n\n const distance = Math.round(opts.distance);\n\n super(vertex, fragment\n .replace(/__ANGLE_STEP_SIZE__/gi, `${(1 / quality / distance).toFixed(7)}`)\n .replace(/__DIST__/gi, `${distance.toFixed(0)}.0`));\n\n this.uniforms.glowColor = new Float32Array([0, 0, 0, 1]);\n\n Object.assign(this, {\n color,\n outerStrength,\n innerStrength,\n padding: distance,\n knockout,\n });\n }\n\n /**\n * The color of the glow.\n * @default 0xFFFFFF\n */\n get color(): number\n {\n return rgb2hex(this.uniforms.glowColor);\n }\n set color(value: number)\n {\n hex2rgb(value, this.uniforms.glowColor);\n }\n\n /**\n * The strength of the glow outward from the edge of the sprite.\n * @default 4\n */\n get outerStrength(): number\n {\n return this.uniforms.outerStrength;\n }\n set outerStrength(value: number)\n {\n this.uniforms.outerStrength = value;\n }\n\n /**\n * The strength of the glow inward from the edge of the sprite.\n * @default 0\n */\n get innerStrength(): number\n {\n return this.uniforms.innerStrength;\n }\n set innerStrength(value: number)\n {\n this.uniforms.innerStrength = value;\n }\n\n /**\n * Only draw the glow, not the texture itself\n * @default false\n */\n get knockout(): boolean\n {\n return this.uniforms.knockout;\n }\n set knockout(value: boolean)\n {\n this.uniforms.knockout = value;\n }\n}\n\nexport { GlowFilter };\nexport type { GlowFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport perlin from './perlin.frag';\nimport fragment from './gorday.frag';\nimport { Filter } from '@pixi/core';\nimport { Point, DEG_TO_RAD } from '@pixi/math';\nimport type { Rectangle } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ninterface GodrayFilterOptions {\n angle: number;\n gain: number;\n lacunarity: number;\n parallel: boolean;\n time: number;\n center: number[] | Point;\n alpha: number;\n}\n\n/**\n * GordayFilter, {@link https://codepen.io/alaingalvan originally} by Alain Galvan\n *\n *\n *\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/godray.gif)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-godray|@pixi/filter-godray}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * displayObject.filters = [new GodrayFilter()];\n */\nclass GodrayFilter extends Filter\n{\n /** Default for constructior options. */\n public static readonly defaults: GodrayFilterOptions = {\n angle: 30,\n gain: 0.5,\n lacunarity: 2.5,\n time: 0,\n parallel: true,\n center: [0, 0],\n alpha: 1,\n };\n\n /**\n * `true` if light rays are parallel (uses angle),\n * `false` to use the focal `center` point\n */\n public parallel = true;\n\n /**\n * The position of the emitting point for light rays\n * only used if `parallel` is set to `false`.\n */\n public center: number[] | Point;\n\n /** The current time. */\n public time = 0;\n\n private _angleLight: Point;\n private _angle = 0;\n\n /**\n * @param {object} [options] - Filter options\n * @param {number} [options.angle=30] - Angle/Light-source of the rays.\n * @param {number} [options.gain=0.5] - General intensity of the effect.\n * @param {number} [options.lacunarity=2.5] - The density of the fractal noise.\n * @param {boolean} [options.parallel=true] - `true` to use `angle`, `false` to use `center`\n * @param {number} [options.time=0] - The current time position.\n * @param {PIXI.Point|number[]} [options.center=[0,0]] - Focal point for non-parallel rays,\n * to use this `parallel` must be set to `false`.\n * @param {number} [options.alpha=1.0] - the alpha, defaults to 1, affects transparency of rays\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment.replace('${perlin}', perlin));\n\n this.uniforms.dimensions = new Float32Array(2);\n\n const opts: GodrayFilterOptions = Object.assign(GodrayFilter.defaults, options);\n\n this._angleLight = new Point();\n this.angle = opts.angle;\n this.gain = opts.gain;\n this.lacunarity = opts.lacunarity;\n this.alpha = opts.alpha;\n this.parallel = opts.parallel;\n this.center = opts.center;\n this.time = opts.time;\n }\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const { width, height } = input.filterFrame as Rectangle;\n\n this.uniforms.light = this.parallel ? this._angleLight : this.center;\n\n this.uniforms.parallel = this.parallel;\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n this.uniforms.time = this.time;\n this.uniforms.alpha = this.alpha;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * The angle/light-source of the rays in degrees. For instance, a value of 0 is vertical rays,\n * values of 90 or -90 produce horizontal rays.\n * @default 30\n */\n get angle(): number\n {\n return this._angle;\n }\n set angle(value: number)\n {\n this._angle = value;\n\n const radians = value * DEG_TO_RAD;\n\n this._angleLight.x = Math.cos(radians);\n this._angleLight.y = Math.sin(radians);\n }\n\n /**\n * General intensity of the effect. A value closer to 1 will produce a more intense effect,\n * where a value closer to 0 will produce a subtler effect.\n * @default 0.5\n */\n get gain(): number\n {\n return this.uniforms.gain;\n }\n set gain(value: number)\n {\n this.uniforms.gain = value;\n }\n\n /**\n * The density of the fractal noise. A higher amount produces more rays and a smaller amound\n * produces fewer waves.\n * @default 2.5\n */\n get lacunarity(): number\n {\n return this.uniforms.lacunarity;\n }\n set lacunarity(value: number)\n {\n this.uniforms.lacunarity = value;\n }\n\n /**\n * The alpha (opacity) of the rays. 0 is fully transparent, 1 is fully opaque.\n * @default 1\n */\n get alpha(): number\n {\n return this.uniforms.alpha;\n }\n set alpha(value: number)\n {\n this.uniforms.alpha = value;\n }\n}\n\nexport { GodrayFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './motion-blur.frag';\nimport { Filter } from '@pixi/core';\nimport { ObservablePoint, Point } from '@pixi/math';\nimport type { IPoint } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\n/**\n * The MotionBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/motion-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-motion-blur|@pixi/filter-motion-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass MotionBlurFilter extends Filter\n{\n /**\n * The kernelSize of the blur, higher values are slower but look better.\n * Use odd value greater than 5.\n */\n public kernelSize = 5;\n\n private _velocity: IPoint;\n\n /**\n * @param {PIXI.ObservablePoint|PIXI.Point|number[]} [velocity=[0, 0]] - Sets the velocity of the motion for blur effect.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. Must be odd number >= 5\n * @param {number} [offset=0] - The offset of the blur filter.\n */\n constructor(velocity: number[] | Point | ObservablePoint = [0, 0], kernelSize = 5, offset = 0)\n {\n super(vertex, fragment);\n this.uniforms.uVelocity = new Float32Array(2);\n this._velocity = new ObservablePoint(this.velocityChanged, this);\n this.setVelocity(velocity);\n\n this.kernelSize = kernelSize;\n this.offset = offset;\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n const { x, y } = this.velocity;\n\n this.uniforms.uKernelSize = (x !== 0 || y !== 0) ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * Sets the velocity of the motion for blur effect.\n *\n * @member {PIXI.ObservablePoint|PIXI.Point|number[]}\n */\n set velocity(value: IPoint)\n {\n this.setVelocity(value);\n }\n get velocity(): IPoint\n {\n return this._velocity;\n }\n\n /**\n * Set velocity with more broad types\n */\n private setVelocity(value: IPoint | number[])\n {\n if (Array.isArray(value))\n {\n const [x, y] = value;\n\n this._velocity.set(x, y);\n }\n else\n {\n this._velocity.copyFrom(value);\n }\n }\n\n /**\n * Handle velocity changed\n * @private\n */\n private velocityChanged()\n {\n this.uniforms.uVelocity[0] = this._velocity.x;\n this.uniforms.uVelocity[1] = this._velocity.y;\n\n // The padding will be increased as the velocity and intern the blur size is changed\n this.padding = (Math.max(Math.abs(this._velocity.x), Math.abs(this._velocity.y)) >> 0) + 1;\n }\n\n /**\n * The offset of the blur filter.\n * @default 0\n */\n set offset(value: number)\n {\n this.uniforms.uOffset = value;\n }\n\n get offset(): number\n {\n return this.uniforms.uOffset;\n }\n}\n\nexport { MotionBlurFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './multi-color-replace.frag';\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\ntype Color = number | number[] | Float32Array;\n\n/**\n * Filter for replacing a color with another color. Similar to ColorReplaceFilter, but support multiple\n * colors.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/multi-color-replace.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-multi-color-replace|@pixi/filter-multi-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * // replaces pure red with pure blue, and replaces pure green with pure white\n * someSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [0xFF0000, 0x0000FF],\n * [0x00FF00, 0xFFFFFF]\n * ],\n * 0.001\n * )];\n *\n * You also could use [R, G, B] as the color\n * someOtherSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [ [1,0,0], [0,0,1] ],\n * [ [0,1,0], [1,1,1] ]\n * ],\n * 0.001\n * )];\n *\n */\nclass MultiColorReplaceFilter extends Filter\n{\n private _replacements: Array<[Color, Color]> = [];\n private _maxColors = 0;\n\n /**\n * @param {Array} replacements - The collection of replacement items. Each item is color-pair\n * (an array length is 2). In the pair, the first value is original color , the second value\n * is target color.\n * @param {number} [epsilon=0.05] - Tolerance of the floating-point comparison between colors\n * (lower = more exact, higher = more inclusive)\n * @param {number} [maxColors] - The maximum number of replacements filter is able to use. Because the\n * fragment is only compiled once, this cannot be changed after construction.\n * If omitted, the default value is the length of `replacements`.\n */\n constructor(replacements: Array<[Color, Color]>, epsilon = 0.05, maxColors: number = replacements.length)\n {\n super(vertex, fragment.replace(/%maxColors%/g, (maxColors).toFixed(0)));\n\n this.epsilon = epsilon;\n this._maxColors = maxColors;\n this.uniforms.originalColors = new Float32Array(maxColors * 3);\n this.uniforms.targetColors = new Float32Array(maxColors * 3);\n this.replacements = replacements;\n }\n\n /**\n * The source and target colors for replacement. See constructor for information on the format.\n *\n * @member {Array}\n */\n set replacements(replacements: Array<[Color, Color]>)\n {\n const originals = this.uniforms.originalColors;\n const targets = this.uniforms.targetColors;\n const colorCount = replacements.length;\n\n if (colorCount > this._maxColors)\n {\n throw new Error(`Length of replacements (${colorCount}) exceeds the maximum colors length (${this._maxColors})`);\n }\n\n // Fill with negative values\n originals[colorCount * 3] = -1;\n\n for (let i = 0; i < colorCount; i++)\n {\n const pair = replacements[i];\n\n // for original colors\n let color = pair[0];\n\n if (typeof color === 'number')\n {\n color = hex2rgb(color);\n }\n else\n {\n pair[0] = rgb2hex(color);\n }\n\n originals[i * 3] = color[0];\n originals[(i * 3) + 1] = color[1];\n originals[(i * 3) + 2] = color[2];\n\n // for target colors\n let targetColor = pair[1];\n\n if (typeof targetColor === 'number')\n {\n targetColor = hex2rgb(targetColor);\n }\n else\n {\n pair[1] = rgb2hex(targetColor);\n }\n\n targets[i * 3] = targetColor[0];\n targets[(i * 3) + 1] = targetColor[1];\n targets[(i * 3) + 2] = targetColor[2];\n }\n\n this._replacements = replacements;\n }\n get replacements(): Array<[Color, Color]>\n {\n return this._replacements;\n }\n\n /**\n * Should be called after changing any of the contents of the replacements.\n * This is a convenience method for resetting the `replacements`.\n */\n refresh(): void\n {\n this.replacements = this._replacements;\n }\n\n /**\n * The maximum number of color replacements supported by this filter. Can be changed\n * _only_ during construction.\n * @readonly\n */\n get maxColors(): number\n {\n return this._maxColors;\n }\n\n /**\n * Tolerance of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n * @default 0.05\n */\n set epsilon(value: number)\n {\n this.uniforms.epsilon = value;\n }\n get epsilon(): number\n {\n return this.uniforms.epsilon;\n }\n}\n\nexport { MultiColorReplaceFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './old-film.frag';\nimport { Filter } from '@pixi/core';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ninterface OldFilmFilterOptions {\n sepia: number;\n noise: number;\n noiseSize: number;\n scratch: number;\n scratchDensity: number;\n scratchWidth: number;\n vignetting: number;\n vignettingAlpha: number;\n vignettingBlur: number;\n}\n\n/**\n * The OldFilmFilter applies a Old film effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/old-film.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-old-film|@pixi/filter-old-film}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass OldFilmFilter extends Filter\n{\n /** Default constructor options */\n public static readonly defaults: OldFilmFilterOptions = {\n sepia: 0.3,\n noise: 0.3,\n noiseSize: 1.0,\n scratch: 0.5,\n scratchDensity: 0.3,\n scratchWidth: 1.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n };\n\n /** A see value to apply to the random noise generation */\n public seed = 0;\n\n /**\n * @param {object|number} [options] - The optional parameters of old film effect.\n * When options is a number , it will be `seed`\n * @param {number} [options.sepia=0.3] - The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less, and a value of\n * `0` produces no sepia effect\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.scratch=0.5] - How often scratches appear\n * @param {number} [options.scratchDensity=0.3] - The density of the number of scratches\n * @param {number} [options.scratchWidth=1.0] - The width of the scratches\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [seed=0] - A see value to apply to the random noise generation\n */\n constructor(options?: Partial, seed = 0)\n {\n super(vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n if (typeof options === 'number')\n {\n this.seed = options;\n options = undefined;\n }\n else\n {\n this.seed = seed;\n }\n\n Object.assign(this, OldFilmFilter.defaults, options);\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.dimensions[0] = input.filterFrame?.width;\n this.uniforms.dimensions[1] = input.filterFrame?.height;\n\n // named `seed` because in the most programming languages,\n // `random` used for \"the function for generating random value\".\n this.uniforms.seed = this.seed;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less,\n * and a value of `0` produces no sepia effect\n * @default 0\n */\n set sepia(value: number)\n {\n this.uniforms.sepia = value;\n }\n\n get sepia(): number\n {\n return this.uniforms.sepia;\n }\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n * @default 0\n */\n set noise(value: number)\n {\n this.uniforms.noise = value;\n }\n\n get noise(): number\n {\n return this.uniforms.noise;\n }\n\n /**\n * The size of the noise particles\n * @default 0\n */\n set noiseSize(value: number)\n {\n this.uniforms.noiseSize = value;\n }\n\n get noiseSize(): number\n {\n return this.uniforms.noiseSize;\n }\n\n /**\n * How often scratches appear\n * @default 0\n */\n set scratch(value: number)\n {\n this.uniforms.scratch = value;\n }\n\n get scratch(): number\n {\n return this.uniforms.scratch;\n }\n\n /**\n * The density of the number of scratches\n * @default 0\n */\n set scratchDensity(value: number)\n {\n this.uniforms.scratchDensity = value;\n }\n\n get scratchDensity(): number\n {\n return this.uniforms.scratchDensity;\n }\n\n /**\n * The width of the scratches\n * @default 0\n */\n set scratchWidth(value: number)\n {\n this.uniforms.scratchWidth = value;\n }\n\n get scratchWidth(): number\n {\n return this.uniforms.scratchWidth;\n }\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @default 0\n */\n set vignetting(value: number)\n {\n this.uniforms.vignetting = value;\n }\n\n get vignetting(): number\n {\n return this.uniforms.vignetting;\n }\n\n /**\n * Amount of opacity of vignette\n * @default 0\n */\n set vignettingAlpha(value: number)\n {\n this.uniforms.vignettingAlpha = value;\n }\n\n get vignettingAlpha(): number\n {\n return this.uniforms.vignettingAlpha;\n }\n\n /**\n * Blur intensity of the vignette\n * @default 0\n */\n set vignettingBlur(value: number)\n {\n this.uniforms.vignettingBlur = value;\n }\n\n get vignettingBlur(): number\n {\n return this.uniforms.vignettingBlur;\n }\n}\n\nexport { OldFilmFilter };\nexport type { OldFilmFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './outline.frag';\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\n/**\n * OutlineFilter, originally by mishaa\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966\n * http://codepen.io/mishaa/pen/emGNRB
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/outline.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-outline|@pixi/filter-outline}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters} *\n * @example\n * someSprite.filters = [new OutlineFilter(2, 0x99ff99)];\n */\nclass OutlineFilter extends Filter\n{\n /** The minimum number of samples for rendering outline. */\n public static MIN_SAMPLES = 1;\n\n /** The maximum number of samples for rendering outline. */\n public static MAX_SAMPLES = 100;\n\n private _thickness = 1;\n\n /**\n * @param {number} [thickness=1] - The tickness of the outline. Make it 2 times more for resolution 2\n * @param {number} [color=0x000000] - The color of the outline.\n * @param {number} [quality=0.1] - The quality of the outline from `0` to `1`, using a higher quality\n * setting will result in slower performance and more accuracy.\n */\n constructor(thickness = 1, color = 0x000000, quality = 0.1)\n {\n super(vertex, fragment.replace(/\\$\\{angleStep\\}/, OutlineFilter.getAngleStep(quality)));\n\n this.uniforms.thickness = new Float32Array([0, 0]);\n this.uniforms.outlineColor = new Float32Array([0, 0, 0, 1]);\n\n Object.assign(this, { thickness, color, quality });\n }\n\n /**\n * Get the angleStep by quality\n * @private\n */\n private static getAngleStep(quality: number): string\n {\n const samples = Math.max(\n quality * OutlineFilter.MAX_SAMPLES,\n OutlineFilter.MIN_SAMPLES,\n );\n\n return (Math.PI * 2 / samples).toFixed(7);\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.thickness[0] = this._thickness / input._frame.width;\n this.uniforms.thickness[1] = this._thickness / input._frame.height;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * The color of the glow.\n * @default 0x000000\n */\n get color(): number\n {\n return rgb2hex(this.uniforms.outlineColor);\n }\n set color(value: number)\n {\n hex2rgb(value, this.uniforms.outlineColor);\n }\n\n /**\n * The thickness of the outline.\n * @default 1\n */\n get thickness(): number\n {\n return this._thickness;\n }\n set thickness(value: number)\n {\n this._thickness = value;\n this.padding = value;\n }\n}\n\nexport { OutlineFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './pixelate.frag';\nimport { Filter } from '@pixi/core';\nimport type { Point } from '@pixi/math';\n\ntype Size = number | number[] | Point;\n\n/**\n * This filter applies a pixelate effect making display objects appear 'blocky'.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/pixelate.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-pixelate|@pixi/filter-pixelate}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass PixelateFilter extends Filter\n{\n /**\n * @param {PIXI.Point|Array|number} [size=10] - Either the width/height of the size of the pixels, or square size\n */\n constructor(size: Size = 10)\n {\n super(vertex, fragment);\n this.size = size;\n }\n\n /**\n * This a point that describes the size of the blocks.\n * x is the width of the block and y is the height.\n *\n * @member {PIXI.Point|Array|number}\n * @default 10\n */\n get size(): Size\n {\n return this.uniforms.size;\n }\n set size(value: Size)\n {\n if (typeof value === 'number')\n {\n value = [value, value];\n }\n this.uniforms.size = value;\n }\n}\n\nexport { PixelateFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './radial-blur.frag';\nimport { Filter } from '@pixi/core';\nimport type { Point } from '@pixi/math';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype PointLike = Point | number[];\n\n/**\n * The RadialBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/radial-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-radial-blur|@pixi/filter-radial-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass RadialBlurFilter extends Filter\n{\n private _angle = 0;\n\n /**\n * The kernelSize for the blur filter. Must be odd number >= 3.\n * @default 5\n */\n public kernelSize: number;\n\n /**\n * @param {number} [angle=0] - Sets the angle of the motion for blur effect.\n * @param {PIXI.Point|number[]} [center=[0,0]] - The center of the radial.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. Must be odd number >= 3\n * @param {number} [radius=-1] - The maximum size of the blur radius, `-1` is infinite\n */\n constructor(angle = 0, center: PointLike = [0, 0], kernelSize = 5, radius = -1)\n {\n super(vertex, fragment);\n\n this.angle = angle;\n this.center = center;\n this.kernelSize = kernelSize;\n this.radius = radius;\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.uKernelSize = this._angle !== 0 ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * Sets the angle in degrees of the motion for blur effect.\n * @default 0\n */\n set angle(value: number)\n {\n this._angle = value;\n this.uniforms.uRadian = value * Math.PI / 180;\n }\n\n get angle(): number\n {\n return this._angle;\n }\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n get center(): PointLike\n {\n return this.uniforms.uCenter;\n }\n\n set center(value: PointLike)\n {\n this.uniforms.uCenter = value;\n }\n\n /**\n * Outer radius of the effect. The default value of `-1` is infinite.\n * @default -1\n */\n get radius(): number\n {\n return this.uniforms.uRadius;\n }\n\n set radius(value: number)\n {\n if (value < 0 || value === Infinity)\n {\n value = -1;\n }\n this.uniforms.uRadius = value;\n }\n}\n\nexport { RadialBlurFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './reflection.frag';\nimport { Filter } from '@pixi/core';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype Range = number[] | Float32Array;\n\ninterface ReflectionFilterOptions {\n mirror: boolean;\n boundary: number;\n amplitude: Range;\n waveLength: Range;\n alpha: Range;\n time: number;\n}\n\n/**\n * Applies a reflection effect to simulate the reflection on water with waves.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/reflection.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-reflection|@pixi/filter-reflection}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass ReflectionFilter extends Filter\n{\n /** Default constructor options */\n public static readonly defaults: ReflectionFilterOptions = {\n mirror: true,\n boundary: 0.5,\n amplitude: [0, 20],\n waveLength: [30, 100],\n alpha: [1, 1],\n time: 0,\n };\n\n /** Time for animating position of waves */\n public time = 0;\n\n /**\n * @param {object} [options] - The optional parameters of Reflection effect.\n * @param {number} [options.mirror=true] - `true` to reflect the image, `false` for waves-only\n * @param {number} [options.boundary=0.5] - Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n * @param {number} [options.amplitude=[0, 20]] - Starting and ending amplitude of waves\n * @param {number} [options.waveLength=[30, 100]] - Starting and ending length of waves\n * @param {number} [options.alpha=[1, 1]] - Starting and ending alpha values\n * @param {number} [options.time=0] - Time for animating position of waves\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n this.uniforms.amplitude = new Float32Array(2);\n this.uniforms.waveLength = new Float32Array(2);\n this.uniforms.alpha = new Float32Array(2);\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, ReflectionFilter.defaults, options);\n }\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.dimensions[0] = input.filterFrame?.width;\n this.uniforms.dimensions[1] = input.filterFrame?.height;\n\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * `true` to reflect the image, `false` for waves-only\n * @default true\n */\n set mirror(value: boolean)\n {\n this.uniforms.mirror = value;\n }\n get mirror(): boolean\n {\n return this.uniforms.mirror;\n }\n\n /**\n * Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n * @default 0.5\n */\n set boundary(value: number)\n {\n this.uniforms.boundary = value;\n }\n get boundary(): number\n {\n return this.uniforms.boundary;\n }\n\n /**\n * Starting and ending amplitude of waves\n * @member {number[]}\n * @default [0, 20]\n */\n set amplitude(value: Range)\n {\n this.uniforms.amplitude[0] = value[0];\n this.uniforms.amplitude[1] = value[1];\n }\n get amplitude(): Range\n {\n return this.uniforms.amplitude;\n }\n\n /**\n * Starting and ending length of waves\n * @member {number[]}\n * @default [30, 100]\n */\n set waveLength(value: Range)\n {\n this.uniforms.waveLength[0] = value[0];\n this.uniforms.waveLength[1] = value[1];\n }\n get waveLength(): Range\n {\n return this.uniforms.waveLength;\n }\n\n /**\n * Starting and ending alpha values\n * @member {number[]}\n * @default [1, 1]\n */\n set alpha(value: Range)\n {\n this.uniforms.alpha[0] = value[0];\n this.uniforms.alpha[1] = value[1];\n }\n get alpha(): Range\n {\n return this.uniforms.alpha;\n }\n}\n\nexport { ReflectionFilter };\nexport type { ReflectionFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './rgb-split.frag';\nimport { Filter } from '@pixi/core';\nimport type { Point } from '@pixi/math';\n\ntype Offset = [number, number] | Point;\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/rgb.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-rgb-split|@pixi/filter-rgb-split}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass RGBSplitFilter extends Filter\n{\n /**\n * @param {PIXI.Point | number[]} [red=[-10,0]] - Red channel offset\n * @param {PIXI.Point | number[]} [green=[0, 10]] - Green channel offset\n * @param {PIXI.Point | number[]} [blue=[0, 0]] - Blue channel offset\n */\n constructor(red: Offset = [-10, 0], green: Offset = [0, 10], blue: Offset = [0, 0])\n {\n super(vertex, fragment);\n this.red = red;\n this.green = green;\n this.blue = blue;\n }\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point | number[]}\n */\n get red(): Offset\n {\n return this.uniforms.red;\n }\n set red(value: Offset)\n {\n this.uniforms.red = value;\n }\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point | number[]}\n */\n get green(): Offset\n {\n return this.uniforms.green;\n }\n set green(value: Offset)\n {\n this.uniforms.green = value;\n }\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point | number[]}\n */\n get blue(): Offset\n {\n return this.uniforms.blue;\n }\n set blue(value: Offset)\n {\n this.uniforms.blue = value;\n }\n}\n\nexport { RGBSplitFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './shockwave.frag';\nimport { Filter } from '@pixi/core';\nimport type { FilterSystem, RenderTexture } from '@pixi/core';\nimport type { Point } from '@pixi/math';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\ntype PointLike = Point|number[];\n\ninterface ShockwaveFilterOptions {\n amplitude: number;\n wavelength: number;\n speed: number;\n brightness: number;\n radius: number;\n}\n\n/**\n * The ShockwaveFilter class lets you apply a shockwave effect.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/shockwave.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-shockwave|@pixi/filter-shockwave}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass ShockwaveFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: ShockwaveFilterOptions = {\n amplitude: 30.0,\n wavelength: 160.0,\n brightness: 1.0,\n speed: 500.0,\n radius: -1.0,\n };\n\n /**\n * Sets the elapsed time of the shockwave.\n * It could control the current size of shockwave.\n */\n public time: number;\n\n /**\n * @param {PIXI.Point|number[]} [center=[0.5, 0.5]] - See `center` property.\n * @param {object} [options] - The optional parameters of shockwave filter.\n * @param {number} [options.amplitude=0.5] - See `amplitude`` property.\n * @param {number} [options.wavelength=1.0] - See `wavelength` property.\n * @param {number} [options.speed=500.0] - See `speed` property.\n * @param {number} [options.brightness=8] - See `brightness` property.\n * @param {number} [options.radius=4] - See `radius` property.\n * @param {number} [time=0] - See `time` property.\n */\n constructor(center: PointLike = [0, 0], options?: Partial, time = 0)\n {\n super(vertex, fragment);\n this.center = center;\n Object.assign(this, ShockwaveFilter.defaults, options);\n this.time = time;\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n // There is no set/get of `time`, for performance.\n // Because in the most real cases, `time` will be changed in ever game tick.\n // Use set/get will take more function-call.\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * Sets the center of the shockwave in normalized screen coords. That is\n * (0,0) is the top-left and (1,1) is the bottom right.\n *\n * @member {PIXI.Point|number[]}\n */\n get center(): PointLike\n {\n return this.uniforms.center;\n }\n set center(value: PointLike)\n {\n this.uniforms.center = value;\n }\n\n /**\n * The amplitude of the shockwave.\n */\n get amplitude(): number\n {\n return this.uniforms.amplitude;\n }\n set amplitude(value: number)\n {\n this.uniforms.amplitude = value;\n }\n\n /**\n * The wavelength of the shockwave.\n */\n get wavelength(): number\n {\n return this.uniforms.wavelength;\n }\n set wavelength(value: number)\n {\n this.uniforms.wavelength = value;\n }\n\n /**\n * The brightness of the shockwave.\n */\n get brightness(): number\n {\n return this.uniforms.brightness;\n }\n set brightness(value: number)\n {\n this.uniforms.brightness = value;\n }\n\n /**\n * The speed about the shockwave ripples out.\n * The unit is `pixel/second`\n */\n get speed(): number\n {\n return this.uniforms.speed;\n }\n set speed(value: number)\n {\n this.uniforms.speed = value;\n }\n\n /**\n * The maximum radius of shockwave.\n * `< 0.0` means it's infinity.\n */\n get radius(): number\n {\n return this.uniforms.radius;\n }\n set radius(value: number)\n {\n this.uniforms.radius = value;\n }\n}\n\nexport { ShockwaveFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './simpleLightmap.frag';\nimport { Filter } from '@pixi/core';\nimport type { Texture, FilterSystem, RenderTexture } from '@pixi/core';\nimport type { CLEAR_MODES } from '@pixi/constants';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\ntype Color = number | number[];\n\n/**\n* SimpleLightmap, originally by Oza94\n* http://www.html5gamedevs.com/topic/20027-pixijs-simple-lightmapping/\n* http://codepen.io/Oza94/pen/EPoRxj\n*\n* You have to specify filterArea, or suffer consequences.\n* You may have to use it with `filter.dontFit = true`,\n* until we rewrite this using same approach as for DisplacementFilter.\n*\n* ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/simple-lightmap.png)\n* @class\n* @extends PIXI.Filter\n* @memberof PIXI.filters\n* @see {@link https://www.npmjs.com/package/@pixi/filter-simple-lightmap|@pixi/filter-simple-lightmap}\n* @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n*\n* @example\n* displayObject.filters = [new SimpleLightmapFilter(texture, 0x666666)];\n*/\nclass SimpleLightmapFilter extends Filter\n{\n private _color = 0x0;\n\n /**\n * @param {PIXI.Texture} texture - a texture where your lightmap is rendered\n * @param {Array|number} [color=0x000000] - An RGBA array of the ambient color\n * @param {number} [alpha=1] - Default alpha set independent of color (if it's a number, not array).\n */\n constructor(texture: Texture, color: Color = 0x000000, alpha = 1)\n {\n super(vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n this.uniforms.ambientColor = new Float32Array([0, 0, 0, alpha]);\n this.texture = texture;\n this.color = color;\n }\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clear: CLEAR_MODES): void\n {\n this.uniforms.dimensions[0] = input.filterFrame?.width;\n this.uniforms.dimensions[1] = input.filterFrame?.height;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n }\n\n /**\n * a texture where your lightmap is rendered\n * @member {PIXI.Texture}\n */\n get texture(): Texture\n {\n return this.uniforms.uLightmap;\n }\n set texture(value: Texture)\n {\n this.uniforms.uLightmap = value;\n }\n\n /**\n * An RGBA array of the ambient color or a hex color without alpha\n * @member {Array|number}\n */\n set color(value: Color)\n {\n const arr = this.uniforms.ambientColor;\n\n if (typeof value === 'number')\n {\n hex2rgb(value, arr);\n this._color = value;\n }\n else\n {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n arr[3] = value[3];\n this._color = rgb2hex(arr);\n }\n }\n get color(): Color\n {\n return this._color;\n }\n\n /**\n * When setting `color` as hex, this can be used to set alpha independently.\n */\n get alpha(): number\n {\n return this.uniforms.ambientColor[3];\n }\n set alpha(value: number)\n {\n this.uniforms.ambientColor[3] = value;\n }\n}\n\nexport { SimpleLightmapFilter };\n","import { vertex } from '@tools/fragments';\nimport fragment from './tilt-shift.frag';\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\n// @author Vico @vicocotea\n// original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n// by Evan Wallace : http://madebyevan.com/\n\n/**\n * A TiltShiftAxisFilter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @private\n */\nclass TiltShiftAxisFilter extends Filter\n{\n constructor(blur = 100, gradientBlur = 600, start?: Point, end?: Point)\n {\n super(vertex, fragment);\n this.uniforms.blur = blur;\n this.uniforms.gradientBlur = gradientBlur;\n this.uniforms.start = start || new Point(0, window.innerHeight / 2);\n this.uniforms.end = end || new Point(600, window.innerHeight / 2);\n this.uniforms.delta = new Point(30, 30);\n this.uniforms.texSize = new Point(window.innerWidth, window.innerHeight);\n this.updateDelta();\n }\n\n /**\n * Updates the filter delta values.\n * This is overridden in the X and Y filters, does nothing for this class.\n *\n */\n protected updateDelta(): void\n {\n this.uniforms.delta.x = 0;\n this.uniforms.delta.y = 0;\n }\n\n /**\n * The strength of the blur.\n *\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n get blur(): number\n {\n return this.uniforms.blur;\n }\n set blur(value: number)\n {\n this.uniforms.blur = value;\n }\n\n /**\n * The strength of the gradient blur.\n *\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n get gradientBlur(): number\n {\n return this.uniforms.gradientBlur;\n }\n set gradientBlur(value: number)\n {\n this.uniforms.gradientBlur = value;\n }\n\n /**\n * The X value to start the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n get start(): Point\n {\n return this.uniforms.start;\n }\n set start(value: Point)\n {\n this.uniforms.start = value;\n this.updateDelta();\n }\n\n /**\n * The X value to end the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n get end(): Point\n {\n return this.uniforms.end;\n }\n set end(value: Point)\n {\n this.uniforms.end = value;\n this.updateDelta();\n }\n}\n\nexport { TiltShiftAxisFilter };\n","import { TiltShiftAxisFilter } from './TiltShiftAxisFilter';\n\n// @author Vico @vicocotea\n// original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n// by Evan Wallace : http://madebyevan.com/\n\n/**\n * A TiltShiftXFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nclass TiltShiftXFilter extends TiltShiftAxisFilter\n{\n /**\n * Updates the filter delta values.\n */\n protected updateDelta(): void\n {\n const dx = this.uniforms.end.x - this.uniforms.start.x;\n const dy = this.uniforms.end.y - this.uniforms.start.y;\n const d = Math.sqrt((dx * dx) + (dy * dy));\n\n this.uniforms.delta.x = dx / d;\n this.uniforms.delta.y = dy / d;\n }\n}\n\nexport { TiltShiftXFilter };\n","import { TiltShiftAxisFilter } from './TiltShiftAxisFilter';\n\n// @author Vico @vicocotea\n// original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n// by Evan Wallace : http://madebyevan.com/\n\n/**\n * A TiltShiftYFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nclass TiltShiftYFilter extends TiltShiftAxisFilter\n{\n /**\n * Updates the filter delta values.\n */\n protected updateDelta(): void\n {\n const dx = this.uniforms.end.x - this.uniforms.start.x;\n const dy = this.uniforms.end.y - this.uniforms.start.y;\n const d = Math.sqrt((dx * dx) + (dy * dy));\n\n this.uniforms.delta.x = -dy / d;\n this.uniforms.delta.y = dx / d;\n }\n}\n\nexport { TiltShiftYFilter };\n","import { TiltShiftXFilter } from './TiltShiftXFilter';\nimport { TiltShiftYFilter } from './TiltShiftYFilter';\nimport { Filter, FilterSystem, RenderTexture } from '@pixi/core';\nimport type { Point } from '@pixi/math';\nimport type { CLEAR_MODES } from '@pixi/constants';\n\n// @author Vico @vicocotea\n// original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n// by Evan Wallace : http://madebyevan.com/\n\n/**\n * A TiltShift Filter. Manages the pass of both a TiltShiftXFilter and TiltShiftYFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/tilt-shift.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-tilt-shift|@pixi/filter-tilt-shift}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass TiltShiftFilter extends Filter\n{\n private tiltShiftXFilter: TiltShiftXFilter;\n private tiltShiftYFilter: TiltShiftYFilter;\n\n /**\n * @param {number} [blur=100] - The strength of the blur.\n * @param {number} [gradientBlur=600] - The strength of the gradient blur.\n * @param {PIXI.Point} [start=null] - The Y value to start the effect at.\n * @param {PIXI.Point} [end=null] - The Y value to end the effect at.\n */\n constructor(blur = 100, gradientBlur = 600, start?: Point, end?: Point)\n {\n super();\n this.tiltShiftXFilter = new TiltShiftXFilter(blur, gradientBlur, start, end);\n this.tiltShiftYFilter = new TiltShiftYFilter(blur, gradientBlur, start, end);\n }\n\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void\n {\n const renderTarget = filterManager.getFilterTexture();\n\n this.tiltShiftXFilter.apply(filterManager, input, renderTarget, 1);\n this.tiltShiftYFilter.apply(filterManager, renderTarget, output, clearMode);\n filterManager.returnFilterTexture(renderTarget);\n }\n\n /**\n * The strength of the blur.\n */\n get blur(): number\n {\n return this.tiltShiftXFilter.blur;\n }\n set blur(value: number)\n {\n this.tiltShiftXFilter.blur = this.tiltShiftYFilter.blur = value;\n }\n\n /**\n * The strength of the gradient blur.\n */\n get gradientBlur(): number\n {\n return this.tiltShiftXFilter.gradientBlur;\n }\n set gradientBlur(value: number)\n {\n this.tiltShiftXFilter.gradientBlur = this.tiltShiftYFilter.gradientBlur = value;\n }\n\n /**\n * The Y value to start the effect at.\n *\n * @member {PIXI.Point}\n */\n get start(): Point\n {\n return this.tiltShiftXFilter.start;\n }\n set start(value: Point)\n {\n this.tiltShiftXFilter.start = this.tiltShiftYFilter.start = value;\n }\n\n /**\n * The Y value to end the effect at.\n *\n * @member {PIXI.Point}\n */\n get end(): Point\n {\n return this.tiltShiftXFilter.end;\n }\n set end(value: Point)\n {\n this.tiltShiftXFilter.end = this.tiltShiftYFilter.end = value;\n }\n}\n\nexport { TiltShiftFilter };\n\n","import { vertex } from '@tools/fragments';\nimport fragment from './twist.frag';\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\ninterface TwistFilterOptions {\n radius: number;\n angle: number;\n padding: number;\n offset: Point;\n}\n\n/**\n * This filter applies a twist effect making display objects appear twisted in the given direction.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/twist.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-twist|@pixi/filter-twist}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass TwistFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: TwistFilterOptions = {\n radius: 200,\n angle: 4,\n padding: 20,\n offset: new Point(),\n };\n\n /**\n * @param {object} [options] - Object object to use.\n * @param {number} [options.radius=200] - The radius of the twist.\n * @param {number} [options.angle=4] - The angle of the twist.\n * @param {number} [options.padding=20] - Padding for filter area.\n * @param {number} [options.offset] - Center of twist, in local, pixel coordinates.\n */\n constructor(options?: Partial)\n {\n super(vertex, fragment);\n\n Object.assign(this, TwistFilter.defaults, options);\n }\n\n /**\n * This point describes the the offset of the twist.\n *\n * @member {PIXI.Point}\n */\n get offset(): Point\n {\n return this.uniforms.offset;\n }\n set offset(value: Point)\n {\n this.uniforms.offset = value;\n }\n\n /**\n * The radius of the twist.\n */\n get radius(): number\n {\n return this.uniforms.radius;\n }\n set radius(value: number)\n {\n this.uniforms.radius = value;\n }\n\n /**\n * The angle of the twist.\n */\n get angle(): number\n {\n return this.uniforms.angle;\n }\n set angle(value: number)\n {\n this.uniforms.angle = value;\n }\n}\n\nexport { TwistFilter };\nexport type { TwistFilterOptions };\n","import { vertex } from '@tools/fragments';\nimport fragment from './zoom-blur.frag';\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\ntype PointLike = Point | number[];\n\ninterface ZoomBlurFilterOptions {\n strength: number;\n center: PointLike;\n innerRadius: number;\n radius: number;\n maxKernelSize: number;\n}\n\n/**\n * The ZoomFilter applies a Zoom blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/zoom-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-zoom-blur|@pixi/filter-zoom-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nclass ZoomBlurFilter extends Filter\n{\n /** Default constructor options. */\n public static readonly defaults: ZoomBlurFilterOptions = {\n strength: 0.1,\n center: [0, 0],\n innerRadius: 0,\n radius: -1,\n maxKernelSize: 32,\n };\n\n /**\n * @param {object} [options] - Filter options to use.\n * @param {number} [options.strength=0.1] - Sets the strength of the zoom blur effect\n * @param {PIXI.Point|number[]} [options.center=[0,0]] - The center of the zoom.\n * @param {number} [options.innerRadius=0] - The inner radius of zoom. The part in inner circle won't apply\n * zoom blur effect.\n * @param {number} [options.radius=-1] - See `radius` property.\n * @param {number} [options.maxKernelSize=32] - On older iOS devices, it's better to not go above `13.0`.\n * Decreasing this value will produce a lower-quality blur effect with more dithering.\n */\n constructor(options?: Partial)\n {\n const { maxKernelSize, ...rest }: ZoomBlurFilterOptions = Object.assign(ZoomBlurFilter.defaults, options);\n\n super(vertex, fragment.replace('${maxKernelSize}', maxKernelSize.toFixed(1)));\n\n Object.assign(this, rest);\n }\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n get center(): PointLike\n {\n return this.uniforms.uCenter;\n }\n set center(value: PointLike)\n {\n this.uniforms.uCenter = value;\n }\n\n /**\n * Intensity of the zoom effect.\n * @default 0.1\n */\n get strength(): number\n {\n return this.uniforms.uStrength;\n }\n set strength(value: number)\n {\n this.uniforms.uStrength = value;\n }\n\n /**\n * Radius of the inner region not effected by blur.\n * @default 0\n */\n get innerRadius(): number\n {\n return this.uniforms.uInnerRadius;\n }\n set innerRadius(value: number)\n {\n this.uniforms.uInnerRadius = value;\n }\n\n /**\n * Outer radius of the effect. The default value is `-1`.\n * `< 0.0` means it's infinity.\n * @default -1\n */\n get radius(): number\n {\n return this.uniforms.uRadius;\n }\n set radius(value: number)\n {\n if (value < 0 || value === Infinity)\n {\n value = -1;\n }\n this.uniforms.uRadius = value;\n }\n}\n\nexport { ZoomBlurFilter };\nexport type { ZoomBlurFilterOptions };\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","options","_super","vertex","_this","AdjustmentFilter","filterManager","input","output","clear","uniforms","gamma","Math","max","saturation","contrast","brightness","red","green","blue","alpha","applyFilter","Filter","threshold","ExtractBrightnessFilter","value","blur","quality","clamp","uOffset","Float32Array","_pixelSize","Point","pixelSize","_clamp","isArray","kernels","_blur","KawaseBlurFilter","offset","uvX","x","_frame","width","uvY","y","height","_quality","_kernels","renderTarget","getFilterTexture","source","target","tmp","last","returnFilterTexture","padding","ceil","reduce","acc","v","k","step","push","_updatePadding","round","_generateKernels","settings","FILTER_RESOLUTION","opt","AdvancedBloomFilter","defaults","bloomScale","resolution","_extractFilter","_blurFilter","currentState","brightTarget","bloomTarget","bloomTexture","_resolution","size","AsciiFilter","lightColor","shadowColor","rotation","thickness","lightAlpha","shadowAlpha","BevelFilter","transformX","_thickness","cos","_angle","transformY","sin","DEG_TO_RAD","_updateTransform","rgb2hex","hex2rgb","kernelSize","blurX","blurY","blurXFilter","BlurFilterPass","blurYFilter","blendMode","BLEND_MODES","SCREEN","defaultFilter","AlphaFilter","BloomFilter","dimensions","BulgePinchFilter","_a","filterFrame","radius","strength","center","colorMap","nearest","mix","_scaleMode","ColorMapFilter","_mix","_size","_colorMap","Texture","from","baseTexture","scaleMode","mipmap","MIPMAP_MODES","OFF","_sliceSize","_slicePixelSize","_sliceInnerSize","_nearest","SCALE_MODES","NEAREST","LINEAR","texture","_glTextures","_updateID","emit","destroyBase","destroy","color","ColorOverlayFilter","_color","arr","_alpha","originalColor","newColor","epsilon","ColorReplaceFilter","_originalColor","_newColor","matrix","texelSize","undefined","ConvolutionFilter","forEach","CRTFilter","seed","time","curvature","lineWidth","lineContrast","verticalLine","noise","noiseSize","vignetting","vignettingAlpha","vignettingBlur","scale","angle","DotFilter","DropShadowFilter","_tintFilter","shift","shadowOnly","distance","set","_distance","_updateShift","EmbossFilter","GlitchFilter","TRANSPARENT","_canvas","document","createElement","sampleSize","aspect","fillMode","_sizes","_slices","min","minSize","average","count","rest","averageWidth","w","random","ratio","sqrt","shuffle","rand","temp","_offsets","_randomizeSizes","_randomizeOffsets","redraw","ctx","getContext","clearRect","floor","fillStyle","fillRect","update","displacementMap","sizes","len","offsets","slices","slicesWidth","slicesOffset","refresh","_direction","radians","sinDir","cosDir","direction","opts","GlowFilter","outerStrength","innerStrength","knockout","replace","toFixed","glowColor","GodrayFilter","_angleLight","gain","lacunarity","parallel","light","velocity","uVelocity","_velocity","ObservablePoint","velocityChanged","setVelocity","MotionBlurFilter","uKernelSize","copyFrom","abs","replacements","maxColors","_maxColors","originalColors","targetColors","MultiColorReplaceFilter","_replacements","originals","targets","colorCount","Error","pair","targetColor","OldFilmFilter","sepia","scratch","scratchDensity","scratchWidth","OutlineFilter","getAngleStep","outlineColor","samples","MAX_SAMPLES","MIN_SAMPLES","PI","PixelateFilter","RadialBlurFilter","uRadian","uCenter","uRadius","Infinity","amplitude","waveLength","ReflectionFilter","mirror","boundary","RGBSplitFilter","ShockwaveFilter","wavelength","speed","ambientColor","SimpleLightmapFilter","uLightmap","gradientBlur","start","end","window","innerHeight","delta","texSize","innerWidth","updateDelta","TiltShiftAxisFilter","TiltShiftXFilter","dx","dy","TiltShiftYFilter","tiltShiftXFilter","tiltShiftYFilter","TiltShiftFilter","clearMode","TwistFilter","ZoomBlurFilter","maxKernelSize","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","uStrength","uInnerRadius","innerRadius"],"mappings":";;;;;;;qDAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,MAC3EN,EAAGC,IAGrB,SAASS,EAAUV,EAAGC,GAEzB,SAASU,IAAOC,KAAKC,YAAcb,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOY,OAAOb,IAAMU,EAAGJ,UAAYN,EAAEM,UAAW,IAAII,GAG5E,IAAII,EAAW,WAQlB,OAPAA,EAAWb,OAAOc,QAAU,SAAkBC,GAC1C,QAASC,cAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIb,KADT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