@caperjs/core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{config → build}/assetpack.mjs +103 -45
- package/build/defaults.mjs +157 -0
- package/build/index.mjs +96 -0
- package/build/internal/ast.mjs +255 -0
- package/build/internal/buildFlags.mjs +50 -0
- package/build/internal/discovery.mjs +402 -0
- package/build/internal/manifest.mjs +38 -0
- package/build/internal/schema.mjs +65 -0
- package/build/internal/util.mjs +30 -0
- package/build/internal/validate.mjs +186 -0
- package/build/plugins/assetTypes.mjs +460 -0
- package/build/plugins/caperConfig.mjs +489 -0
- package/build/plugins/devHelper.mjs +31 -0
- package/build/plugins/lists.mjs +286 -0
- package/build/plugins/pruneFallbacks.mjs +150 -0
- package/build/plugins/pwa.mjs +240 -0
- package/build/plugins/runtime.mjs +129 -0
- package/cli.mjs +9 -6
- package/extras/llms.txt +23 -17
- package/lib/{CaptionsPlugin-Dc8fIrjy.js → CaptionsPlugin-DKhbmJvH.js} +15 -15
- package/lib/{CaptionsPlugin-Dc8fIrjy.js.map → CaptionsPlugin-DKhbmJvH.js.map} +1 -1
- package/lib/{DataAdapter-BY2114sp.js → DataAdapter-BZFTkFQ4.js} +4 -4
- package/lib/{DataAdapter-BY2114sp.js.map → DataAdapter-BZFTkFQ4.js.map} +1 -1
- package/lib/{DebugRenderer-BJMLILqI.js → DebugRenderer-C7X-nlXE.js} +2 -2
- package/lib/{DebugRenderer-BJMLILqI.js.map → DebugRenderer-C7X-nlXE.js.map} +1 -1
- package/lib/{DevToolsPlugin-wQ5rOkn0.js → DevToolsPlugin-P-atJ-5U.js} +2 -2
- package/lib/{DevToolsPlugin-wQ5rOkn0.js.map → DevToolsPlugin-P-atJ-5U.js.map} +1 -1
- package/lib/{GSAPPlugin-DHhSZKv8.js → GSAPPlugin-CeH9275z.js} +2 -2
- package/lib/{GSAPPlugin-DHhSZKv8.js.map → GSAPPlugin-CeH9275z.js.map} +1 -1
- package/lib/{LayoutPlugin-B-DF9SYM.js → LayoutPlugin-iZ3k6RsK.js} +4 -4
- package/lib/{LayoutPlugin-B-DF9SYM.js.map → LayoutPlugin-iZ3k6RsK.js.map} +1 -1
- package/lib/{SpinePlugin-Dz_3dljz.js → SpinePlugin-BWiavCpO.js} +2 -2
- package/lib/{SpinePlugin-Dz_3dljz.js.map → SpinePlugin-BWiavCpO.js.map} +1 -1
- package/lib/{StatsPlugin-Cg82JMBD.js → StatsPlugin-CBpzDJL0.js} +4 -4
- package/lib/{StatsPlugin-Cg82JMBD.js.map → StatsPlugin-CBpzDJL0.js.map} +1 -1
- package/lib/{VoiceOverPlugin-BR3ImT8C.js → VoiceOverPlugin-YaiKJtJ6.js} +26 -26
- package/lib/{VoiceOverPlugin-BR3ImT8C.js.map → VoiceOverPlugin-YaiKJtJ6.js.map} +1 -1
- package/lib/caper.mjs +95 -95
- package/lib/caper.mjs.map +1 -1
- package/lib/core/Application.d.ts +1 -1
- package/lib/core/Application.d.ts.map +1 -1
- package/lib/core/interfaces/IApplicationOptions.d.ts +2 -1
- package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -1
- package/lib/core/interfaces/ICoreSignals.d.ts +5 -1
- package/lib/core/interfaces/ICoreSignals.d.ts.map +1 -1
- package/lib/display/Container.d.ts +1 -1
- package/lib/display/Container.d.ts.map +1 -1
- package/lib/display/ParticleContainer.d.ts +1 -1
- package/lib/display/ParticleContainer.d.ts.map +1 -1
- package/lib/plugins/Plugin.d.ts +1 -1
- package/lib/plugins/Plugin.d.ts.map +1 -1
- package/lib/plugins/defaults.d.ts.map +1 -1
- package/lib/plugins/gesture/GesturePlugin.d.ts +58 -0
- package/lib/plugins/gesture/GesturePlugin.d.ts.map +1 -0
- package/lib/plugins/gesture/gestureMath.d.ts +32 -0
- package/lib/plugins/gesture/gestureMath.d.ts.map +1 -0
- package/lib/plugins/gesture/gestureMath.test.d.ts +2 -0
- package/lib/plugins/gesture/gestureMath.test.d.ts.map +1 -0
- package/lib/plugins/gesture/index.d.ts +3 -0
- package/lib/plugins/gesture/index.d.ts.map +1 -0
- package/lib/plugins/gesture/types.d.ts +45 -0
- package/lib/plugins/gesture/types.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/input/Controls.d.ts +5 -2
- package/lib/plugins/input/Controls.d.ts.map +1 -1
- package/lib/plugins/input/InputPlugin.d.ts +9 -2
- package/lib/plugins/input/InputPlugin.d.ts.map +1 -1
- package/lib/plugins/input/interfaces.d.ts +5 -3
- package/lib/plugins/input/interfaces.d.ts.map +1 -1
- package/lib/plugins/input/touch/{TouchControls.d.ts → VirtualControls.d.ts} +5 -4
- package/lib/plugins/input/touch/VirtualControls.d.ts.map +1 -0
- package/lib/plugins/input/touch/index.d.ts +1 -1
- package/lib/plugins/input/touch/index.d.ts.map +1 -1
- package/lib/{registries-CYCaYKZI.js → registries-qQmLeN0b.js} +505 -354
- package/lib/registries-qQmLeN0b.js.map +1 -0
- package/lib/types/caper-app.d.ts +1 -0
- package/lib/utils/bind.test.d.ts +2 -0
- package/lib/utils/bind.test.d.ts.map +1 -0
- package/package.json +33 -33
- package/src/core/Application.ts +1 -1
- package/src/core/interfaces/IApplicationOptions.ts +2 -0
- package/src/core/interfaces/ICoreSignals.ts +9 -0
- package/src/display/Container.ts +1 -1
- package/src/display/ParticleContainer.ts +1 -1
- package/src/plugins/Plugin.ts +1 -1
- package/src/plugins/defaults.ts +6 -0
- package/src/plugins/gesture/GesturePlugin.ts +215 -0
- package/src/plugins/gesture/gestureMath.test.ts +75 -0
- package/src/plugins/gesture/gestureMath.ts +59 -0
- package/src/plugins/gesture/index.ts +2 -0
- package/src/plugins/gesture/types.ts +54 -0
- package/src/plugins/index.ts +1 -0
- package/src/plugins/input/Controls.ts +9 -3
- package/src/plugins/input/InputPlugin.ts +61 -14
- package/src/plugins/input/interfaces.ts +5 -3
- package/src/plugins/input/touch/{TouchControls.ts → VirtualControls.ts} +4 -1
- package/src/plugins/input/touch/index.ts +1 -1
- package/src/types/caper-app.d.ts +1 -0
- package/src/utils/bind.test.ts +99 -0
- package/src/version.ts +1 -1
- package/templates/app/default/package.template.json +8 -4
- package/templates/app/default/vite.config.ts +15 -0
- package/LICENSE +0 -22
- package/cli/vite.mjs +0 -55
- package/config/vite.mjs +0 -2464
- package/lib/plugins/input/touch/TouchControls.d.ts.map +0 -1
- package/lib/registries-CYCaYKZI.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as e } from "./registries-qQmLeN0b.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@pixi+devtools@2.0.1_pixi.js@8.19.0/node_modules/@pixi/devtools/dist/index.js
|
|
3
3
|
async function t(e) {
|
|
4
4
|
let t = {
|
|
@@ -28,4 +28,4 @@ var n = class extends e {
|
|
|
28
28
|
//#endregion
|
|
29
29
|
export { n as DevToolsPlugin };
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=DevToolsPlugin-
|
|
31
|
+
//# sourceMappingURL=DevToolsPlugin-P-atJ-5U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevToolsPlugin-
|
|
1
|
+
{"version":3,"file":"DevToolsPlugin-P-atJ-5U.js","names":[],"sources":["../../../node_modules/.pnpm/@pixi+devtools@2.0.1_pixi.js@8.19.0/node_modules/@pixi/devtools/dist/index.js","../src/plugins/DevToolsPlugin.ts"],"sourcesContent":["var _ = /* @__PURE__ */ ((p) => (p[p.Low = -1] = \"Low\", p[p.Normal = 0] = \"Normal\", p[p.High = 1] = \"High\", p))(_ || {});\nasync function i(p) {\n var a;\n const e = {\n importPixi: !1,\n ...p\n };\n e.app && (e.renderer = e.app.renderer, e.stage = e.app.stage), e.importPixi && !e.pixi && (e.pixi = await import(\"pixi.js\")), window.__PIXI_DEVTOOLS__ = {\n ...window.__PIXI_DEVTOOLS__ || {},\n app: e.app,\n stage: e.stage,\n renderer: e.renderer,\n extensions: [...((a = window.__PIXI_DEVTOOLS__) == null ? void 0 : a.extensions) || [], ...e.extensions || []],\n plugins: {}\n };\n}\nexport {\n _ as ExtensionPriority,\n i as initDevtools\n};\n","import { initDevtools } from '@pixi/devtools';\nimport { Application } from 'pixi.js';\nimport { Plugin, type IPlugin } from './Plugin';\n\n/**\n * Interface for the DevTools plugin providing development debugging capabilities.\n * Enables PIXI.js developer tools integration for enhanced debugging and inspection.\n */\nexport interface IDevToolsPlugin extends IPlugin {\n /**\n * Initializes the PIXI DevTools for the given application instance.\n * Enables the browser developer tools extension for PIXI.js debugging.\n *\n * @param app - The PIXI Application instance to attach devtools to\n *\n * @example\n * ```typescript\n * const devToolsPlugin = app.plugins.get<IDevToolsPlugin>('DevToolsPlugin');\n * if (devToolsPlugin && process.env.NODE_ENV === 'development') {\n * devToolsPlugin.initializeDevTools(pixiApp);\n * }\n * ```\n */\n initializeDevTools(app: Application): void;\n}\n\n/**\n * Developer tools plugin for enhanced PIXI.js debugging and inspection.\n *\n * Integrates the official PIXI.js developer tools browser extension, providing\n * visual debugging capabilities, scene graph inspection, and performance monitoring\n * directly in the browser's developer tools panel.\n *\n * Features:\n * - Scene graph visualization and navigation\n * - Real-time property inspection and editing\n * - Performance metrics and rendering statistics\n * - Texture atlas and asset inspection\n * - Interactive debugging tools\n *\n * @example\n * ```typescript\n * // Plugin is typically initialized automatically in development builds\n * // Manual initialization example:\n * const devToolsPlugin = app.plugins.get<IDevToolsPlugin>('DevToolsPlugin');\n * if (devToolsPlugin && process.env.NODE_ENV === 'development') {\n * devToolsPlugin.initializeDevTools(pixiApp);\n * }\n *\n * // The devtools will then be available in browser developer tools\n * // Look for the \"PIXI\" tab in Chrome/Firefox developer tools\n * ```\n *\n * @remarks\n * - Should only be enabled in development environments\n * - Requires the PIXI DevTools browser extension to be installed\n * - May impact performance and should be disabled in production builds\n * - Provides comprehensive debugging capabilities for PIXI.js applications\n */\nexport class DevToolsPlugin extends Plugin implements IDevToolsPlugin {\n /** Plugin identifier for framework registration */\n public readonly id = 'DevToolsPlugin';\n\n /**\n * Initializes the DevTools plugin.\n * Sets up the plugin for later DevTools activation when needed.\n *\n * @example\n * ```typescript\n * // Called automatically by the plugin system\n * // No manual initialization required\n * ```\n */\n async initialize() {}\n\n /**\n * Initializes and activates PIXI DevTools for the specified application.\n * Connects the application to the browser's PIXI DevTools extension for debugging.\n *\n * @param app - The PIXI Application instance to enable debugging for\n *\n * @example\n * ```typescript\n * // Typically called conditionally based on environment\n * const pixiApp = new PIXI.Application();\n * const devToolsPlugin = app.plugins.get<IDevToolsPlugin>('DevToolsPlugin');\n *\n * if (devToolsPlugin && process.env.NODE_ENV === 'development') {\n * devToolsPlugin.initializeDevTools(pixiApp);\n * console.log('PIXI DevTools enabled - check browser developer tools');\n * }\n * ```\n *\n * @remarks\n * - Should only be called in development environments\n * - Requires the PIXI DevTools browser extension to be installed\n * - Once initialized, debugging tools will be available in the browser's developer tools\n * - The extension provides a \"PIXI\" tab with comprehensive debugging features\n */\n public initializeDevTools(app: Application) {\n initDevtools({ app });\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;AACA,eAAe,EAAE,GAAG;CAElB,IAAM,IAAI;EACR,YAAY,CAAC;EACb,GAAG;EACJ;AACD,GAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,UAAU,EAAE,QAAQ,EAAE,IAAI,QAAQ,EAAE,cAAc,CAAC,EAAE,SAAS,EAAE,OAAO,MAAM,OAAO,aAAa,OAAO,oBAAoB;EACvJ,GAAG,OAAO,qBAAqB,EAAE;EACjC,KAAK,EAAE;EACP,OAAO,EAAE;EACT,UAAU,EAAE;EACZ,YAAY,CAAC,GAAS,OAAO,mBAAwC,cAAe,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;EAC9G,SAAS,EAAE;EACZ;;;;AC6CH,IAAa,IAAb,cAAoC,EAAkC;;yBAE/C;;CAYrB,MAAM,aAAa;CA0BnB,mBAA0B,GAAkB;AAC1C,IAAa,EAAE,QAAK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as e, vt as t } from "./registries-qQmLeN0b.js";
|
|
2
2
|
import { BlurFilter as n, ColorMatrixFilter as r } from "pixi.js";
|
|
3
3
|
import { gsap as i } from "gsap";
|
|
4
4
|
//#region ../../node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/PixiPlugin.js
|
|
@@ -347,4 +347,4 @@ var X = class a extends e {
|
|
|
347
347
|
//#endregion
|
|
348
348
|
export { X as GSAPPlugin };
|
|
349
349
|
|
|
350
|
-
//# sourceMappingURL=GSAPPlugin-
|
|
350
|
+
//# sourceMappingURL=GSAPPlugin-CeH9275z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GSAPPlugin-DHhSZKv8.js","names":["gsap"],"sources":["../../../node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/PixiPlugin.js","../src/plugins/GSAPPlugin.ts"],"sourcesContent":["/*!\n * PixiPlugin 3.15.0\n * https://gsap.com\n *\n * @license Copyright 2008-2026, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar gsap,\n _splitColor,\n _coreInitted,\n _PIXI,\n PropTween,\n _getSetter,\n _isV4,\n _isV8Plus,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _getGSAP = function _getGSAP() {\n return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;\n},\n _isFunction = function _isFunction(value) {\n return typeof value === \"function\";\n},\n _warn = function _warn(message) {\n return console.warn(message);\n},\n _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0],\n _lumR = 0.212671,\n _lumG = 0.715160,\n _lumB = 0.072169,\n _filterClass = function _filterClass(name) {\n return _isFunction(_PIXI[name]) ? _PIXI[name] : _PIXI.filters[name];\n},\n // in PIXI 7.1, filters moved from PIXI.filters to just PIXI\n_applyMatrix = function _applyMatrix(m, m2) {\n var temp = [],\n i = 0,\n z = 0,\n y,\n x;\n\n for (y = 0; y < 4; y++) {\n for (x = 0; x < 5; x++) {\n z = x === 4 ? m[i + 4] : 0;\n temp[i + x] = m[i] * m2[x] + m[i + 1] * m2[x + 5] + m[i + 2] * m2[x + 10] + m[i + 3] * m2[x + 15] + z;\n }\n\n i += 5;\n }\n\n return temp;\n},\n _setSaturation = function _setSaturation(m, n) {\n var inv = 1 - n,\n r = inv * _lumR,\n g = inv * _lumG,\n b = inv * _lumB;\n return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m);\n},\n _colorize = function _colorize(m, color, amount) {\n var c = _splitColor(color),\n r = c[0] / 255,\n g = c[1] / 255,\n b = c[2] / 255,\n inv = 1 - amount;\n\n return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m);\n},\n _setHue = function _setHue(m, n) {\n n *= Math.PI / 180;\n var c = Math.cos(n),\n s = Math.sin(n);\n return _applyMatrix([_lumR + c * (1 - _lumR) + s * -_lumR, _lumG + c * -_lumG + s * -_lumG, _lumB + c * -_lumB + s * (1 - _lumB), 0, 0, _lumR + c * -_lumR + s * 0.143, _lumG + c * (1 - _lumG) + s * 0.14, _lumB + c * -_lumB + s * -0.283, 0, 0, _lumR + c * -_lumR + s * -(1 - _lumR), _lumG + c * -_lumG + s * _lumG, _lumB + c * (1 - _lumB) + s * _lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m);\n},\n _setContrast = function _setContrast(m, n) {\n return _applyMatrix([n, 0, 0, 0, 0.5 * (1 - n), 0, n, 0, 0, 0.5 * (1 - n), 0, 0, n, 0, 0.5 * (1 - n), 0, 0, 0, 1, 0], m);\n},\n _getFilter = function _getFilter(target, type) {\n var filterClass = _filterClass(type),\n filters = target.filters || [],\n i = filters.length,\n filter;\n\n filterClass || _warn(type + \" not found. PixiPlugin.registerPIXI(PIXI)\");\n\n while (--i > -1) {\n if (filters[i] instanceof filterClass) {\n return filters[i];\n }\n }\n\n filter = new filterClass();\n\n if (type === \"BlurFilter\") {\n if (_isV8Plus) {\n filter.strength = 0;\n } else {\n filter.blur = 0;\n }\n }\n\n target.filters = [].concat(filters, [filter]);\n return filter;\n},\n _addColorMatrixFilterCacheTween = function _addColorMatrixFilterCacheTween(p, plugin, cache, vars) {\n //we cache the ColorMatrixFilter components in a _gsColorMatrixFilter object attached to the target object so that it's easy to grab the current value at any time.\n plugin.add(cache, p, cache[p], vars[p]);\n\n plugin._props.push(p);\n},\n _applyBrightnessToMatrix = function _applyBrightnessToMatrix(brightness, matrix) {\n var filterClass = _filterClass(\"ColorMatrixFilter\"),\n temp = new filterClass();\n\n temp.matrix = matrix;\n temp.brightness(brightness, true);\n return temp.matrix;\n},\n _copy = function _copy(obj) {\n var copy = {},\n p;\n\n for (p in obj) {\n copy[p] = obj[p];\n }\n\n return copy;\n},\n _CMFdefaults = {\n contrast: 1,\n saturation: 1,\n colorizeAmount: 0,\n colorize: \"rgb(255,255,255)\",\n hue: 0,\n brightness: 1\n},\n _parseColorMatrixFilter = function _parseColorMatrixFilter(target, v, pg) {\n var filter = _getFilter(target, \"ColorMatrixFilter\"),\n cache = target._gsColorMatrixFilter = target._gsColorMatrixFilter || _copy(_CMFdefaults),\n combine = v.combineCMF && !(\"colorMatrixFilter\" in v && !v.colorMatrixFilter),\n i,\n matrix,\n startMatrix;\n\n startMatrix = filter.matrix;\n\n if (v.resolution) {\n filter.resolution = v.resolution;\n }\n\n if (v.matrix && v.matrix.length === startMatrix.length) {\n matrix = v.matrix;\n\n if (cache.contrast !== 1) {\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, _CMFdefaults);\n }\n\n if (cache.hue) {\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, _CMFdefaults);\n }\n\n if (cache.brightness !== 1) {\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, _CMFdefaults);\n }\n\n if (cache.colorizeAmount) {\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, _CMFdefaults);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, _CMFdefaults);\n }\n\n if (cache.saturation !== 1) {\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, _CMFdefaults);\n }\n } else {\n matrix = _idMatrix.slice();\n\n if (v.contrast != null) {\n matrix = _setContrast(matrix, +v.contrast);\n\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, v);\n } else if (cache.contrast !== 1) {\n if (combine) {\n matrix = _setContrast(matrix, cache.contrast);\n } else {\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.hue != null) {\n matrix = _setHue(matrix, +v.hue);\n\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, v);\n } else if (cache.hue) {\n if (combine) {\n matrix = _setHue(matrix, cache.hue);\n } else {\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.brightness != null) {\n matrix = _applyBrightnessToMatrix(+v.brightness, matrix);\n\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, v);\n } else if (cache.brightness !== 1) {\n if (combine) {\n matrix = _applyBrightnessToMatrix(cache.brightness, matrix);\n } else {\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.colorize != null) {\n v.colorizeAmount = \"colorizeAmount\" in v ? +v.colorizeAmount : 1;\n matrix = _colorize(matrix, v.colorize, v.colorizeAmount);\n\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, v);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, v);\n } else if (cache.colorizeAmount) {\n if (combine) {\n matrix = _colorize(matrix, cache.colorize, cache.colorizeAmount);\n } else {\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, _CMFdefaults);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.saturation != null) {\n matrix = _setSaturation(matrix, +v.saturation);\n\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, v);\n } else if (cache.saturation !== 1) {\n if (combine) {\n matrix = _setSaturation(matrix, cache.saturation);\n } else {\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, _CMFdefaults);\n }\n }\n }\n\n i = matrix.length;\n\n while (--i > -1) {\n if (matrix[i] !== startMatrix[i]) {\n pg.add(startMatrix, i, startMatrix[i], matrix[i], \"colorMatrixFilter\");\n }\n }\n\n pg._props.push(\"colorMatrixFilter\");\n},\n _renderColor = function _renderColor(ratio, _ref) {\n var t = _ref.t,\n p = _ref.p,\n color = _ref.color,\n set = _ref.set;\n set(t, p, color[0] << 16 | color[1] << 8 | color[2]);\n},\n _renderDirtyCache = function _renderDirtyCache(ratio, _ref2) {\n var g = _ref2.g;\n\n if (_isV8Plus) {\n g.fill();\n g.stroke();\n } else if (g) {\n // in order for PixiJS to actually redraw GraphicsData, we've gotta increment the \"dirty\" and \"clearDirty\" values. If we don't do this, the values will be tween properly, but not rendered.\n g.dirty++;\n g.clearDirty++;\n }\n},\n _renderAutoAlpha = function _renderAutoAlpha(ratio, data) {\n data.t.visible = !!data.t.alpha;\n},\n _addColorTween = function _addColorTween(target, p, value, plugin) {\n var currentValue = target[p],\n startColor = _splitColor(_isFunction(currentValue) ? target[p.indexOf(\"set\") || !_isFunction(target[\"get\" + p.substr(3)]) ? p : \"get\" + p.substr(3)]() : currentValue),\n endColor = _splitColor(value);\n\n plugin._pt = new PropTween(plugin._pt, target, p, 0, 0, _renderColor, {\n t: target,\n p: p,\n color: startColor,\n set: _getSetter(target, p)\n });\n plugin.add(startColor, 0, startColor[0], endColor[0]);\n plugin.add(startColor, 1, startColor[1], endColor[1]);\n plugin.add(startColor, 2, startColor[2], endColor[2]);\n},\n _colorProps = {\n tint: 1,\n lineColor: 1,\n fillColor: 1,\n strokeColor: 1\n},\n _xyContexts = \"position,scale,skew,pivot,anchor,tilePosition,tileScale\".split(\",\"),\n _contexts = {\n x: \"position\",\n y: \"position\",\n tileX: \"tilePosition\",\n tileY: \"tilePosition\"\n},\n _colorMatrixFilterProps = {\n colorMatrixFilter: 1,\n saturation: 1,\n contrast: 1,\n hue: 1,\n colorize: 1,\n colorizeAmount: 1,\n brightness: 1,\n combineCMF: 1\n},\n _DEG2RAD = Math.PI / 180,\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _degreesToRadians = function _degreesToRadians(value) {\n return _isString(value) && value.charAt(1) === \"=\" ? value.substr(0, 2) + parseFloat(value.substr(2)) * _DEG2RAD : value * _DEG2RAD;\n},\n _renderPropWithEnd = function _renderPropWithEnd(ratio, data) {\n return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 100000) / 100000, data);\n},\n _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, radians) {\n var cap = 360 * (radians ? _DEG2RAD : 1),\n isString = _isString(endValue),\n relative = isString && endValue.charAt(1) === \"=\" ? +(endValue.charAt(0) + \"1\") : 0,\n endNum = parseFloat(relative ? endValue.substr(2) : endValue) * (radians ? _DEG2RAD : 1),\n change = relative ? endNum * relative : endNum - startNum,\n finalValue = startNum + change,\n direction,\n pt;\n\n if (isString) {\n direction = endValue.split(\"_\")[1];\n\n if (direction === \"short\") {\n change %= cap;\n\n if (change !== change % (cap / 2)) {\n change += change < 0 ? cap : -cap;\n }\n }\n\n if (direction === \"cw\" && change < 0) {\n change = (change + cap * 1e10) % cap - ~~(change / cap) * cap;\n } else if (direction === \"ccw\" && change > 0) {\n change = (change - cap * 1e10) % cap - ~~(change / cap) * cap;\n }\n }\n\n plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);\n pt.e = finalValue;\n return pt;\n},\n _initCore = function _initCore() {\n if (!_coreInitted) {\n gsap = _getGSAP();\n _PIXI = _coreInitted = _PIXI || _windowExists() && window.PIXI;\n var version = _PIXI && _PIXI.VERSION && parseFloat(_PIXI.VERSION.split(\".\")[0]) || 0;\n _isV4 = version === 4;\n _isV8Plus = version >= 8;\n\n _splitColor = function _splitColor(color) {\n return gsap.utils.splitColor((color + \"\").substr(0, 2) === \"0x\" ? \"#\" + color.substr(2) : color);\n }; // some colors in PIXI are reported as \"0xFF4421\" instead of \"#FF4421\".\n\n }\n},\n i,\n p; //context setup...\n\n\nfor (i = 0; i < _xyContexts.length; i++) {\n p = _xyContexts[i];\n _contexts[p + \"X\"] = p;\n _contexts[p + \"Y\"] = p;\n}\n\nexport var PixiPlugin = {\n version: \"3.15.0\",\n name: \"pixi\",\n register: function register(core, Plugin, propTween) {\n gsap = core;\n PropTween = propTween;\n _getSetter = Plugin.getSetter;\n\n _initCore();\n },\n headless: true,\n // doesn't need window\n registerPIXI: function registerPIXI(pixi) {\n _PIXI = pixi;\n },\n init: function init(target, values, tween, index, targets) {\n _PIXI || _initCore();\n\n if (!_PIXI) {\n _warn(\"PIXI was not found. PixiPlugin.registerPIXI(PIXI);\");\n\n return false;\n }\n\n var context, axis, value, colorMatrix, filter, p, padding, i, data, subProp;\n\n for (p in values) {\n context = _contexts[p];\n value = values[p];\n\n if (context) {\n axis = ~p.charAt(p.length - 1).toLowerCase().indexOf(\"x\") ? \"x\" : \"y\";\n this.add(target[context], axis, target[context][axis], context === \"skew\" ? _degreesToRadians(value) : value, 0, 0, 0, 0, 0, 1);\n } else if (p === \"scale\" || p === \"anchor\" || p === \"pivot\" || p === \"tileScale\") {\n this.add(target[p], \"x\", target[p].x, value);\n this.add(target[p], \"y\", target[p].y, value);\n } else if (p === \"rotation\" || p === \"angle\") {\n //PIXI expects rotation in radians, but as a convenience we let folks define it in degrees and we do the conversion.\n _addRotationalPropTween(this, target, p, target[p], value, p === \"rotation\");\n } else if (_colorMatrixFilterProps[p]) {\n if (!colorMatrix) {\n _parseColorMatrixFilter(target, values.colorMatrixFilter || values, this);\n\n colorMatrix = true;\n }\n } else if (p === \"blur\" || p === \"blurX\" || p === \"blurY\" || p === \"blurPadding\") {\n filter = _getFilter(target, \"BlurFilter\");\n this.add(filter, p, filter[p], value);\n\n if (values.blurPadding !== 0) {\n padding = values.blurPadding || Math.max(filter[p], value) * 2;\n i = target.filters.length;\n\n while (--i > -1) {\n target.filters[i].padding = Math.max(target.filters[i].padding, padding); //if we don't expand the padding on all the filters, it can look clipped.\n }\n }\n } else if (_colorProps[p]) {\n if ((p === \"lineColor\" || p === \"fillColor\" || p === \"strokeColor\") && target instanceof _PIXI.Graphics) {\n data = \"fillStyle\" in target ? [target] : (target.geometry || target).graphicsData; //\"geometry\" was introduced in PIXI version 5\n\n subProp = p.substr(0, p.length - 5);\n _isV8Plus && subProp === \"line\" && (subProp = \"stroke\"); // in v8, lineColor became strokeColor.\n\n this._pt = new PropTween(this._pt, target, p, 0, 0, _renderDirtyCache, {\n g: target.geometry || target\n });\n i = data.length;\n\n while (--i > -1) {\n _addColorTween(_isV4 ? data[i] : data[i][subProp + \"Style\"], _isV4 ? p : \"color\", value, this);\n }\n } else {\n _addColorTween(target, p, value, this);\n }\n } else if (p === \"autoAlpha\") {\n this._pt = new PropTween(this._pt, target, \"visible\", 0, 0, _renderAutoAlpha);\n this.add(target, \"alpha\", target.alpha, value);\n\n this._props.push(\"alpha\", \"visible\");\n } else if (p !== \"resolution\") {\n this.add(target, p, \"get\", value);\n }\n\n this._props.push(p);\n }\n }\n};\n_getGSAP() && gsap.registerPlugin(PixiPlugin);\nexport { PixiPlugin as default };","import { gsap } from 'gsap';\nimport { PixiPlugin } from 'gsap/PixiPlugin';\nimport { BlurFilter, ColorMatrixFilter } from 'pixi.js';\nimport { IApplication } from '../core';\nimport { Signal } from '../signals';\nimport { type Eases } from '../utils';\nimport { Plugin, type IPlugin } from './Plugin';\n\n/**\n * Configuration options for the GSAP plugin.\n */\n\nexport interface GSAPPluginOptions {\n /** Custom easing functions to register with GSAP */\n eases: Eases;\n}\n\n/**\n * Interface for the GSAPPlugin, defining its public API for high-performance animations.\n * Provides comprehensive GSAP integration with custom animation context management.\n */\nexport interface IGSAPPlugin extends IPlugin {\n /**\n * Array of all registered custom ease names.\n * @readonly\n */\n readonly easeNames: string[];\n\n /**\n * Object containing all registered custom eases, where keys are ease names and values are GSAP ease functions.\n * @readonly\n */\n readonly eases: Eases;\n\n /**\n * The GSAP instance for creating animations.\n * @readonly\n */\n readonly anim: typeof gsap;\n\n /**\n * Adds one or more GSAP tweens or timelines to a specified animation context.\n * Animation contexts are custom collections (Set) of tweens/timelines managed by this plugin,\n * NOT `gsap.Context` instances. If no contextId is provided, animations are added to the global context.\n *\n * @param animation - A single GSAP tween/timeline or an array of them\n * @param contextId - Optional ID of the custom animation context. Defaults to the global context\n * @returns The animation(s) that were added\n *\n * @example\n * ```typescript\n * // Add single animation to specific context\n * const tween = gsap.to(mySprite, { x: 100, duration: 1 });\n * gsapPlugin.addAnimation(tween, 'gameplayAnimations');\n *\n * // Add multiple animations to global context\n * const tweens = [\n * gsap.to(sprite1, { alpha: 0.5, duration: 1 }),\n * gsap.to(sprite2, { rotation: Math.PI, duration: 2 })\n * ];\n * gsapPlugin.addAnimation(tweens);\n * ```\n */\n addAnimation(\n animation: gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[],\n contextId?: string,\n ): gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[];\n\n /**\n * Registers a custom ease function with GSAP.\n *\n * @param name - The name of the custom ease\n * @param ease - The GSAP ease function\n * @returns An object containing the registered ease\n *\n * @example\n * ```typescript\n * // Register a custom bounce ease\n * gsapPlugin.registerCustomEase('myBounce', (progress) => {\n * return progress < 0.5\n * ? 2 * progress * progress\n * : 1 - Math.pow(-2 * progress + 2, 3) / 2;\n * });\n *\n * // Use the custom ease in animations\n * gsap.to(mySprite, { x: 200, duration: 1, ease: 'myBounce' });\n * ```\n */\n registerCustomEase(name: string, ease: gsap.EaseFunction): Record<string, gsap.EaseFunction>;\n\n /**\n * Registers multiple custom ease functions with GSAP in batch.\n *\n * @param eases - An object where keys are ease names and values are GSAP ease functions\n * @returns The complete map of registered eases\n *\n * @example\n * ```typescript\n * gsapPlugin.registerEases({\n * 'softBounce': (t) => t * t * (3 - 2 * t),\n * 'sharpEase': (t) => t * t * t,\n * 'customBack': (t) => t * t * (2.7 * t - 1.7)\n * });\n * ```\n */\n registerEases(eases: Eases): Eases;\n\n /**\n * Retrieves a custom animation context (a Set of tweens/timelines) by its ID.\n * This is NOT a `gsap.Context` instance but rather a custom collection for grouping animations.\n *\n * @param contextId - The ID of the animation context\n * @returns The animation context (a Set of tweens/timelines) or null if not found\n *\n * @example\n * ```typescript\n * const menuAnimations = gsapPlugin.getContext('menuAnimations');\n * if (menuAnimations) {\n * console.log(`Menu has ${menuAnimations.size} active animations`);\n * }\n * ```\n */\n getContext(contextId: string): Set<gsap.core.Tween | gsap.core.Timeline> | null;\n\n /**\n * Plays all animations in a specified custom animation context, or all animations in all contexts.\n *\n * @param contextId - Optional ID of the animation context. If omitted, plays all animations\n *\n * @example\n * ```typescript\n * // Play all animations in a specific context\n * gsapPlugin.playAll('gameplayAnimations');\n *\n * // Play all animations in all contexts\n * gsapPlugin.playAll();\n * ```\n */\n playAll(contextId?: string): void;\n\n /**\n * Pauses all animations in a specified custom animation context, or all animations in all contexts.\n *\n * @param contextId - Optional ID of the animation context. If omitted, pauses all animations\n *\n * @example\n * ```typescript\n * // Pause game animations when menu opens\n * gsapPlugin.pauseAll('gameplayAnimations');\n *\n * // Pause everything when app loses focus\n * gsapPlugin.pauseAll();\n * ```\n */\n pauseAll(contextId?: string): void;\n\n /**\n * Kills (stops and removes) all animations in a specified custom animation context, or all animations.\n * If all contexts are killed, the plugin's global animation collection is recreated.\n *\n * @param contextId - Optional ID of the animation context. If omitted, kills all animations\n *\n * @example\n * ```typescript\n * // Kill specific context when transitioning scenes\n * gsapPlugin.killAll('oldSceneAnimations');\n *\n * // Emergency stop all animations\n * gsapPlugin.killAll();\n * ```\n */\n killAll(contextId?: string): void;\n\n /**\n * Reverts all animations in a specified custom animation context to their initial state.\n *\n * @param contextId - Optional ID of the animation context. If omitted, reverts all animations\n *\n * @example\n * ```typescript\n * // Reset UI animations to initial state\n * gsapPlugin.revertAll('uiAnimations');\n *\n * // Reset everything for game restart\n * gsapPlugin.revertAll();\n * ```\n */\n revertAll(contextId?: string): void;\n\n /**\n * Clears (removes) a specific custom animation context and its tracked animations.\n * If this results in no active contexts, the global collection is recreated if all contexts are cleared.\n *\n * @param contextId - The ID of the animation context to clear\n *\n * @example\n * ```typescript\n * // Clean up completed level animations\n * gsapPlugin.clear('level1Animations');\n * ```\n */\n clear(contextId: string): void;\n\n /**\n * Clears all custom animation contexts and recreates the plugin's global animation collection.\n *\n * @example\n * ```typescript\n * // Complete reset when restarting the game\n * gsapPlugin.clearAll();\n * ```\n */\n clearAll(): void;\n\n /**\n * Kills all animations within the global animation collection managed by this plugin.\n *\n * @example\n * ```typescript\n * // Stop only global animations, keep context-specific ones\n * gsapPlugin.killGlobal();\n * ```\n */\n killGlobal(): void;\n\n /**\n * Reverts all animations within the global animation collection to their initial state.\n *\n * @example\n * ```typescript\n * // Reset global animations without affecting contexts\n * gsapPlugin.revertGlobal();\n * ```\n */\n revertGlobal(): void;\n\n /**\n * Clears all animations from the global animation collection managed by this plugin.\n *\n * @example\n * ```typescript\n * // Clear global animations for cleanup\n * gsapPlugin.clearGlobal();\n * ```\n */\n clearGlobal(): void;\n\n // signals\n onPlayAll: Signal<(contextId: string) => void>;\n onPauseAll: Signal<(contextId: string) => void>;\n onKillAll: Signal<(contextId: string) => void>;\n onRevertAll: Signal<(contextId: string) => void>;\n onClear: Signal<(detail: { contextId: string; kill: boolean }) => void>;\n onClearAll: Signal<(kill: boolean) => void>;\n onKillGlobal: Signal<() => void>;\n onRevertGlobal: Signal<() => void>;\n onClearGlobal: Signal<(kill: boolean) => void>;\n onEaseRegistered: Signal<(detail: { name: string; ease: gsap.EaseFunction }) => void>;\n onEasesRegistered: Signal<(eases: Eases) => void>;\n onAnimationAddded: Signal<(detail: { animation: gsap.core.Tween | gsap.core.Timeline; contextId: string }) => void>;\n}\n\n/**\n * Type alias for animation context collections.\n * Represents a Set containing GSAP tweens and timelines for grouped animation management.\n */\nexport type AnimationContext = Set<gsap.core.Tween | gsap.core.Timeline>;\n\n/**\n * High-performance GSAP animation plugin for PIXI.js applications.\n *\n * Integrates the GreenSock Animation Platform (GSAP) into the application framework,\n * providing powerful and flexible animation capabilities with optimized PIXI.js integration.\n * Features custom animation context management for grouped animation control, custom easing\n * registration, and automatic PIXI.js property animation support.\n *\n * Key Features:\n * - Full GSAP integration with PIXI.js optimization\n * - Custom animation contexts for grouped control (pause/play/kill by category)\n * - Custom easing function registration and management\n * - Automatic PIXI filter integration (BlurFilter, ColorMatrixFilter)\n * - Memory-efficient animation tracking and cleanup\n * - Global and context-specific animation management\n *\n * **Important:** Animation \"contexts\" in this plugin are custom collections (Sets) for grouping\n * animations and are NOT the same as `gsap.Context` objects provided by GSAP itself.\n *\n * @example\n * ```typescript\n * // Basic setup and usage\n * const gsapPlugin = app.plugins.get<IGSAPPlugin>('GSAPPlugin');\n *\n * // Create optimized PIXI animations\n * const sprite = new PIXI.Sprite(texture);\n * gsapPlugin.anim.to(sprite, {\n * x: 100,\n * y: 50,\n * alpha: 0.8,\n * duration: 1,\n * ease: 'back.out(1.7)'\n * });\n *\n * // Register custom eases for game feel\n * gsapPlugin.registerCustomEase('gameJuice', (t) => {\n * return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;\n * });\n *\n * // Context-based animation management\n * const menuTween = gsapPlugin.anim.to(menuButton, { scale: 1.1, duration: 0.3 });\n * gsapPlugin.addAnimation(menuTween, 'menuAnimations');\n *\n * // Later: pause all menu animations when game starts\n * gsapPlugin.pauseAll('menuAnimations');\n *\n * // Animate PIXI filters\n * const blurFilter = new PIXI.BlurFilter();\n * sprite.filters = [blurFilter];\n * gsapPlugin.anim.to(blurFilter, { blur: 10, duration: 2 });\n * ```\n *\n * @remarks\n * - Automatically registers PixiPlugin for optimized PIXI.js property animations\n * - Includes ColorMatrixFilter and BlurFilter integration for advanced effects\n * - Uses efficient Set-based tracking for O(1) animation context operations\n * - Provides both global and context-specific animation lifecycle management\n * - Custom eases are automatically registered with GSAP and stored for reference\n */\nexport class GSAPPlugin extends Plugin implements IGSAPPlugin {\n /** Internal identifier for the global animation context */\n private static readonly GLOBAL_CONTEXT_ID = '__caper_global';\n\n /** Plugin identifier for framework registration */\n public readonly id = 'GSAPPlugin';\n\n // signals\n public onPlayAll = new Signal<(contextId: string) => void>();\n public onPauseAll = new Signal<(contextId: string) => void>();\n public onKillAll = new Signal<(contextId: string) => void>();\n public onRevertAll = new Signal<(contextId: string) => void>();\n public onClear = new Signal<(detail: { contextId: string; kill: boolean }) => void>();\n public onClearAll = new Signal<(kill: boolean) => void>();\n public onKillGlobal = new Signal<() => void>();\n public onRevertGlobal = new Signal<() => void>();\n public onClearGlobal = new Signal<(kill: boolean) => void>();\n public onEaseRegistered = new Signal<(detail: { name: string; ease: gsap.EaseFunction }) => void>();\n public onEasesRegistered = new Signal<(eases: Eases) => void>();\n public onAnimationAddded = new Signal<\n (detail: { animation: gsap.core.Tween | gsap.core.Timeline; contextId: string }) => void\n >();\n\n /** Global animation context reference for quick access */\n private _globalContext: AnimationContext;\n\n /** Map of all custom animation contexts by their string identifiers */\n private _animationContexts: Map<string, AnimationContext> = new Map();\n\n /**\n * Array of all registered custom ease names.\n * @readonly\n */\n public get easeNames(): string[] {\n return Object.keys(this.eases);\n }\n\n /**\n * Object containing all registered custom eases.\n * @readonly\n */\n public get eases(): Eases {\n return this.options.eases || {};\n }\n\n /**\n * Initializes the GSAP plugin with PIXI.js integration and custom configurations.\n * Sets up PixiPlugin, registers custom eases, and creates the global animation context.\n *\n * @param _ - Plugin options (currently unused, relies on app.config.gsap)\n * @param app - The application instance providing configuration\n *\n * @example\n * ```typescript\n * // Plugin is automatically initialized by the framework\n * // Configuration comes from app.config.gsap\n * const config = {\n * gsap: {\n * eases: {\n * 'customBounce': (t) => t * t * (3 - 2 * t),\n * 'gameEase': (t) => Math.pow(t, 2.5)\n * }\n * }\n * };\n * ```\n */\n public async initialize(_: any, app: IApplication) {\n this._options = app.config.gsap || {};\n\n if (this._options.eases) {\n this.registerEases(this._options.eases);\n }\n gsap.registerPlugin(PixiPlugin);\n\n PixiPlugin.registerPIXI({\n filters: {\n ColorMatrixFilter,\n BlurFilter,\n },\n });\n\n this.createGlobalContext();\n }\n\n /**\n * Creates and initializes the global animation context.\n * Sets up the default context for animations not assigned to specific contexts.\n * @protected\n */\n protected createGlobalContext(): void {\n this._animationContexts.set(GSAPPlugin.GLOBAL_CONTEXT_ID, new Set());\n }\n\n /**\n * Registers a single custom ease function with GSAP.\n * The ease becomes available for use in all GSAP animations by name.\n *\n * @param name - Unique name identifier for the ease\n * @param ease - GSAP-compatible easing function (takes progress 0-1, returns eased value)\n * @returns Object containing the registered ease for chaining or reference\n *\n * @example\n * ```typescript\n * // Register a custom elastic ease\n * gsapPlugin.registerCustomEase('elasticOut', (t) => {\n * const c4 = (2 * Math.PI) / 3;\n * return t === 0 ? 0 : t === 1 ? 1 :\n * Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c4) + 1;\n * });\n *\n * // Use in animations\n * gsap.to(mySprite, { x: 100, duration: 1, ease: 'elasticOut' });\n * ```\n */\n public registerCustomEase(name: string, ease: gsap.EaseFunction): Record<string, gsap.EaseFunction> {\n gsap.registerEase(name, ease);\n\n if (!this.options.eases) {\n this.options.eases = {};\n }\n this.options.eases[name] = ease;\n this.onEaseRegistered.emit({ name, ease });\n return { [name]: ease };\n }\n\n /**\n * Registers multiple custom ease functions with GSAP in a single operation.\n * Efficient batch registration for multiple custom eases.\n *\n * @param eases - Object mapping ease names to ease functions\n * @returns The complete map of all registered eases\n *\n * @example\n * ```typescript\n * // Register a suite of game-specific eases\n * gsapPlugin.registerEases({\n * 'jumpEase': (t) => t * t * (3 - 2 * t),\n * 'impactEase': (t) => 1 - Math.cos(t * Math.PI / 2),\n * 'floatEase': (t) => Math.sin(t * Math.PI / 2),\n * 'snapEase': (t) => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2\n * });\n * ```\n */\n public registerEases(eases: Eases): Eases {\n for (const [name, ease] of Object.entries(eases)) {\n this.registerCustomEase(name, ease);\n }\n this.onEasesRegistered.emit(eases);\n return this.eases;\n }\n\n /**\n * Gets the GSAP instance for creating animations.\n * Provides access to the full GSAP API with PIXI.js optimizations enabled.\n * @readonly\n */\n public get anim(): typeof gsap {\n return gsap;\n }\n\n /**\n * Adds animation(s) to a specified context for grouped management.\n * Creates the context if it doesn't exist. Defaults to global context if no contextId provided.\n *\n * @param animation - Single animation or array of animations to track\n * @param contextId - Context identifier (defaults to global context)\n * @returns The same animation(s) passed in for chaining\n *\n * @example\n * ```typescript\n * // Add to specific context for scene management\n * const levelTweens = [\n * gsap.to(player, { x: 100, duration: 2 }),\n * gsap.to(enemy, { rotation: Math.PI, duration: 1.5 }),\n * gsap.to(powerup, { scale: 1.2, yoyo: true, repeat: -1, duration: 0.8 })\n * ];\n * gsapPlugin.addAnimation(levelTweens, 'level1Gameplay');\n *\n * // Add to global context (default)\n * const bgTween = gsap.to(background, { alpha: 0.8, duration: 3 });\n * gsapPlugin.addAnimation(bgTween);\n * ```\n */\n public addAnimation(\n animation: gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[],\n contextId: string = GSAPPlugin.GLOBAL_CONTEXT_ID,\n ): gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[] {\n if (!this._animationContexts.has(contextId)) {\n this._animationContexts.set(contextId, new Set());\n }\n const ctx = this._animationContexts.get(contextId);\n if (ctx) {\n if (Array.isArray(animation)) {\n animation.forEach((anim) => {\n ctx.add(anim);\n this.onAnimationAddded.emit({ animation: anim, contextId });\n });\n } else {\n ctx.add(animation);\n this.onAnimationAddded.emit({ animation, contextId });\n }\n }\n\n return animation;\n }\n\n /**\n * Retrieves a custom animation context by its identifier.\n * Returns null if the context doesn't exist.\n *\n * @param contextId - The context identifier to look up\n * @returns The animation context Set or null if not found\n *\n * @example\n * ```typescript\n * // Check if context exists and get info\n * const gameplayContext = gsapPlugin.getContext('gameplayAnimations');\n * if (gameplayContext) {\n * console.log(`Found ${gameplayContext.size} gameplay animations`);\n *\n * // Iterate through animations if needed\n * gameplayContext.forEach(animation => {\n * console.log('Animation progress:', animation.progress());\n * });\n * }\n * ```\n */\n public getContext(contextId: string): AnimationContext | null {\n return this._animationContexts.get(contextId) || null;\n }\n\n /**\n * Plays all animations in the specified context or all contexts.\n * Useful for resuming paused animations or ensuring all animations are active.\n *\n * @param contextId - Optional context identifier. If omitted, plays all animations in all contexts\n *\n * @example\n * ```typescript\n * // Resume specific context after pause\n * gsapPlugin.playAll('menuAnimations');\n *\n * // Resume all animations (e.g., after app regains focus)\n * gsapPlugin.playAll();\n *\n * // Conditional playback\n * if (gameState === 'playing') {\n * gsapPlugin.playAll('gameplayAnimations');\n * }\n * ```\n */\n public playAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) =>\n context.forEach((animation) => {\n animation.play();\n }),\n );\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => {\n animation.play();\n });\n }\n\n this.onPlayAll.emit(contextId ?? 'all');\n }\n\n /**\n * Pauses all animations in the specified context or all contexts.\n * Animations retain their current progress and can be resumed with playAll().\n *\n * @param contextId - Optional context identifier. If omitted, pauses all animations in all contexts\n *\n * @example\n * ```typescript\n * // Pause game animations when menu opens\n * gsapPlugin.pauseAll('gameplayAnimations');\n *\n * // Pause everything when app loses focus\n * window.addEventListener('blur', () => {\n * gsapPlugin.pauseAll();\n * });\n *\n * // Conditional pausing\n * if (gameState === 'paused') {\n * gsapPlugin.pauseAll('gameplayAnimations');\n * }\n * ```\n */\n public pauseAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) => context.forEach((animation) => animation.pause()));\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => animation.pause());\n }\n\n this.onPauseAll.emit(contextId ?? 'all');\n }\n\n /**\n * Kills (stops and removes) all animations in the specified context or all contexts.\n * Killed animations cannot be resumed and are removed from tracking.\n * If killing all contexts, the global context is automatically recreated.\n *\n * @param contextId - Optional context identifier. If omitted, kills all animations in all contexts\n *\n * @example\n * ```typescript\n * // Kill animations when transitioning scenes\n * gsapPlugin.killAll('currentSceneAnimations');\n *\n * // Emergency stop all animations\n * gsapPlugin.killAll();\n *\n * // Clean up specific context before recreation\n * gsapPlugin.killAll('temporaryEffects');\n * ```\n */\n public killAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((contextAnimations) => {\n contextAnimations.forEach((animation) => animation.kill());\n });\n this._animationContexts.clear(); // Clear all tracked animations from all contexts\n this.createGlobalContext(); // Re-initialize the global context and its tracking\n } else {\n const contextAnimations = this._animationContexts.get(contextId);\n if (contextAnimations) {\n contextAnimations.forEach((animation) => animation.kill());\n }\n this.clear(contextId); // Remove the specific context from tracking\n }\n this.onKillAll.emit(contextId ?? 'all');\n }\n\n /**\n * Reverts all animations in the specified context or all contexts to their initial state.\n * Animation targets return to their original property values before the animation started.\n *\n * @param contextId - Optional context identifier. If omitted, reverts all animations in all contexts\n *\n * @example\n * ```typescript\n * // Reset UI to initial state\n * gsapPlugin.revertAll('uiAnimations');\n *\n * // Reset everything for game restart\n * gsapPlugin.revertAll();\n *\n * // Reset temporary effects\n * gsapPlugin.revertAll('screenEffects');\n * ```\n */\n public revertAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) => context.forEach((animation) => animation.revert()));\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => animation.revert());\n }\n\n this.onRevertAll.emit(contextId ?? 'all');\n }\n\n /**\n * Clears (removes) a specific animation context from tracking.\n * Optionally kills the animations before clearing the context.\n *\n * @param contextId - The context identifier to clear\n * @param kill - Whether to kill animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Clear completed level context\n * gsapPlugin.clear('level1Animations');\n *\n * // Clear and kill animations simultaneously\n * gsapPlugin.clear('temporaryEffects', true);\n * ```\n */\n public clear(contextId: string, kill: boolean = false): void {\n if (kill) {\n this.killAll(contextId);\n }\n this._animationContexts.delete(contextId);\n\n this.onClear.emit({ contextId, kill });\n }\n\n /**\n * Clears all animation contexts and recreates the global context.\n * Optionally kills all animations before clearing contexts.\n *\n * @param kill - Whether to kill all animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Complete reset for new game\n * gsapPlugin.clearAll(true);\n *\n * // Clear tracking without killing animations\n * gsapPlugin.clearAll(false);\n * ```\n */\n public clearAll(kill: boolean = false): void {\n if (kill) {\n this.killAll();\n }\n this._animationContexts.clear();\n this.createGlobalContext(); // Re-initialize the global context tracking\n\n this.onClearAll.emit(kill);\n }\n\n /**\n * Kills all animations within the global animation context only.\n * This affects only animations added to the global context, not other custom contexts.\n *\n * @example\n * ```typescript\n * // Kill only global animations, preserve context-specific ones\n * gsapPlugin.killGlobal();\n *\n * // Useful for clearing background animations while keeping UI animations\n * gsapPlugin.killGlobal();\n * gsapPlugin.playAll('uiAnimations'); // UI animations continue\n * ```\n */\n public killGlobal(): void {\n const globalAnimations = this._animationContexts.get(GSAPPlugin.GLOBAL_CONTEXT_ID);\n if (globalAnimations) {\n globalAnimations.forEach((anim) => anim.kill());\n globalAnimations.clear();\n }\n\n this.onKillGlobal.emit();\n }\n\n /**\n * Reverts all animations within the global animation context to their initial state.\n * Only affects animations in the global context, not custom contexts.\n *\n * @example\n * ```typescript\n * // Reset only global animations\n * gsapPlugin.revertGlobal();\n *\n * // Reset global animations while preserving context states\n * gsapPlugin.revertGlobal();\n * // Context-specific animations remain unchanged\n * ```\n */\n public revertGlobal(): void {\n const globalAnimations = this._animationContexts.get(GSAPPlugin.GLOBAL_CONTEXT_ID);\n if (globalAnimations) {\n globalAnimations.forEach((anim) => anim.revert());\n }\n\n this.onRevertGlobal.emit();\n }\n\n /**\n * Clears all animations from the global animation context.\n * Optionally kills the animations before clearing from tracking.\n *\n * @param kill - Whether to kill animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Clear global context without killing\n * gsapPlugin.clearGlobal();\n *\n * // Clear and kill global animations\n * gsapPlugin.clearGlobal(true);\n * ```\n */\n public clearGlobal(kill: boolean = false): void {\n if (kill) {\n this.killGlobal();\n }\n this._globalContext.clear();\n\n this.onClearGlobal.emit(kill);\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;AAUA,IAAIA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAAgB,WAAyB;AAC3C,QAAO,OAAO,SAAW;GAEvB,IAAW,WAAoB;AACjC,QAAOA,KAAQ,GAAe,KAAK,IAAO,OAAO,SAASA,EAAK,kBAAkBA;GAE/E,IAAc,SAAqB,GAAO;AAC5C,QAAO,OAAO,KAAU;GAEtB,IAAQ,SAAe,GAAS;AAClC,QAAO,QAAQ,KAAK,EAAQ;GAE1B,IAAY;CAAC;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAE,EACxE,IAAQ,SACR,IAAQ,QACR,IAAQ,SACR,IAAe,SAAsB,GAAM;AAC7C,QAAO,EAAY,EAAM,GAAM,GAAG,EAAM,KAAQ,EAAM,QAAQ;GAGhE,IAAe,SAAsB,GAAG,GAAI;CAC1C,IAAI,IAAO,EAAE,EACT,IAAI,GACJ,IAAI,GACJ,GACA;AAEJ,MAAK,IAAI,GAAG,IAAI,GAAG,KAAK;AACt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Ac,EAAU,QAAQ,CAAC,GAFlF,KAAK,mBAAmB,SAAS,MAAY,EAAQ,SAAS,MAAc,EAAU,QAAQ,CAAC,CAAC,EAKlG,KAAK,YAAY,KAAK,KAAa,MAAM;;CAmB3C,MAAa,GAAmB,IAAgB,IAAa;AAM3D,EALI,KACF,KAAK,QAAQ,EAAU,EAEzB,KAAK,mBAAmB,OAAO,EAAU,EAEzC,KAAK,QAAQ,KAAK;GAAE;GAAW;GAAM,CAAC;;CAkBxC,SAAgB,IAAgB,IAAa;AAO3C,EANI,KACF,KAAK,SAAS,EAEhB,KAAK,mBAAmB,OAAO,EAC/B,KAAK,qBAAqB,EAE1B,KAAK,WAAW,KAAK,EAAK;;CAiB5B,aAA0B;EACxB,IAAM,IAAmB,KAAK,mBAAmB,IAAI,EAAW,kBAAkB;AAMlF,EALI,MACF,EAAiB,SAAS,MAAS,EAAK,MAAM,CAAC,EAC/C,EAAiB,OAAO,GAG1B,KAAK,aAAa,MAAM;;CAiB1B,eAA4B;EAC1B,IAAM,IAAmB,KAAK,mBAAmB,IAAI,EAAW,kBAAkB;AAKlF,EAJI,KACF,EAAiB,SAAS,MAAS,EAAK,QAAQ,CAAC,EAGnD,KAAK,eAAe,MAAM;;CAkB5B,YAAmB,IAAgB,IAAa;AAM9C,EALI,KACF,KAAK,YAAY,EAEnB,KAAK,eAAe,OAAO,EAE3B,KAAK,cAAc,KAAK,EAAK"}
|
|
1
|
+
{"version":3,"file":"GSAPPlugin-CeH9275z.js","names":["gsap"],"sources":["../../../node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/PixiPlugin.js","../src/plugins/GSAPPlugin.ts"],"sourcesContent":["/*!\n * PixiPlugin 3.15.0\n * https://gsap.com\n *\n * @license Copyright 2008-2026, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar gsap,\n _splitColor,\n _coreInitted,\n _PIXI,\n PropTween,\n _getSetter,\n _isV4,\n _isV8Plus,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _getGSAP = function _getGSAP() {\n return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;\n},\n _isFunction = function _isFunction(value) {\n return typeof value === \"function\";\n},\n _warn = function _warn(message) {\n return console.warn(message);\n},\n _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0],\n _lumR = 0.212671,\n _lumG = 0.715160,\n _lumB = 0.072169,\n _filterClass = function _filterClass(name) {\n return _isFunction(_PIXI[name]) ? _PIXI[name] : _PIXI.filters[name];\n},\n // in PIXI 7.1, filters moved from PIXI.filters to just PIXI\n_applyMatrix = function _applyMatrix(m, m2) {\n var temp = [],\n i = 0,\n z = 0,\n y,\n x;\n\n for (y = 0; y < 4; y++) {\n for (x = 0; x < 5; x++) {\n z = x === 4 ? m[i + 4] : 0;\n temp[i + x] = m[i] * m2[x] + m[i + 1] * m2[x + 5] + m[i + 2] * m2[x + 10] + m[i + 3] * m2[x + 15] + z;\n }\n\n i += 5;\n }\n\n return temp;\n},\n _setSaturation = function _setSaturation(m, n) {\n var inv = 1 - n,\n r = inv * _lumR,\n g = inv * _lumG,\n b = inv * _lumB;\n return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m);\n},\n _colorize = function _colorize(m, color, amount) {\n var c = _splitColor(color),\n r = c[0] / 255,\n g = c[1] / 255,\n b = c[2] / 255,\n inv = 1 - amount;\n\n return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m);\n},\n _setHue = function _setHue(m, n) {\n n *= Math.PI / 180;\n var c = Math.cos(n),\n s = Math.sin(n);\n return _applyMatrix([_lumR + c * (1 - _lumR) + s * -_lumR, _lumG + c * -_lumG + s * -_lumG, _lumB + c * -_lumB + s * (1 - _lumB), 0, 0, _lumR + c * -_lumR + s * 0.143, _lumG + c * (1 - _lumG) + s * 0.14, _lumB + c * -_lumB + s * -0.283, 0, 0, _lumR + c * -_lumR + s * -(1 - _lumR), _lumG + c * -_lumG + s * _lumG, _lumB + c * (1 - _lumB) + s * _lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m);\n},\n _setContrast = function _setContrast(m, n) {\n return _applyMatrix([n, 0, 0, 0, 0.5 * (1 - n), 0, n, 0, 0, 0.5 * (1 - n), 0, 0, n, 0, 0.5 * (1 - n), 0, 0, 0, 1, 0], m);\n},\n _getFilter = function _getFilter(target, type) {\n var filterClass = _filterClass(type),\n filters = target.filters || [],\n i = filters.length,\n filter;\n\n filterClass || _warn(type + \" not found. PixiPlugin.registerPIXI(PIXI)\");\n\n while (--i > -1) {\n if (filters[i] instanceof filterClass) {\n return filters[i];\n }\n }\n\n filter = new filterClass();\n\n if (type === \"BlurFilter\") {\n if (_isV8Plus) {\n filter.strength = 0;\n } else {\n filter.blur = 0;\n }\n }\n\n target.filters = [].concat(filters, [filter]);\n return filter;\n},\n _addColorMatrixFilterCacheTween = function _addColorMatrixFilterCacheTween(p, plugin, cache, vars) {\n //we cache the ColorMatrixFilter components in a _gsColorMatrixFilter object attached to the target object so that it's easy to grab the current value at any time.\n plugin.add(cache, p, cache[p], vars[p]);\n\n plugin._props.push(p);\n},\n _applyBrightnessToMatrix = function _applyBrightnessToMatrix(brightness, matrix) {\n var filterClass = _filterClass(\"ColorMatrixFilter\"),\n temp = new filterClass();\n\n temp.matrix = matrix;\n temp.brightness(brightness, true);\n return temp.matrix;\n},\n _copy = function _copy(obj) {\n var copy = {},\n p;\n\n for (p in obj) {\n copy[p] = obj[p];\n }\n\n return copy;\n},\n _CMFdefaults = {\n contrast: 1,\n saturation: 1,\n colorizeAmount: 0,\n colorize: \"rgb(255,255,255)\",\n hue: 0,\n brightness: 1\n},\n _parseColorMatrixFilter = function _parseColorMatrixFilter(target, v, pg) {\n var filter = _getFilter(target, \"ColorMatrixFilter\"),\n cache = target._gsColorMatrixFilter = target._gsColorMatrixFilter || _copy(_CMFdefaults),\n combine = v.combineCMF && !(\"colorMatrixFilter\" in v && !v.colorMatrixFilter),\n i,\n matrix,\n startMatrix;\n\n startMatrix = filter.matrix;\n\n if (v.resolution) {\n filter.resolution = v.resolution;\n }\n\n if (v.matrix && v.matrix.length === startMatrix.length) {\n matrix = v.matrix;\n\n if (cache.contrast !== 1) {\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, _CMFdefaults);\n }\n\n if (cache.hue) {\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, _CMFdefaults);\n }\n\n if (cache.brightness !== 1) {\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, _CMFdefaults);\n }\n\n if (cache.colorizeAmount) {\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, _CMFdefaults);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, _CMFdefaults);\n }\n\n if (cache.saturation !== 1) {\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, _CMFdefaults);\n }\n } else {\n matrix = _idMatrix.slice();\n\n if (v.contrast != null) {\n matrix = _setContrast(matrix, +v.contrast);\n\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, v);\n } else if (cache.contrast !== 1) {\n if (combine) {\n matrix = _setContrast(matrix, cache.contrast);\n } else {\n _addColorMatrixFilterCacheTween(\"contrast\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.hue != null) {\n matrix = _setHue(matrix, +v.hue);\n\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, v);\n } else if (cache.hue) {\n if (combine) {\n matrix = _setHue(matrix, cache.hue);\n } else {\n _addColorMatrixFilterCacheTween(\"hue\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.brightness != null) {\n matrix = _applyBrightnessToMatrix(+v.brightness, matrix);\n\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, v);\n } else if (cache.brightness !== 1) {\n if (combine) {\n matrix = _applyBrightnessToMatrix(cache.brightness, matrix);\n } else {\n _addColorMatrixFilterCacheTween(\"brightness\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.colorize != null) {\n v.colorizeAmount = \"colorizeAmount\" in v ? +v.colorizeAmount : 1;\n matrix = _colorize(matrix, v.colorize, v.colorizeAmount);\n\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, v);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, v);\n } else if (cache.colorizeAmount) {\n if (combine) {\n matrix = _colorize(matrix, cache.colorize, cache.colorizeAmount);\n } else {\n _addColorMatrixFilterCacheTween(\"colorize\", pg, cache, _CMFdefaults);\n\n _addColorMatrixFilterCacheTween(\"colorizeAmount\", pg, cache, _CMFdefaults);\n }\n }\n\n if (v.saturation != null) {\n matrix = _setSaturation(matrix, +v.saturation);\n\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, v);\n } else if (cache.saturation !== 1) {\n if (combine) {\n matrix = _setSaturation(matrix, cache.saturation);\n } else {\n _addColorMatrixFilterCacheTween(\"saturation\", pg, cache, _CMFdefaults);\n }\n }\n }\n\n i = matrix.length;\n\n while (--i > -1) {\n if (matrix[i] !== startMatrix[i]) {\n pg.add(startMatrix, i, startMatrix[i], matrix[i], \"colorMatrixFilter\");\n }\n }\n\n pg._props.push(\"colorMatrixFilter\");\n},\n _renderColor = function _renderColor(ratio, _ref) {\n var t = _ref.t,\n p = _ref.p,\n color = _ref.color,\n set = _ref.set;\n set(t, p, color[0] << 16 | color[1] << 8 | color[2]);\n},\n _renderDirtyCache = function _renderDirtyCache(ratio, _ref2) {\n var g = _ref2.g;\n\n if (_isV8Plus) {\n g.fill();\n g.stroke();\n } else if (g) {\n // in order for PixiJS to actually redraw GraphicsData, we've gotta increment the \"dirty\" and \"clearDirty\" values. If we don't do this, the values will be tween properly, but not rendered.\n g.dirty++;\n g.clearDirty++;\n }\n},\n _renderAutoAlpha = function _renderAutoAlpha(ratio, data) {\n data.t.visible = !!data.t.alpha;\n},\n _addColorTween = function _addColorTween(target, p, value, plugin) {\n var currentValue = target[p],\n startColor = _splitColor(_isFunction(currentValue) ? target[p.indexOf(\"set\") || !_isFunction(target[\"get\" + p.substr(3)]) ? p : \"get\" + p.substr(3)]() : currentValue),\n endColor = _splitColor(value);\n\n plugin._pt = new PropTween(plugin._pt, target, p, 0, 0, _renderColor, {\n t: target,\n p: p,\n color: startColor,\n set: _getSetter(target, p)\n });\n plugin.add(startColor, 0, startColor[0], endColor[0]);\n plugin.add(startColor, 1, startColor[1], endColor[1]);\n plugin.add(startColor, 2, startColor[2], endColor[2]);\n},\n _colorProps = {\n tint: 1,\n lineColor: 1,\n fillColor: 1,\n strokeColor: 1\n},\n _xyContexts = \"position,scale,skew,pivot,anchor,tilePosition,tileScale\".split(\",\"),\n _contexts = {\n x: \"position\",\n y: \"position\",\n tileX: \"tilePosition\",\n tileY: \"tilePosition\"\n},\n _colorMatrixFilterProps = {\n colorMatrixFilter: 1,\n saturation: 1,\n contrast: 1,\n hue: 1,\n colorize: 1,\n colorizeAmount: 1,\n brightness: 1,\n combineCMF: 1\n},\n _DEG2RAD = Math.PI / 180,\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _degreesToRadians = function _degreesToRadians(value) {\n return _isString(value) && value.charAt(1) === \"=\" ? value.substr(0, 2) + parseFloat(value.substr(2)) * _DEG2RAD : value * _DEG2RAD;\n},\n _renderPropWithEnd = function _renderPropWithEnd(ratio, data) {\n return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 100000) / 100000, data);\n},\n _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, radians) {\n var cap = 360 * (radians ? _DEG2RAD : 1),\n isString = _isString(endValue),\n relative = isString && endValue.charAt(1) === \"=\" ? +(endValue.charAt(0) + \"1\") : 0,\n endNum = parseFloat(relative ? endValue.substr(2) : endValue) * (radians ? _DEG2RAD : 1),\n change = relative ? endNum * relative : endNum - startNum,\n finalValue = startNum + change,\n direction,\n pt;\n\n if (isString) {\n direction = endValue.split(\"_\")[1];\n\n if (direction === \"short\") {\n change %= cap;\n\n if (change !== change % (cap / 2)) {\n change += change < 0 ? cap : -cap;\n }\n }\n\n if (direction === \"cw\" && change < 0) {\n change = (change + cap * 1e10) % cap - ~~(change / cap) * cap;\n } else if (direction === \"ccw\" && change > 0) {\n change = (change - cap * 1e10) % cap - ~~(change / cap) * cap;\n }\n }\n\n plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);\n pt.e = finalValue;\n return pt;\n},\n _initCore = function _initCore() {\n if (!_coreInitted) {\n gsap = _getGSAP();\n _PIXI = _coreInitted = _PIXI || _windowExists() && window.PIXI;\n var version = _PIXI && _PIXI.VERSION && parseFloat(_PIXI.VERSION.split(\".\")[0]) || 0;\n _isV4 = version === 4;\n _isV8Plus = version >= 8;\n\n _splitColor = function _splitColor(color) {\n return gsap.utils.splitColor((color + \"\").substr(0, 2) === \"0x\" ? \"#\" + color.substr(2) : color);\n }; // some colors in PIXI are reported as \"0xFF4421\" instead of \"#FF4421\".\n\n }\n},\n i,\n p; //context setup...\n\n\nfor (i = 0; i < _xyContexts.length; i++) {\n p = _xyContexts[i];\n _contexts[p + \"X\"] = p;\n _contexts[p + \"Y\"] = p;\n}\n\nexport var PixiPlugin = {\n version: \"3.15.0\",\n name: \"pixi\",\n register: function register(core, Plugin, propTween) {\n gsap = core;\n PropTween = propTween;\n _getSetter = Plugin.getSetter;\n\n _initCore();\n },\n headless: true,\n // doesn't need window\n registerPIXI: function registerPIXI(pixi) {\n _PIXI = pixi;\n },\n init: function init(target, values, tween, index, targets) {\n _PIXI || _initCore();\n\n if (!_PIXI) {\n _warn(\"PIXI was not found. PixiPlugin.registerPIXI(PIXI);\");\n\n return false;\n }\n\n var context, axis, value, colorMatrix, filter, p, padding, i, data, subProp;\n\n for (p in values) {\n context = _contexts[p];\n value = values[p];\n\n if (context) {\n axis = ~p.charAt(p.length - 1).toLowerCase().indexOf(\"x\") ? \"x\" : \"y\";\n this.add(target[context], axis, target[context][axis], context === \"skew\" ? _degreesToRadians(value) : value, 0, 0, 0, 0, 0, 1);\n } else if (p === \"scale\" || p === \"anchor\" || p === \"pivot\" || p === \"tileScale\") {\n this.add(target[p], \"x\", target[p].x, value);\n this.add(target[p], \"y\", target[p].y, value);\n } else if (p === \"rotation\" || p === \"angle\") {\n //PIXI expects rotation in radians, but as a convenience we let folks define it in degrees and we do the conversion.\n _addRotationalPropTween(this, target, p, target[p], value, p === \"rotation\");\n } else if (_colorMatrixFilterProps[p]) {\n if (!colorMatrix) {\n _parseColorMatrixFilter(target, values.colorMatrixFilter || values, this);\n\n colorMatrix = true;\n }\n } else if (p === \"blur\" || p === \"blurX\" || p === \"blurY\" || p === \"blurPadding\") {\n filter = _getFilter(target, \"BlurFilter\");\n this.add(filter, p, filter[p], value);\n\n if (values.blurPadding !== 0) {\n padding = values.blurPadding || Math.max(filter[p], value) * 2;\n i = target.filters.length;\n\n while (--i > -1) {\n target.filters[i].padding = Math.max(target.filters[i].padding, padding); //if we don't expand the padding on all the filters, it can look clipped.\n }\n }\n } else if (_colorProps[p]) {\n if ((p === \"lineColor\" || p === \"fillColor\" || p === \"strokeColor\") && target instanceof _PIXI.Graphics) {\n data = \"fillStyle\" in target ? [target] : (target.geometry || target).graphicsData; //\"geometry\" was introduced in PIXI version 5\n\n subProp = p.substr(0, p.length - 5);\n _isV8Plus && subProp === \"line\" && (subProp = \"stroke\"); // in v8, lineColor became strokeColor.\n\n this._pt = new PropTween(this._pt, target, p, 0, 0, _renderDirtyCache, {\n g: target.geometry || target\n });\n i = data.length;\n\n while (--i > -1) {\n _addColorTween(_isV4 ? data[i] : data[i][subProp + \"Style\"], _isV4 ? p : \"color\", value, this);\n }\n } else {\n _addColorTween(target, p, value, this);\n }\n } else if (p === \"autoAlpha\") {\n this._pt = new PropTween(this._pt, target, \"visible\", 0, 0, _renderAutoAlpha);\n this.add(target, \"alpha\", target.alpha, value);\n\n this._props.push(\"alpha\", \"visible\");\n } else if (p !== \"resolution\") {\n this.add(target, p, \"get\", value);\n }\n\n this._props.push(p);\n }\n }\n};\n_getGSAP() && gsap.registerPlugin(PixiPlugin);\nexport { PixiPlugin as default };","import { gsap } from 'gsap';\nimport { PixiPlugin } from 'gsap/PixiPlugin';\nimport { BlurFilter, ColorMatrixFilter } from 'pixi.js';\nimport { IApplication } from '../core';\nimport { Signal } from '../signals';\nimport { type Eases } from '../utils';\nimport { Plugin, type IPlugin } from './Plugin';\n\n/**\n * Configuration options for the GSAP plugin.\n */\n\nexport interface GSAPPluginOptions {\n /** Custom easing functions to register with GSAP */\n eases: Eases;\n}\n\n/**\n * Interface for the GSAPPlugin, defining its public API for high-performance animations.\n * Provides comprehensive GSAP integration with custom animation context management.\n */\nexport interface IGSAPPlugin extends IPlugin {\n /**\n * Array of all registered custom ease names.\n * @readonly\n */\n readonly easeNames: string[];\n\n /**\n * Object containing all registered custom eases, where keys are ease names and values are GSAP ease functions.\n * @readonly\n */\n readonly eases: Eases;\n\n /**\n * The GSAP instance for creating animations.\n * @readonly\n */\n readonly anim: typeof gsap;\n\n /**\n * Adds one or more GSAP tweens or timelines to a specified animation context.\n * Animation contexts are custom collections (Set) of tweens/timelines managed by this plugin,\n * NOT `gsap.Context` instances. If no contextId is provided, animations are added to the global context.\n *\n * @param animation - A single GSAP tween/timeline or an array of them\n * @param contextId - Optional ID of the custom animation context. Defaults to the global context\n * @returns The animation(s) that were added\n *\n * @example\n * ```typescript\n * // Add single animation to specific context\n * const tween = gsap.to(mySprite, { x: 100, duration: 1 });\n * gsapPlugin.addAnimation(tween, 'gameplayAnimations');\n *\n * // Add multiple animations to global context\n * const tweens = [\n * gsap.to(sprite1, { alpha: 0.5, duration: 1 }),\n * gsap.to(sprite2, { rotation: Math.PI, duration: 2 })\n * ];\n * gsapPlugin.addAnimation(tweens);\n * ```\n */\n addAnimation(\n animation: gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[],\n contextId?: string,\n ): gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[];\n\n /**\n * Registers a custom ease function with GSAP.\n *\n * @param name - The name of the custom ease\n * @param ease - The GSAP ease function\n * @returns An object containing the registered ease\n *\n * @example\n * ```typescript\n * // Register a custom bounce ease\n * gsapPlugin.registerCustomEase('myBounce', (progress) => {\n * return progress < 0.5\n * ? 2 * progress * progress\n * : 1 - Math.pow(-2 * progress + 2, 3) / 2;\n * });\n *\n * // Use the custom ease in animations\n * gsap.to(mySprite, { x: 200, duration: 1, ease: 'myBounce' });\n * ```\n */\n registerCustomEase(name: string, ease: gsap.EaseFunction): Record<string, gsap.EaseFunction>;\n\n /**\n * Registers multiple custom ease functions with GSAP in batch.\n *\n * @param eases - An object where keys are ease names and values are GSAP ease functions\n * @returns The complete map of registered eases\n *\n * @example\n * ```typescript\n * gsapPlugin.registerEases({\n * 'softBounce': (t) => t * t * (3 - 2 * t),\n * 'sharpEase': (t) => t * t * t,\n * 'customBack': (t) => t * t * (2.7 * t - 1.7)\n * });\n * ```\n */\n registerEases(eases: Eases): Eases;\n\n /**\n * Retrieves a custom animation context (a Set of tweens/timelines) by its ID.\n * This is NOT a `gsap.Context` instance but rather a custom collection for grouping animations.\n *\n * @param contextId - The ID of the animation context\n * @returns The animation context (a Set of tweens/timelines) or null if not found\n *\n * @example\n * ```typescript\n * const menuAnimations = gsapPlugin.getContext('menuAnimations');\n * if (menuAnimations) {\n * console.log(`Menu has ${menuAnimations.size} active animations`);\n * }\n * ```\n */\n getContext(contextId: string): Set<gsap.core.Tween | gsap.core.Timeline> | null;\n\n /**\n * Plays all animations in a specified custom animation context, or all animations in all contexts.\n *\n * @param contextId - Optional ID of the animation context. If omitted, plays all animations\n *\n * @example\n * ```typescript\n * // Play all animations in a specific context\n * gsapPlugin.playAll('gameplayAnimations');\n *\n * // Play all animations in all contexts\n * gsapPlugin.playAll();\n * ```\n */\n playAll(contextId?: string): void;\n\n /**\n * Pauses all animations in a specified custom animation context, or all animations in all contexts.\n *\n * @param contextId - Optional ID of the animation context. If omitted, pauses all animations\n *\n * @example\n * ```typescript\n * // Pause game animations when menu opens\n * gsapPlugin.pauseAll('gameplayAnimations');\n *\n * // Pause everything when app loses focus\n * gsapPlugin.pauseAll();\n * ```\n */\n pauseAll(contextId?: string): void;\n\n /**\n * Kills (stops and removes) all animations in a specified custom animation context, or all animations.\n * If all contexts are killed, the plugin's global animation collection is recreated.\n *\n * @param contextId - Optional ID of the animation context. If omitted, kills all animations\n *\n * @example\n * ```typescript\n * // Kill specific context when transitioning scenes\n * gsapPlugin.killAll('oldSceneAnimations');\n *\n * // Emergency stop all animations\n * gsapPlugin.killAll();\n * ```\n */\n killAll(contextId?: string): void;\n\n /**\n * Reverts all animations in a specified custom animation context to their initial state.\n *\n * @param contextId - Optional ID of the animation context. If omitted, reverts all animations\n *\n * @example\n * ```typescript\n * // Reset UI animations to initial state\n * gsapPlugin.revertAll('uiAnimations');\n *\n * // Reset everything for game restart\n * gsapPlugin.revertAll();\n * ```\n */\n revertAll(contextId?: string): void;\n\n /**\n * Clears (removes) a specific custom animation context and its tracked animations.\n * If this results in no active contexts, the global collection is recreated if all contexts are cleared.\n *\n * @param contextId - The ID of the animation context to clear\n *\n * @example\n * ```typescript\n * // Clean up completed level animations\n * gsapPlugin.clear('level1Animations');\n * ```\n */\n clear(contextId: string): void;\n\n /**\n * Clears all custom animation contexts and recreates the plugin's global animation collection.\n *\n * @example\n * ```typescript\n * // Complete reset when restarting the game\n * gsapPlugin.clearAll();\n * ```\n */\n clearAll(): void;\n\n /**\n * Kills all animations within the global animation collection managed by this plugin.\n *\n * @example\n * ```typescript\n * // Stop only global animations, keep context-specific ones\n * gsapPlugin.killGlobal();\n * ```\n */\n killGlobal(): void;\n\n /**\n * Reverts all animations within the global animation collection to their initial state.\n *\n * @example\n * ```typescript\n * // Reset global animations without affecting contexts\n * gsapPlugin.revertGlobal();\n * ```\n */\n revertGlobal(): void;\n\n /**\n * Clears all animations from the global animation collection managed by this plugin.\n *\n * @example\n * ```typescript\n * // Clear global animations for cleanup\n * gsapPlugin.clearGlobal();\n * ```\n */\n clearGlobal(): void;\n\n // signals\n onPlayAll: Signal<(contextId: string) => void>;\n onPauseAll: Signal<(contextId: string) => void>;\n onKillAll: Signal<(contextId: string) => void>;\n onRevertAll: Signal<(contextId: string) => void>;\n onClear: Signal<(detail: { contextId: string; kill: boolean }) => void>;\n onClearAll: Signal<(kill: boolean) => void>;\n onKillGlobal: Signal<() => void>;\n onRevertGlobal: Signal<() => void>;\n onClearGlobal: Signal<(kill: boolean) => void>;\n onEaseRegistered: Signal<(detail: { name: string; ease: gsap.EaseFunction }) => void>;\n onEasesRegistered: Signal<(eases: Eases) => void>;\n onAnimationAddded: Signal<(detail: { animation: gsap.core.Tween | gsap.core.Timeline; contextId: string }) => void>;\n}\n\n/**\n * Type alias for animation context collections.\n * Represents a Set containing GSAP tweens and timelines for grouped animation management.\n */\nexport type AnimationContext = Set<gsap.core.Tween | gsap.core.Timeline>;\n\n/**\n * High-performance GSAP animation plugin for PIXI.js applications.\n *\n * Integrates the GreenSock Animation Platform (GSAP) into the application framework,\n * providing powerful and flexible animation capabilities with optimized PIXI.js integration.\n * Features custom animation context management for grouped animation control, custom easing\n * registration, and automatic PIXI.js property animation support.\n *\n * Key Features:\n * - Full GSAP integration with PIXI.js optimization\n * - Custom animation contexts for grouped control (pause/play/kill by category)\n * - Custom easing function registration and management\n * - Automatic PIXI filter integration (BlurFilter, ColorMatrixFilter)\n * - Memory-efficient animation tracking and cleanup\n * - Global and context-specific animation management\n *\n * **Important:** Animation \"contexts\" in this plugin are custom collections (Sets) for grouping\n * animations and are NOT the same as `gsap.Context` objects provided by GSAP itself.\n *\n * @example\n * ```typescript\n * // Basic setup and usage\n * const gsapPlugin = app.plugins.get<IGSAPPlugin>('GSAPPlugin');\n *\n * // Create optimized PIXI animations\n * const sprite = new PIXI.Sprite(texture);\n * gsapPlugin.anim.to(sprite, {\n * x: 100,\n * y: 50,\n * alpha: 0.8,\n * duration: 1,\n * ease: 'back.out(1.7)'\n * });\n *\n * // Register custom eases for game feel\n * gsapPlugin.registerCustomEase('gameJuice', (t) => {\n * return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;\n * });\n *\n * // Context-based animation management\n * const menuTween = gsapPlugin.anim.to(menuButton, { scale: 1.1, duration: 0.3 });\n * gsapPlugin.addAnimation(menuTween, 'menuAnimations');\n *\n * // Later: pause all menu animations when game starts\n * gsapPlugin.pauseAll('menuAnimations');\n *\n * // Animate PIXI filters\n * const blurFilter = new PIXI.BlurFilter();\n * sprite.filters = [blurFilter];\n * gsapPlugin.anim.to(blurFilter, { blur: 10, duration: 2 });\n * ```\n *\n * @remarks\n * - Automatically registers PixiPlugin for optimized PIXI.js property animations\n * - Includes ColorMatrixFilter and BlurFilter integration for advanced effects\n * - Uses efficient Set-based tracking for O(1) animation context operations\n * - Provides both global and context-specific animation lifecycle management\n * - Custom eases are automatically registered with GSAP and stored for reference\n */\nexport class GSAPPlugin extends Plugin implements IGSAPPlugin {\n /** Internal identifier for the global animation context */\n private static readonly GLOBAL_CONTEXT_ID = '__caper_global';\n\n /** Plugin identifier for framework registration */\n public readonly id = 'GSAPPlugin';\n\n // signals\n public onPlayAll = new Signal<(contextId: string) => void>();\n public onPauseAll = new Signal<(contextId: string) => void>();\n public onKillAll = new Signal<(contextId: string) => void>();\n public onRevertAll = new Signal<(contextId: string) => void>();\n public onClear = new Signal<(detail: { contextId: string; kill: boolean }) => void>();\n public onClearAll = new Signal<(kill: boolean) => void>();\n public onKillGlobal = new Signal<() => void>();\n public onRevertGlobal = new Signal<() => void>();\n public onClearGlobal = new Signal<(kill: boolean) => void>();\n public onEaseRegistered = new Signal<(detail: { name: string; ease: gsap.EaseFunction }) => void>();\n public onEasesRegistered = new Signal<(eases: Eases) => void>();\n public onAnimationAddded = new Signal<\n (detail: { animation: gsap.core.Tween | gsap.core.Timeline; contextId: string }) => void\n >();\n\n /** Global animation context reference for quick access */\n private _globalContext: AnimationContext;\n\n /** Map of all custom animation contexts by their string identifiers */\n private _animationContexts: Map<string, AnimationContext> = new Map();\n\n /**\n * Array of all registered custom ease names.\n * @readonly\n */\n public get easeNames(): string[] {\n return Object.keys(this.eases);\n }\n\n /**\n * Object containing all registered custom eases.\n * @readonly\n */\n public get eases(): Eases {\n return this.options.eases || {};\n }\n\n /**\n * Initializes the GSAP plugin with PIXI.js integration and custom configurations.\n * Sets up PixiPlugin, registers custom eases, and creates the global animation context.\n *\n * @param _ - Plugin options (currently unused, relies on app.config.gsap)\n * @param app - The application instance providing configuration\n *\n * @example\n * ```typescript\n * // Plugin is automatically initialized by the framework\n * // Configuration comes from app.config.gsap\n * const config = {\n * gsap: {\n * eases: {\n * 'customBounce': (t) => t * t * (3 - 2 * t),\n * 'gameEase': (t) => Math.pow(t, 2.5)\n * }\n * }\n * };\n * ```\n */\n public async initialize(_: any, app: IApplication) {\n this._options = app.config.gsap || {};\n\n if (this._options.eases) {\n this.registerEases(this._options.eases);\n }\n gsap.registerPlugin(PixiPlugin);\n\n PixiPlugin.registerPIXI({\n filters: {\n ColorMatrixFilter,\n BlurFilter,\n },\n });\n\n this.createGlobalContext();\n }\n\n /**\n * Creates and initializes the global animation context.\n * Sets up the default context for animations not assigned to specific contexts.\n * @protected\n */\n protected createGlobalContext(): void {\n this._animationContexts.set(GSAPPlugin.GLOBAL_CONTEXT_ID, new Set());\n }\n\n /**\n * Registers a single custom ease function with GSAP.\n * The ease becomes available for use in all GSAP animations by name.\n *\n * @param name - Unique name identifier for the ease\n * @param ease - GSAP-compatible easing function (takes progress 0-1, returns eased value)\n * @returns Object containing the registered ease for chaining or reference\n *\n * @example\n * ```typescript\n * // Register a custom elastic ease\n * gsapPlugin.registerCustomEase('elasticOut', (t) => {\n * const c4 = (2 * Math.PI) / 3;\n * return t === 0 ? 0 : t === 1 ? 1 :\n * Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c4) + 1;\n * });\n *\n * // Use in animations\n * gsap.to(mySprite, { x: 100, duration: 1, ease: 'elasticOut' });\n * ```\n */\n public registerCustomEase(name: string, ease: gsap.EaseFunction): Record<string, gsap.EaseFunction> {\n gsap.registerEase(name, ease);\n\n if (!this.options.eases) {\n this.options.eases = {};\n }\n this.options.eases[name] = ease;\n this.onEaseRegistered.emit({ name, ease });\n return { [name]: ease };\n }\n\n /**\n * Registers multiple custom ease functions with GSAP in a single operation.\n * Efficient batch registration for multiple custom eases.\n *\n * @param eases - Object mapping ease names to ease functions\n * @returns The complete map of all registered eases\n *\n * @example\n * ```typescript\n * // Register a suite of game-specific eases\n * gsapPlugin.registerEases({\n * 'jumpEase': (t) => t * t * (3 - 2 * t),\n * 'impactEase': (t) => 1 - Math.cos(t * Math.PI / 2),\n * 'floatEase': (t) => Math.sin(t * Math.PI / 2),\n * 'snapEase': (t) => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2\n * });\n * ```\n */\n public registerEases(eases: Eases): Eases {\n for (const [name, ease] of Object.entries(eases)) {\n this.registerCustomEase(name, ease);\n }\n this.onEasesRegistered.emit(eases);\n return this.eases;\n }\n\n /**\n * Gets the GSAP instance for creating animations.\n * Provides access to the full GSAP API with PIXI.js optimizations enabled.\n * @readonly\n */\n public get anim(): typeof gsap {\n return gsap;\n }\n\n /**\n * Adds animation(s) to a specified context for grouped management.\n * Creates the context if it doesn't exist. Defaults to global context if no contextId provided.\n *\n * @param animation - Single animation or array of animations to track\n * @param contextId - Context identifier (defaults to global context)\n * @returns The same animation(s) passed in for chaining\n *\n * @example\n * ```typescript\n * // Add to specific context for scene management\n * const levelTweens = [\n * gsap.to(player, { x: 100, duration: 2 }),\n * gsap.to(enemy, { rotation: Math.PI, duration: 1.5 }),\n * gsap.to(powerup, { scale: 1.2, yoyo: true, repeat: -1, duration: 0.8 })\n * ];\n * gsapPlugin.addAnimation(levelTweens, 'level1Gameplay');\n *\n * // Add to global context (default)\n * const bgTween = gsap.to(background, { alpha: 0.8, duration: 3 });\n * gsapPlugin.addAnimation(bgTween);\n * ```\n */\n public addAnimation(\n animation: gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[],\n contextId: string = GSAPPlugin.GLOBAL_CONTEXT_ID,\n ): gsap.core.Tween | gsap.core.Timeline | (gsap.core.Tween | gsap.core.Timeline)[] {\n if (!this._animationContexts.has(contextId)) {\n this._animationContexts.set(contextId, new Set());\n }\n const ctx = this._animationContexts.get(contextId);\n if (ctx) {\n if (Array.isArray(animation)) {\n animation.forEach((anim) => {\n ctx.add(anim);\n this.onAnimationAddded.emit({ animation: anim, contextId });\n });\n } else {\n ctx.add(animation);\n this.onAnimationAddded.emit({ animation, contextId });\n }\n }\n\n return animation;\n }\n\n /**\n * Retrieves a custom animation context by its identifier.\n * Returns null if the context doesn't exist.\n *\n * @param contextId - The context identifier to look up\n * @returns The animation context Set or null if not found\n *\n * @example\n * ```typescript\n * // Check if context exists and get info\n * const gameplayContext = gsapPlugin.getContext('gameplayAnimations');\n * if (gameplayContext) {\n * console.log(`Found ${gameplayContext.size} gameplay animations`);\n *\n * // Iterate through animations if needed\n * gameplayContext.forEach(animation => {\n * console.log('Animation progress:', animation.progress());\n * });\n * }\n * ```\n */\n public getContext(contextId: string): AnimationContext | null {\n return this._animationContexts.get(contextId) || null;\n }\n\n /**\n * Plays all animations in the specified context or all contexts.\n * Useful for resuming paused animations or ensuring all animations are active.\n *\n * @param contextId - Optional context identifier. If omitted, plays all animations in all contexts\n *\n * @example\n * ```typescript\n * // Resume specific context after pause\n * gsapPlugin.playAll('menuAnimations');\n *\n * // Resume all animations (e.g., after app regains focus)\n * gsapPlugin.playAll();\n *\n * // Conditional playback\n * if (gameState === 'playing') {\n * gsapPlugin.playAll('gameplayAnimations');\n * }\n * ```\n */\n public playAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) =>\n context.forEach((animation) => {\n animation.play();\n }),\n );\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => {\n animation.play();\n });\n }\n\n this.onPlayAll.emit(contextId ?? 'all');\n }\n\n /**\n * Pauses all animations in the specified context or all contexts.\n * Animations retain their current progress and can be resumed with playAll().\n *\n * @param contextId - Optional context identifier. If omitted, pauses all animations in all contexts\n *\n * @example\n * ```typescript\n * // Pause game animations when menu opens\n * gsapPlugin.pauseAll('gameplayAnimations');\n *\n * // Pause everything when app loses focus\n * window.addEventListener('blur', () => {\n * gsapPlugin.pauseAll();\n * });\n *\n * // Conditional pausing\n * if (gameState === 'paused') {\n * gsapPlugin.pauseAll('gameplayAnimations');\n * }\n * ```\n */\n public pauseAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) => context.forEach((animation) => animation.pause()));\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => animation.pause());\n }\n\n this.onPauseAll.emit(contextId ?? 'all');\n }\n\n /**\n * Kills (stops and removes) all animations in the specified context or all contexts.\n * Killed animations cannot be resumed and are removed from tracking.\n * If killing all contexts, the global context is automatically recreated.\n *\n * @param contextId - Optional context identifier. If omitted, kills all animations in all contexts\n *\n * @example\n * ```typescript\n * // Kill animations when transitioning scenes\n * gsapPlugin.killAll('currentSceneAnimations');\n *\n * // Emergency stop all animations\n * gsapPlugin.killAll();\n *\n * // Clean up specific context before recreation\n * gsapPlugin.killAll('temporaryEffects');\n * ```\n */\n public killAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((contextAnimations) => {\n contextAnimations.forEach((animation) => animation.kill());\n });\n this._animationContexts.clear(); // Clear all tracked animations from all contexts\n this.createGlobalContext(); // Re-initialize the global context and its tracking\n } else {\n const contextAnimations = this._animationContexts.get(contextId);\n if (contextAnimations) {\n contextAnimations.forEach((animation) => animation.kill());\n }\n this.clear(contextId); // Remove the specific context from tracking\n }\n this.onKillAll.emit(contextId ?? 'all');\n }\n\n /**\n * Reverts all animations in the specified context or all contexts to their initial state.\n * Animation targets return to their original property values before the animation started.\n *\n * @param contextId - Optional context identifier. If omitted, reverts all animations in all contexts\n *\n * @example\n * ```typescript\n * // Reset UI to initial state\n * gsapPlugin.revertAll('uiAnimations');\n *\n * // Reset everything for game restart\n * gsapPlugin.revertAll();\n *\n * // Reset temporary effects\n * gsapPlugin.revertAll('screenEffects');\n * ```\n */\n public revertAll(contextId?: string): void {\n if (!contextId) {\n this._animationContexts.forEach((context) => context.forEach((animation) => animation.revert()));\n } else {\n this._animationContexts.get(contextId)?.forEach((animation) => animation.revert());\n }\n\n this.onRevertAll.emit(contextId ?? 'all');\n }\n\n /**\n * Clears (removes) a specific animation context from tracking.\n * Optionally kills the animations before clearing the context.\n *\n * @param contextId - The context identifier to clear\n * @param kill - Whether to kill animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Clear completed level context\n * gsapPlugin.clear('level1Animations');\n *\n * // Clear and kill animations simultaneously\n * gsapPlugin.clear('temporaryEffects', true);\n * ```\n */\n public clear(contextId: string, kill: boolean = false): void {\n if (kill) {\n this.killAll(contextId);\n }\n this._animationContexts.delete(contextId);\n\n this.onClear.emit({ contextId, kill });\n }\n\n /**\n * Clears all animation contexts and recreates the global context.\n * Optionally kills all animations before clearing contexts.\n *\n * @param kill - Whether to kill all animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Complete reset for new game\n * gsapPlugin.clearAll(true);\n *\n * // Clear tracking without killing animations\n * gsapPlugin.clearAll(false);\n * ```\n */\n public clearAll(kill: boolean = false): void {\n if (kill) {\n this.killAll();\n }\n this._animationContexts.clear();\n this.createGlobalContext(); // Re-initialize the global context tracking\n\n this.onClearAll.emit(kill);\n }\n\n /**\n * Kills all animations within the global animation context only.\n * This affects only animations added to the global context, not other custom contexts.\n *\n * @example\n * ```typescript\n * // Kill only global animations, preserve context-specific ones\n * gsapPlugin.killGlobal();\n *\n * // Useful for clearing background animations while keeping UI animations\n * gsapPlugin.killGlobal();\n * gsapPlugin.playAll('uiAnimations'); // UI animations continue\n * ```\n */\n public killGlobal(): void {\n const globalAnimations = this._animationContexts.get(GSAPPlugin.GLOBAL_CONTEXT_ID);\n if (globalAnimations) {\n globalAnimations.forEach((anim) => anim.kill());\n globalAnimations.clear();\n }\n\n this.onKillGlobal.emit();\n }\n\n /**\n * Reverts all animations within the global animation context to their initial state.\n * Only affects animations in the global context, not custom contexts.\n *\n * @example\n * ```typescript\n * // Reset only global animations\n * gsapPlugin.revertGlobal();\n *\n * // Reset global animations while preserving context states\n * gsapPlugin.revertGlobal();\n * // Context-specific animations remain unchanged\n * ```\n */\n public revertGlobal(): void {\n const globalAnimations = this._animationContexts.get(GSAPPlugin.GLOBAL_CONTEXT_ID);\n if (globalAnimations) {\n globalAnimations.forEach((anim) => anim.revert());\n }\n\n this.onRevertGlobal.emit();\n }\n\n /**\n * Clears all animations from the global animation context.\n * Optionally kills the animations before clearing from tracking.\n *\n * @param kill - Whether to kill animations before clearing (default: false)\n *\n * @example\n * ```typescript\n * // Clear global context without killing\n * gsapPlugin.clearGlobal();\n *\n * // Clear and kill global animations\n * gsapPlugin.clearGlobal(true);\n * ```\n */\n public clearGlobal(kill: boolean = false): void {\n if (kill) {\n this.killGlobal();\n }\n this._globalContext.clear();\n\n this.onClearGlobal.emit(kill);\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;AAUA,IAAIA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAAgB,WAAyB;AAC3C,QAAO,OAAO,SAAW;GAEvB,IAAW,WAAoB;AACjC,QAAOA,KAAQ,GAAe,KAAK,IAAO,OAAO,SAASA,EAAK,kBAAkBA;GAE/E,IAAc,SAAqB,GAAO;AAC5C,QAAO,OAAO,KAAU;GAEtB,IAAQ,SAAe,GAAS;AAClC,QAAO,QAAQ,KAAK,EAAQ;GAE1B,IAAY;CAAC;CA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KAAK,cAAc,KAAK,EAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, u as m } from "./DebugRenderer-
|
|
1
|
+
import { $ as e } from "./registries-qQmLeN0b.js";
|
|
2
|
+
import { a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, u as m } from "./DebugRenderer-C7X-nlXE.js";
|
|
3
3
|
import { AbstractText as h, Container as g, ExtensionType as _, NineSliceSprite as v, Point as y, Rectangle as b, TilingSprite as x, ViewContainer as S, extensions as C } from "pixi.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/@pixi+layout@3.2.0_@types+react@19.1.8_pixi.js@8.19.0_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/yoga.mjs
|
|
5
5
|
var w;
|
|
@@ -241,7 +241,7 @@ var ue = Object.defineProperty, de = (e, t, n) => t in e ? ue(e, t, {
|
|
|
241
241
|
}), this._modificationCount = a ?? this._modificationCount;
|
|
242
242
|
}
|
|
243
243
|
async enableDebug(e = !this._debugEnabled) {
|
|
244
|
-
this._debugEnabled = e, this._debugRenderer ||= new (await (import("./DebugRenderer-
|
|
244
|
+
this._debugEnabled = e, this._debugRenderer ||= new (await (import("./DebugRenderer-C7X-nlXE.js").then((e) => e.t))).DebugRenderer(), this._debugEnabled || this._debugRenderer.reset();
|
|
245
245
|
}
|
|
246
246
|
update(e) {
|
|
247
247
|
this._debugEnabled && this._debugRenderer && (this._debugRenderer.reset(), e.addChild(this._debugRenderer.holder)), this._throttle === 0 ? this._updateSize(e) : this._throttledUpdateSize(e), this.updateLayout(e);
|
|
@@ -1268,4 +1268,4 @@ var Ue = class extends e {
|
|
|
1268
1268
|
//#endregion
|
|
1269
1269
|
export { Ue as LayoutPlugin };
|
|
1270
1270
|
|
|
1271
|
-
//# sourceMappingURL=LayoutPlugin-
|
|
1271
|
+
//# sourceMappingURL=LayoutPlugin-iZ3k6RsK.js.map
|