From f3685fdaf4e0b40d3c8800b06151d0ed26d791ae Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Wed, 22 May 2024 09:58:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20pixijs/u?= =?UTF-8?q?i@33a53374d3eb5bb119bcb91448d31044a7753c4e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Button.html | 31 +- ButtonContainer.html | 28 +- ButtonEvents.html | 24 +- CheckBox.html | 24 +- CircularProgressBar.html | 28 +- DoubleSlider.html | 32 +- DragObject.html | 26 +- FancyButton.html | 396 +++++++++++++++- Input.html | 38 +- List.html | 30 +- MaskedFrame.html | 28 +- ProgressBar.html | 46 +- RadioGroup.html | 24 +- ScrollBox.html | 437 +++++++++++++++++- Select.html | 24 +- Slider.html | 32 +- SliderBase.html | 32 +- Switcher.html | 24 +- Trackpad.html | 24 +- index.html | 28 +- storybook/1127.7f00f9d2.iframe.bundle.js | 2 - storybook/2157.dd93b35a.iframe.bundle.js | 2 + ...157.dd93b35a.iframe.bundle.js.LICENSE.txt} | 0 storybook/2604.72bc2cf7.iframe.bundle.js | 1 + storybook/2857.e1a7f286.iframe.bundle.js | 1 - storybook/2892.58b8270d.iframe.bundle.js | 2 - storybook/2903.528bd197.iframe.bundle.js | 2 + ...903.528bd197.iframe.bundle.js.LICENSE.txt} | 0 storybook/2939.092dd382.iframe.bundle.js | 9 + ...2939.092dd382.iframe.bundle.js.LICENSE.txt | 1 + storybook/2939.092dd382.iframe.bundle.js.map | 1 + storybook/3566.08a5e604.iframe.bundle.js | 1 - storybook/378.c06cee7e.iframe.bundle.js | 1 - storybook/3879.ea42a152.iframe.bundle.js | 1 + storybook/4155.d6e341ca.iframe.bundle.js | 1 + storybook/4334.0e3cd18e.iframe.bundle.js | 1 - storybook/4746.db4e10ef.iframe.bundle.js | 1 + storybook/4902.1c95967a.iframe.bundle.js | 2 - storybook/4979.0638e949.iframe.bundle.js | 1 - storybook/5054.299b7baa.iframe.bundle.js | 1 + storybook/5347.2049d6ca.iframe.bundle.js | 1 - storybook/5511.444471a9.iframe.bundle.js | 1 + storybook/5634.73ff973b.iframe.bundle.js | 1 - storybook/7798.2cf3212f.iframe.bundle.js | 1 - storybook/7824.7c6d7fed.iframe.bundle.js | 1 - storybook/80.f8cd014b.iframe.bundle.js | 1 - storybook/8645.2f5fe72c.iframe.bundle.js | 1 - storybook/8818.45882e54.iframe.bundle.js | 1 - storybook/8837.aeb1c13d.iframe.bundle.js | 17 - storybook/8837.aeb1c13d.iframe.bundle.js.map | 1 - storybook/8860.2a3f4b96.iframe.bundle.js | 2 + ...860.2a3f4b96.iframe.bundle.js.LICENSE.txt} | 0 storybook/9025.7d69c3a1.iframe.bundle.js | 1 - ...Switcher-stories.0f94850d.iframe.bundle.js | 2 + ...ies.0f94850d.iframe.bundle.js.LICENSE.txt} | 0 ...erSprite-stories.1d298110.iframe.bundle.js | 1 - ...erSprite-stories.9c08e189.iframe.bundle.js | 1 + ...Graphics-stories.15af6cfd.iframe.bundle.js | 1 + ...Graphics-stories.e0533ccb.iframe.bundle.js | 1 - ...onSprite-stories.61517759.iframe.bundle.js | 2 + ...ies.61517759.iframe.bundle.js.LICENSE.txt} | 0 ...onSprite-stories.65c70bc6.iframe.bundle.js | 2 - ...Graphics-stories.60bb9b67.iframe.bundle.js | 1 - ...Graphics-stories.aee0e2f2.iframe.bundle.js | 1 + ...kBoxHTML-stories.94f1d3c8.iframe.bundle.js | 1 + ...kBoxHTML-stories.a38f58d9.iframe.bundle.js | 1 - ...oxSprite-stories.553eebf3.iframe.bundle.js | 2 + ...ies.553eebf3.iframe.bundle.js.LICENSE.txt} | 0 ...oxSprite-stories.f1a32822.iframe.bundle.js | 2 - ...tmapText-stories.271566b5.iframe.bundle.js | 2 + ...ies.271566b5.iframe.bundle.js.LICENSE.txt} | 0 ...tmapText-stories.a101572a.iframe.bundle.js | 2 - ...icUpdate-stories.40b007ee.iframe.bundle.js | 2 + ...ies.40b007ee.iframe.bundle.js.LICENSE.txt} | 0 ...icUpdate-stories.ee7f35ff.iframe.bundle.js | 2 - ...Graphics-stories.0c350e57.iframe.bundle.js | 1 + ...Graphics-stories.b5a424f9.iframe.bundle.js | 1 - ...HTMLText-stories.3c59322e.iframe.bundle.js | 2 - ...HTMLText-stories.75da4eeb.iframe.bundle.js | 2 + ...ies.75da4eeb.iframe.bundle.js.LICENSE.txt} | 0 ...ttonIcon-stories.b0339fa3.iframe.bundle.js | 1 - ...ttonIcon-stories.c5713276.iframe.bundle.js | 1 + ...neSprite-stories.cf491fe6.iframe.bundle.js | 1 + ...ceSprite-stories.7f3aa427.iframe.bundle.js | 1 - ...onSprite-stories.260360e1.iframe.bundle.js | 2 + ...ies.260360e1.iframe.bundle.js.LICENSE.txt} | 0 ...onSprite-stories.8096dda5.iframe.bundle.js | 2 - ...TextLink-stories.540f683e.iframe.bundle.js | 1 + ...TextLink-stories.8de0d4fa.iframe.bundle.js | 1 - storybook/iframe.html | 14 +- storybook/index.html | 1 - storybook/index.json | 2 +- ...Graphics-stories.218aba61.iframe.bundle.js | 1 - ...Graphics-stories.443afce5.iframe.bundle.js | 1 + ...icePlane-stories.20fad4c7.iframe.bundle.js | 2 + ...ies.20fad4c7.iframe.bundle.js.LICENSE.txt} | 0 ...ceSprite-stories.fd009226.iframe.bundle.js | 2 - ...utSprite-stories.4aef99f3.iframe.bundle.js | 2 - ...utSprite-stories.84b68922.iframe.bundle.js | 2 + ...ies.84b68922.iframe.bundle.js.LICENSE.txt} | 0 ...Graphics-stories.0a31ca55.iframe.bundle.js | 1 - ...Graphics-stories.aa715cff.iframe.bundle.js | 1 + ...stSprite-stories.7e1a9cba.iframe.bundle.js | 2 + ...ies.7e1a9cba.iframe.bundle.js.LICENSE.txt} | 0 ...stSprite-stories.fee6c9e5.iframe.bundle.js | 2 - storybook/main.2370a3e8.iframe.bundle.js | 1 - storybook/main.7352b357.iframe.bundle.js | 1 + ...Graphics-stories.9e0109c0.iframe.bundle.js | 1 - ...Graphics-stories.e5390502.iframe.bundle.js | 1 + ...meSprite-stories.63400763.iframe.bundle.js | 1 + ...meSprite-stories.f0a4d874.iframe.bundle.js | 1 - ...Circular-stories.6d094372.iframe.bundle.js | 1 + ...Circular-stories.f8b5651b.iframe.bundle.js | 1 - ...Graphics-stories.931968ad.iframe.bundle.js | 1 + ...Graphics-stories.e30be7c1.iframe.bundle.js | 1 - ...icePlane-stories.b15f0594.iframe.bundle.js | 2 + ...ies.b15f0594.iframe.bundle.js.LICENSE.txt} | 0 ...ceSprite-stories.df6ef7f2.iframe.bundle.js | 2 - ...arSprite-stories.11825213.iframe.bundle.js | 2 + ...ies.11825213.iframe.bundle.js.LICENSE.txt} | 0 ...arSprite-stories.633b822d.iframe.bundle.js | 2 - storybook/project.json | 2 +- ...Graphics-stories.28d164f7.iframe.bundle.js | 1 - ...Graphics-stories.3367e5b9.iframe.bundle.js | 1 + ...ioSprite-stories.c860087d.iframe.bundle.js | 2 + ...ies.c860087d.iframe.bundle.js.LICENSE.txt} | 0 ...ioSprite-stories.cfa872ba.iframe.bundle.js | 2 - .../runtime~main.1d787886.iframe.bundle.js | 1 + .../runtime~main.6cbfd576.iframe.bundle.js | 1 - .../sb-addons/actions-0/manager-bundle.js | 2 +- .../sb-addons/backgrounds-1/manager-bundle.js | 12 +- .../sb-addons/controls-2/manager-bundle.js | 150 ++++-- storybook/sb-addons/links-4/manager-bundle.js | 2 +- .../sb-addons/storysource-5/manager-bundle.js | 21 +- .../storysource-5/manager-bundle.js.LEGAL.txt | 14 + .../sb-addons/viewport-3/manager-bundle.js | 2 +- .../WithTooltip-4HIR6TLV-L6ICANXH.js | 1 + .../WithTooltip-V3YHNWJZ-TRLNWEGW.js | 1 - .../{chunk-4IYAVH3S.js => chunk-5AW67ZFX.js} | 14 +- .../{chunk-VFHDXWEA.js => chunk-AOJK37XK.js} | 46 +- storybook/sb-manager/chunk-CXYKRFSY.js | 9 - storybook/sb-manager/chunk-LVLAH4SI.js | 7 - storybook/sb-manager/chunk-OQCANWBN.js | 7 + storybook/sb-manager/chunk-TCCQ5FBZ.js | 9 + storybook/sb-manager/globals-module-info.js | 1 - storybook/sb-manager/globals.js | 2 +- storybook/sb-manager/index.js | 2 +- storybook/sb-manager/runtime.js | 2 +- ...=> syntaxhighlighter-NMPM6SWI-WFK223KV.js} | 2 +- storybook/sb-preview/globals.js | 2 +- storybook/sb-preview/runtime.js | 38 +- ...mensions-stories.2bd3eb62.iframe.bundle.js | 1 - ...mensions-stories.abcdb99f.iframe.bundle.js | 1 + ...Graphics-stories.b276322a.iframe.bundle.js | 1 - ...Graphics-stories.e74a54d3.iframe.bundle.js | 1 + ...roximity-stories.3aee864d.iframe.bundle.js | 1 + ...oxSprite-stories.460eb40a.iframe.bundle.js | 2 - ...oxSprite-stories.d7112513.iframe.bundle.js | 2 + ...ies.d7112513.iframe.bundle.js.LICENSE.txt} | 0 ...Graphics-stories.2a9e0e1d.iframe.bundle.js | 1 + ...Graphics-stories.b18a5199.iframe.bundle.js | 1 - ...HTMLText-stories.0c4bb045.iframe.bundle.js | 1 + ...HTMLText-stories.b4200317.iframe.bundle.js | 1 - ...ctSprite-stories.121cd26e.iframe.bundle.js | 1 - ...ctSprite-stories.a7b9b7d8.iframe.bundle.js | 1 + ...Graphics-stories.12db0f49.iframe.bundle.js | 1 + ...Graphics-stories.4514aac2.iframe.bundle.js | 1 - ...icePlane-stories.47caa7a9.iframe.bundle.js | 2 + ...ies.47caa7a9.iframe.bundle.js.LICENSE.txt} | 0 ...ceSprite-stories.e43743f1.iframe.bundle.js | 2 - ...erSprite-stories.1ef2d68c.iframe.bundle.js | 2 + ...ies.1ef2d68c.iframe.bundle.js.LICENSE.txt} | 0 ...erSprite-stories.50e7f167.iframe.bundle.js | 2 - ...Graphics-stories.4ab5be78.iframe.bundle.js | 1 - ...Graphics-stories.c9c78ec0.iframe.bundle.js | 1 + ...icePlane-stories.388a1fd3.iframe.bundle.js | 2 + ...ies.388a1fd3.iframe.bundle.js.LICENSE.txt} | 0 ...ceSprite-stories.b38c304c.iframe.bundle.js | 2 - ...erSprite-stories.b5e08dbb.iframe.bundle.js | 2 + ...ies.b5e08dbb.iframe.bundle.js.LICENSE.txt} | 0 ...erSprite-stories.c1996035.iframe.bundle.js | 2 - storybook/stories.json | 2 +- ...Switcher-stories.59f5f342.iframe.bundle.js | 2 - 183 files changed, 1595 insertions(+), 309 deletions(-) delete mode 100644 storybook/1127.7f00f9d2.iframe.bundle.js create mode 100644 storybook/2157.dd93b35a.iframe.bundle.js rename storybook/{1127.7f00f9d2.iframe.bundle.js.LICENSE.txt => 2157.dd93b35a.iframe.bundle.js.LICENSE.txt} (100%) create mode 100644 storybook/2604.72bc2cf7.iframe.bundle.js delete mode 100644 storybook/2857.e1a7f286.iframe.bundle.js delete mode 100644 storybook/2892.58b8270d.iframe.bundle.js create mode 100644 storybook/2903.528bd197.iframe.bundle.js rename storybook/{2892.58b8270d.iframe.bundle.js.LICENSE.txt => 2903.528bd197.iframe.bundle.js.LICENSE.txt} (100%) create mode 100644 storybook/2939.092dd382.iframe.bundle.js create mode 100644 storybook/2939.092dd382.iframe.bundle.js.LICENSE.txt create mode 100644 storybook/2939.092dd382.iframe.bundle.js.map delete mode 100644 storybook/3566.08a5e604.iframe.bundle.js delete mode 100644 storybook/378.c06cee7e.iframe.bundle.js create mode 100644 storybook/3879.ea42a152.iframe.bundle.js create mode 100644 storybook/4155.d6e341ca.iframe.bundle.js delete mode 100644 storybook/4334.0e3cd18e.iframe.bundle.js create mode 100644 storybook/4746.db4e10ef.iframe.bundle.js delete mode 100644 storybook/4902.1c95967a.iframe.bundle.js delete mode 100644 storybook/4979.0638e949.iframe.bundle.js create mode 100644 storybook/5054.299b7baa.iframe.bundle.js delete mode 100644 storybook/5347.2049d6ca.iframe.bundle.js create mode 100644 storybook/5511.444471a9.iframe.bundle.js delete mode 100644 storybook/5634.73ff973b.iframe.bundle.js delete mode 100644 storybook/7798.2cf3212f.iframe.bundle.js delete mode 100644 storybook/7824.7c6d7fed.iframe.bundle.js delete mode 100644 storybook/80.f8cd014b.iframe.bundle.js delete mode 100644 storybook/8645.2f5fe72c.iframe.bundle.js delete mode 100644 storybook/8818.45882e54.iframe.bundle.js delete mode 100644 storybook/8837.aeb1c13d.iframe.bundle.js delete mode 100644 storybook/8837.aeb1c13d.iframe.bundle.js.map create mode 100644 storybook/8860.2a3f4b96.iframe.bundle.js rename storybook/{4902.1c95967a.iframe.bundle.js.LICENSE.txt => 8860.2a3f4b96.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/9025.7d69c3a1.iframe.bundle.js create mode 100644 storybook/Switcher-Switcher-stories.0f94850d.iframe.bundle.js rename storybook/{button-ButtonSprite-stories.65c70bc6.iframe.bundle.js.LICENSE.txt => Switcher-Switcher-stories.0f94850d.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/button-ButtonContainerSprite-stories.1d298110.iframe.bundle.js create mode 100644 storybook/button-ButtonContainerSprite-stories.9c08e189.iframe.bundle.js create mode 100644 storybook/button-ButtonGraphics-stories.15af6cfd.iframe.bundle.js delete mode 100644 storybook/button-ButtonGraphics-stories.e0533ccb.iframe.bundle.js create mode 100644 storybook/button-ButtonSprite-stories.61517759.iframe.bundle.js rename storybook/{checkbox-CheckBoxSprite-stories.f1a32822.iframe.bundle.js.LICENSE.txt => button-ButtonSprite-stories.61517759.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/button-ButtonSprite-stories.65c70bc6.iframe.bundle.js delete mode 100644 storybook/checkbox-CheckBoxGraphics-stories.60bb9b67.iframe.bundle.js create mode 100644 storybook/checkbox-CheckBoxGraphics-stories.aee0e2f2.iframe.bundle.js create mode 100644 storybook/checkbox-CheckBoxHTML-stories.94f1d3c8.iframe.bundle.js delete mode 100644 storybook/checkbox-CheckBoxHTML-stories.a38f58d9.iframe.bundle.js create mode 100644 storybook/checkbox-CheckBoxSprite-stories.553eebf3.iframe.bundle.js rename storybook/{fancyButton-FancyButtonBitmapText-stories.a101572a.iframe.bundle.js.LICENSE.txt => checkbox-CheckBoxSprite-stories.553eebf3.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/checkbox-CheckBoxSprite-stories.f1a32822.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonBitmapText-stories.271566b5.iframe.bundle.js rename storybook/{fancyButton-FancyButtonDynamicUpdate-stories.ee7f35ff.iframe.bundle.js.LICENSE.txt => fancyButton-FancyButtonBitmapText-stories.271566b5.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/fancyButton-FancyButtonBitmapText-stories.a101572a.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonDynamicUpdate-stories.40b007ee.iframe.bundle.js rename storybook/{fancyButton-FancyButtonHTMLText-stories.3c59322e.iframe.bundle.js.LICENSE.txt => fancyButton-FancyButtonDynamicUpdate-stories.40b007ee.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/fancyButton-FancyButtonDynamicUpdate-stories.ee7f35ff.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonGraphics-stories.0c350e57.iframe.bundle.js delete mode 100644 storybook/fancyButton-FancyButtonGraphics-stories.b5a424f9.iframe.bundle.js delete mode 100644 storybook/fancyButton-FancyButtonHTMLText-stories.3c59322e.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonHTMLText-stories.75da4eeb.iframe.bundle.js rename storybook/{fancyButton-FancyButtonSprite-stories.8096dda5.iframe.bundle.js.LICENSE.txt => fancyButton-FancyButtonHTMLText-stories.75da4eeb.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/fancyButton-FancyButtonIcon-stories.b0339fa3.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonIcon-stories.c5713276.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonNineSlicePlaneSprite-stories.cf491fe6.iframe.bundle.js delete mode 100644 storybook/fancyButton-FancyButtonNineSliceSprite-stories.7f3aa427.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonSprite-stories.260360e1.iframe.bundle.js rename storybook/{input-InputNineSliceSprite-stories.fd009226.iframe.bundle.js.LICENSE.txt => fancyButton-FancyButtonSprite-stories.260360e1.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/fancyButton-FancyButtonSprite-stories.8096dda5.iframe.bundle.js create mode 100644 storybook/fancyButton-FancyButtonTextLink-stories.540f683e.iframe.bundle.js delete mode 100644 storybook/fancyButton-FancyButtonTextLink-stories.8de0d4fa.iframe.bundle.js delete mode 100644 storybook/input-InputGraphics-stories.218aba61.iframe.bundle.js create mode 100644 storybook/input-InputGraphics-stories.443afce5.iframe.bundle.js create mode 100644 storybook/input-InputNineSlicePlane-stories.20fad4c7.iframe.bundle.js rename storybook/{input-InputSprite-stories.4aef99f3.iframe.bundle.js.LICENSE.txt => input-InputNineSlicePlane-stories.20fad4c7.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/input-InputNineSliceSprite-stories.fd009226.iframe.bundle.js delete mode 100644 storybook/input-InputSprite-stories.4aef99f3.iframe.bundle.js create mode 100644 storybook/input-InputSprite-stories.84b68922.iframe.bundle.js rename storybook/{list-ListSprite-stories.fee6c9e5.iframe.bundle.js.LICENSE.txt => input-InputSprite-stories.84b68922.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/list-ListGraphics-stories.0a31ca55.iframe.bundle.js create mode 100644 storybook/list-ListGraphics-stories.aa715cff.iframe.bundle.js create mode 100644 storybook/list-ListSprite-stories.7e1a9cba.iframe.bundle.js rename storybook/{progressBar-ProgressBarNineSliceSprite-stories.df6ef7f2.iframe.bundle.js.LICENSE.txt => list-ListSprite-stories.7e1a9cba.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/list-ListSprite-stories.fee6c9e5.iframe.bundle.js delete mode 100644 storybook/main.2370a3e8.iframe.bundle.js create mode 100644 storybook/main.7352b357.iframe.bundle.js delete mode 100644 storybook/maskedFrame-MaskedFrameGraphics-stories.9e0109c0.iframe.bundle.js create mode 100644 storybook/maskedFrame-MaskedFrameGraphics-stories.e5390502.iframe.bundle.js create mode 100644 storybook/maskedFrame-MaskedFrameSprite-stories.63400763.iframe.bundle.js delete mode 100644 storybook/maskedFrame-MaskedFrameSprite-stories.f0a4d874.iframe.bundle.js create mode 100644 storybook/progressBar-ProgressBarCircular-stories.6d094372.iframe.bundle.js delete mode 100644 storybook/progressBar-ProgressBarCircular-stories.f8b5651b.iframe.bundle.js create mode 100644 storybook/progressBar-ProgressBarGraphics-stories.931968ad.iframe.bundle.js delete mode 100644 storybook/progressBar-ProgressBarGraphics-stories.e30be7c1.iframe.bundle.js create mode 100644 storybook/progressBar-ProgressBarNineSlicePlane-stories.b15f0594.iframe.bundle.js rename storybook/{progressBar-ProgressBarSprite-stories.633b822d.iframe.bundle.js.LICENSE.txt => progressBar-ProgressBarNineSlicePlane-stories.b15f0594.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/progressBar-ProgressBarNineSliceSprite-stories.df6ef7f2.iframe.bundle.js create mode 100644 storybook/progressBar-ProgressBarSprite-stories.11825213.iframe.bundle.js rename storybook/{radio-RadioSprite-stories.cfa872ba.iframe.bundle.js.LICENSE.txt => progressBar-ProgressBarSprite-stories.11825213.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/progressBar-ProgressBarSprite-stories.633b822d.iframe.bundle.js delete mode 100644 storybook/radio-RadioGraphics-stories.28d164f7.iframe.bundle.js create mode 100644 storybook/radio-RadioGraphics-stories.3367e5b9.iframe.bundle.js create mode 100644 storybook/radio-RadioSprite-stories.c860087d.iframe.bundle.js rename storybook/{scrollBox-ScrollBoxSprite-stories.460eb40a.iframe.bundle.js.LICENSE.txt => radio-RadioSprite-stories.c860087d.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/radio-RadioSprite-stories.cfa872ba.iframe.bundle.js create mode 100644 storybook/runtime~main.1d787886.iframe.bundle.js delete mode 100644 storybook/runtime~main.6cbfd576.iframe.bundle.js create mode 100644 storybook/sb-manager/WithTooltip-4HIR6TLV-L6ICANXH.js delete mode 100644 storybook/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js rename storybook/sb-manager/{chunk-4IYAVH3S.js => chunk-5AW67ZFX.js} (95%) rename storybook/sb-manager/{chunk-VFHDXWEA.js => chunk-AOJK37XK.js} (54%) delete mode 100644 storybook/sb-manager/chunk-CXYKRFSY.js delete mode 100644 storybook/sb-manager/chunk-LVLAH4SI.js create mode 100644 storybook/sb-manager/chunk-OQCANWBN.js create mode 100644 storybook/sb-manager/chunk-TCCQ5FBZ.js delete mode 100644 storybook/sb-manager/globals-module-info.js rename storybook/sb-manager/{syntaxhighlighter-B5GMVT5T-EA5ASEYD.js => syntaxhighlighter-NMPM6SWI-WFK223KV.js} (54%) delete mode 100644 storybook/scrollBox-ScrollBoxDynamicDimensions-stories.2bd3eb62.iframe.bundle.js create mode 100644 storybook/scrollBox-ScrollBoxDynamicDimensions-stories.abcdb99f.iframe.bundle.js delete mode 100644 storybook/scrollBox-ScrollBoxGraphics-stories.b276322a.iframe.bundle.js create mode 100644 storybook/scrollBox-ScrollBoxGraphics-stories.e74a54d3.iframe.bundle.js create mode 100644 storybook/scrollBox-ScrollBoxProximity-stories.3aee864d.iframe.bundle.js delete mode 100644 storybook/scrollBox-ScrollBoxSprite-stories.460eb40a.iframe.bundle.js create mode 100644 storybook/scrollBox-ScrollBoxSprite-stories.d7112513.iframe.bundle.js rename storybook/{slider-DoubleSliderNineSliceSprite-stories.e43743f1.iframe.bundle.js.LICENSE.txt => scrollBox-ScrollBoxSprite-stories.d7112513.iframe.bundle.js.LICENSE.txt} (100%) create mode 100644 storybook/select-SelectGraphics-stories.2a9e0e1d.iframe.bundle.js delete mode 100644 storybook/select-SelectGraphics-stories.b18a5199.iframe.bundle.js create mode 100644 storybook/select-SelectHTMLText-stories.0c4bb045.iframe.bundle.js delete mode 100644 storybook/select-SelectHTMLText-stories.b4200317.iframe.bundle.js delete mode 100644 storybook/select-SelectSprite-stories.121cd26e.iframe.bundle.js create mode 100644 storybook/select-SelectSprite-stories.a7b9b7d8.iframe.bundle.js create mode 100644 storybook/slider-DoubleSliderGraphics-stories.12db0f49.iframe.bundle.js delete mode 100644 storybook/slider-DoubleSliderGraphics-stories.4514aac2.iframe.bundle.js create mode 100644 storybook/slider-DoubleSliderNineSlicePlane-stories.47caa7a9.iframe.bundle.js rename storybook/{slider-DoubleSliderSprite-stories.50e7f167.iframe.bundle.js.LICENSE.txt => slider-DoubleSliderNineSlicePlane-stories.47caa7a9.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/slider-DoubleSliderNineSliceSprite-stories.e43743f1.iframe.bundle.js create mode 100644 storybook/slider-DoubleSliderSprite-stories.1ef2d68c.iframe.bundle.js rename storybook/{slider-SliderNineSliceSprite-stories.b38c304c.iframe.bundle.js.LICENSE.txt => slider-DoubleSliderSprite-stories.1ef2d68c.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/slider-DoubleSliderSprite-stories.50e7f167.iframe.bundle.js delete mode 100644 storybook/slider-SliderGraphics-stories.4ab5be78.iframe.bundle.js create mode 100644 storybook/slider-SliderGraphics-stories.c9c78ec0.iframe.bundle.js create mode 100644 storybook/slider-SliderNineSlicePlane-stories.388a1fd3.iframe.bundle.js rename storybook/{slider-SliderSprite-stories.c1996035.iframe.bundle.js.LICENSE.txt => slider-SliderNineSlicePlane-stories.388a1fd3.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/slider-SliderNineSliceSprite-stories.b38c304c.iframe.bundle.js create mode 100644 storybook/slider-SliderSprite-stories.b5e08dbb.iframe.bundle.js rename storybook/{switcher-Switcher-stories.59f5f342.iframe.bundle.js.LICENSE.txt => slider-SliderSprite-stories.b5e08dbb.iframe.bundle.js.LICENSE.txt} (100%) delete mode 100644 storybook/slider-SliderSprite-stories.c1996035.iframe.bundle.js delete mode 100644 storybook/switcher-Switcher-stories.59f5f342.iframe.bundle.js diff --git a/Button.html b/Button.html index 7513665d..ba727bbe 100644 --- a/Button.html +++ b/Button.html @@ -454,10 +454,18 @@
const container = new Container();
const button = new Button(
new Graphics()
- .rect(0, 0, 100, 50, 15)
- .fill(0xFFFFFF)
+ .beginFill(0xFFFFFF)
+ .drawRoundedRect(0, 0, 100, 50, 15)
);
button.onPress.connect(() => console.log('onPress'));
- container.addChild(button.view);
+ container.addChild(button.view);
+ // or container.addChild(container); which is the same
@@ -3026,7 +3049,7 @@ const button = new ButtonContainer(
new Graphics()
- .fill(0xFFFFFF)
- .roundRect(0, 0, 100, 50, 15)
+ .beginFill(0xFFFFFF)
+ .drawRoundedRect(0, 0, 100, 50, 15)
);
button.onPress.connect(() => console.log('onPress'));
@@ -1399,7 +1421,7 @@ Extends
diff --git a/ButtonEvents.html b/ButtonEvents.html
index a2721e8d..8977fb3f 100644
--- a/ButtonEvents.html
+++ b/ButtonEvents.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2546,7 +2568,7 @@
diff --git a/CheckBox.html b/CheckBox.html
index dc215d91..9d2dab84 100644
--- a/CheckBox.html
+++ b/CheckBox.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2862,7 +2884,7 @@
diff --git a/CircularProgressBar.html b/CircularProgressBar.html
index e8904025..7ca2b359 100644
--- a/CircularProgressBar.html
+++ b/CircularProgressBar.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1398,7 +1420,7 @@
- ColorSource
+ number
@@ -1428,7 +1450,7 @@
- ColorSource
+ number
@@ -1931,7 +1953,7 @@
diff --git a/DoubleSlider.html b/DoubleSlider.html
index be2895d7..5c681d35 100644
--- a/DoubleSlider.html
+++ b/DoubleSlider.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1395,8 +1417,8 @@
Sets height of a Sliders background and fill.
-If nineSliceSprite is set, then height will be set to nineSliceSprite.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlane.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -2009,8 +2031,8 @@
Sets width of a Sliders background and fill.
-If nineSliceSprite is set, then width will be set to nineSliceSprite.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlane.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -3148,7 +3170,7 @@
diff --git a/DragObject.html b/DragObject.html
index 6a66c948..9e1f70cb 100644
--- a/DragObject.html
+++ b/DragObject.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1338,7 +1360,7 @@ Extends
- - Container
+ - DisplayObject
@@ -1384,7 +1406,7 @@ Extends
diff --git a/FancyButton.html b/FancyButton.html
index a215198c..d781d11f 100644
--- a/FancyButton.html
+++ b/FancyButton.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1787,6 +1809,66 @@
+
+
+ options.defaultTextAnchor
+
+
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base text anchor to take into account when fitting and placing inside the button.
+
+
+
+
+
+
+
+ options.defaultIconAnchor
+
+
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base icon anchor to take into account when fitting and placing inside the button.
+
+
+
+
+
options.anchor
@@ -2233,6 +2315,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sets the base anchor for the icon view to take into account when fitting and placing inside the button.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the icon view base anchor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2335,6 +2519,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sets the base anchor for the text view to take into account when fitting and placing inside the button.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the text view base anchor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2718,8 +3004,8 @@
Sets height of a FancyButtons state views.
-If nineSliceSprite is set, then height will be set to nineSliceSprites of a views.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlanes of a views.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -3738,8 +4024,8 @@
Sets width of a FancyButtons state views.
-If nineSliceSprite is set, then width will be set to nineSliceSprites of a views.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlanes of a views.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -3815,6 +4101,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base icon anchor to take into account when fitting and placing inside the button
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3865,6 +4201,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base text anchor to take into account when fitting and placing inside the button
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5302,7 +5688,7 @@
diff --git a/Input.html b/Input.html
index 573e1f90..985d2778 100644
--- a/Input.html
+++ b/Input.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1408,7 +1430,7 @@
- PixiTextStyle
+ Partial<TextStyle>
@@ -1645,7 +1667,7 @@
- options.nineSliceSprite
+ options.nineSlicePlane
@@ -1659,7 +1681,7 @@
- NineSliceSprite values for bg and fill ([number, number, number, number]).
+ NineSlicePlane values for bg and fill ([number, number, number, number]).
@@ -1802,8 +1824,8 @@
Sets height of a Input.
-If nineSliceSprite is set, then height will be set to nineSliceSprite.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlane.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -2370,8 +2392,8 @@
Sets width of a Input.
-If nineSliceSprite is set, then width will be set to nineSliceSprite.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlane.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -2482,7 +2504,7 @@
diff --git a/List.html b/List.html
index da90d920..edaab549 100644
--- a/List.html
+++ b/List.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1340,12 +1362,12 @@ Example
const list = new List({
children: [
- new Graphics().rect(0, 0, 50, 50).fill(0x000000),
- new Graphics().rect(0, 0, 50, 50).fill(0xFFFFFF),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 50, 50),
+ new Graphics().beginFill(0xFFFFFF).drawRect(0, 0, 50, 50),
],
});
- list.addChild(new Graphics().rect(0, 0, 50, 50)).fill(0x000000);
+ list.addChild(new Graphics().beginFill(0x000000).drawRect(0, 0, 50, 50));
@@ -2825,7 +2847,7 @@
diff --git a/MaskedFrame.html b/MaskedFrame.html
index b31b23dd..8fb96f51 100644
--- a/MaskedFrame.html
+++ b/MaskedFrame.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1349,7 +1371,7 @@ Extends
- - Container
+ - Graphics
@@ -1789,7 +1811,7 @@
- FillStyleInputs
+ number
@@ -2062,7 +2084,7 @@
diff --git a/ProgressBar.html b/ProgressBar.html
index e90305a1..cbdd959f 100644
--- a/ProgressBar.html
+++ b/ProgressBar.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1603,12 +1625,12 @@
- options.nineSliceSprite
+ options.nineSlicePlane
- NineSliceSprite
+ NineSlicePlane
@@ -1625,7 +1647,7 @@
- NineSliceSprite values for bg and fill.
+ NineSlicePlane values for bg and fill.
@@ -1633,7 +1655,7 @@
- options.nineSliceSprite.bg
+ options.nineSlicePlane.bg
@@ -1655,7 +1677,7 @@
- NineSliceSprite config for bg ([number, number, number, number]).
+ NineSlicePlane config for bg ([number, number, number, number]).
@@ -1663,7 +1685,7 @@
- options.nineSliceSprite.fill
+ options.nineSlicePlane.fill
@@ -1685,7 +1707,7 @@
- NineSliceSprite config fill ([number, number, number, number]).
+ NineSlicePlane config fill ([number, number, number, number]).
@@ -1853,8 +1875,8 @@
Sets height of a ProgressBars background and fill.
-If nineSliceSprite is set, then height will be set to nineSliceSprite.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlane.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -2107,8 +2129,8 @@
Sets width of a ProgressBars background and fill.
-If nineSliceSprite is set, then width will be set to nineSliceSprite.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlane.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -2758,7 +2780,7 @@
diff --git a/RadioGroup.html b/RadioGroup.html
index d7d55e48..73d108d6 100644
--- a/RadioGroup.html
+++ b/RadioGroup.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2107,7 +2129,7 @@
diff --git a/ScrollBox.html b/ScrollBox.html
index 4154ba21..31787f06 100644
--- a/ScrollBox.html
+++ b/ScrollBox.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1860,13 +1882,13 @@ Example
width: 200,
height: 300,
items: [
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
- new Graphics().drawRect(0, 0, 200, 50).fill(0x000000),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
+ new Graphics().beginFill(0x000000).drawRect(0, 0, 200, 50),
],
});
@@ -1996,6 +2018,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the current raw scroll position on the x-axis (Negated Value).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sets the current raw scroll position on the x-axis (Negated Value).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the current raw scroll position on the y-axis (Negated Value).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sets the current raw scroll position on the y-axis (Negated Value).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2399,7 +2621,7 @@
- boolean | DestroyOptions
+ boolean | IDestroyOptions
@@ -2999,7 +3221,7 @@
isItemVisible
- (item) boolean
+ (item, padding) boolean
@@ -3036,6 +3258,8 @@
+ Default
+
Description
@@ -3058,6 +3282,10 @@
+
+
+
+
item to check.
@@ -3065,6 +3293,34 @@
+
+
+
+ padding
+
+
+
+
+ number
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ proximity padding to consider the item visible.
+
+
+
+
@@ -3708,6 +3964,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Scrolls to the given position.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ position
+
+
+
+
+ Partial<IPointData>
+
+
+
+
+
+
+
+
+ x and y position object.
+
+
+
+
+
+
+
+ position.x
+
+
+
+
+
+
+
+
+
+
+
+ x position.
+
+
+
+
+
+
+
+ position.y
+
+
+
+
+
+
+
+
+
+
+
+ y position.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3880,7 +4297,7 @@
diff --git a/Select.html b/Select.html
index 9dad2570..9d31c84d 100644
--- a/Select.html
+++ b/Select.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2309,7 +2331,7 @@
diff --git a/Slider.html b/Slider.html
index 1e0bfa06..714543fc 100644
--- a/Slider.html
+++ b/Slider.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1397,8 +1419,8 @@
Sets height of a Sliders background and fill.
-If nineSliceSprite is set, then height will be set to nineSliceSprite.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlane.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -1753,8 +1775,8 @@
Sets width of a Sliders background and fill.
-If nineSliceSprite is set, then width will be set to nineSliceSprite.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlane.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -3004,7 +3026,7 @@
diff --git a/SliderBase.html b/SliderBase.html
index 0ea7fff4..cc154b69 100644
--- a/SliderBase.html
+++ b/SliderBase.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2125,8 +2147,8 @@
Sets height of a ProgressBars background and fill.
-If nineSliceSprite is set, then height will be set to nineSliceSprite.
-If nineSliceSprite is not set, then height will control components height as Container.
+If nineSlicePlane is set, then height will be set to nineSlicePlane.
+If nineSlicePlane is not set, then height will control components height as Container.
@@ -2289,8 +2311,8 @@
Sets width of a ProgressBars background and fill.
-If nineSliceSprite is set, then width will be set to nineSliceSprite.
-If nineSliceSprite is not set, then width will control components width as Container.
+If nineSlicePlane is set, then width will be set to nineSlicePlane.
+If nineSlicePlane is not set, then width will control components width as Container.
@@ -2792,7 +2814,7 @@
diff --git a/Switcher.html b/Switcher.html
index cf528b81..60e7baac 100644
--- a/Switcher.html
+++ b/Switcher.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -2660,7 +2682,7 @@
diff --git a/Trackpad.html b/Trackpad.html
index 277306bb..5a89e648 100644
--- a/Trackpad.html
+++ b/Trackpad.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1376,7 +1398,7 @@
diff --git a/index.html b/index.html
index 04f3ccfe..cad8e125 100644
--- a/index.html
+++ b/index.html
@@ -454,10 +454,18 @@ PixiJS UI
anchor
+ defaultIconAnchor
+
+ defaultIconAnchor
+
defaultIconScale
defaultIconScale
+ defaultTextAnchor
+
+ defaultTextAnchor
+
defaultTextScale
defaultTextScale
@@ -516,8 +524,12 @@ PixiJS UI
width
+ _defaultIconAnchor
+
_defaultIconScale
+ _defaultTextAnchor
+
_defaultTextScale
options
@@ -902,6 +914,14 @@ PixiJS UI
items
+ scrollX
+
+ scrollX
+
+ scrollY
+
+ scrollY
+
width
@@ -945,6 +965,8 @@ PixiJS UI
scrollTop
+ scrollToPosition
+
setBackground
@@ -1300,12 +1322,12 @@ It is a library that contains commonly used UI components, that are extensib
We are now a part of the Open Collective and with your support you can help us make PixiJS even better. To make a donation, simply click the button below and we'll love you forever!
Compatibility
-Depending on your version of PixiJS, you'll need to figure out which major version of PixiUI to use.
+Depending on your version of PixiJS, you'll need to figure out which major version of PixiJS UI to use.
PixiJS
-PixiUI
+PixiJS UI
@@ -1371,7 +1393,7 @@ Known Issues
diff --git a/storybook/1127.7f00f9d2.iframe.bundle.js b/storybook/1127.7f00f9d2.iframe.bundle.js
deleted file mode 100644
index 13d75aed..00000000
--- a/storybook/1127.7f00f9d2.iframe.bundle.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see 1127.7f00f9d2.iframe.bundle.js.LICENSE.txt */
-"use strict";(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[1127],{"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{XI:()=>action});var v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),preview_errors=__webpack_require__("./node_modules/@storybook/core-events/dist/errors/preview-errors.mjs"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new preview_errors._U({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler}},"./src/Select.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>Select});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs"),typed_signals__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/typed-signals/dist/index.js"),_FancyButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/FancyButton.ts"),_ScrollBox__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/ScrollBox.ts"),_utils_helpers_view__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/utils/helpers/view.ts");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0;this.convertItemsToButtons(items).forEach((function(button,id){var text=button.text;id===selected&&(_this3.openButton.text=text,_this3.closeButton.text=text),button.onPress.connect((function(){_this3.value=id,_this3.onSelect.emit(id,text),_this3.openButton.text=text,_this3.closeButton.text=text,_this3.close()})),_this3.scrollBox.addItem(button)}))}},{key:"removeItem",value:function removeItem(itemID){this.scrollBox.removeItem(itemID)}},{key:"toggle",value:function toggle(){this.view.visible=!this.view.visible,this.openButton.visible=!this.openButton.visible}},{key:"open",value:function open(){this.view.visible=!0,this.openButton.visible=!1}},{key:"close",value:function close(){this.view.visible=!1,this.openButton.visible=!0}},{key:"convertItemsToButtons",value:function convertItemsToButtons(_ref2){var _TextClass2,items=_ref2.items,backgroundColor=_ref2.backgroundColor,hoverColor=_ref2.hoverColor,width=_ref2.width,height=_ref2.height,textStyle=_ref2.textStyle,TextClass=_ref2.TextClass,radius=_ref2.radius;TextClass=null!==(_TextClass2=TextClass)&&void 0!==_TextClass2?_TextClass2:pixi_js__WEBPACK_IMPORTED_MODULE_0__.EYj;var buttons=[];return items.forEach((function(item){var defaultView=(new pixi_js__WEBPACK_IMPORTED_MODULE_0__.A1g).roundRect(0,0,width,height,radius).fill(backgroundColor),color=null!=hoverColor?hoverColor:backgroundColor,hoverView=(new pixi_js__WEBPACK_IMPORTED_MODULE_0__.A1g).roundRect(0,0,width,height,radius).fill(color),text=new TextClass({text:item,style:textStyle}),button=new _FancyButton__WEBPACK_IMPORTED_MODULE_2__.w({defaultView,hoverView,text});buttons.push(button)})),buttons}}]),Select}(pixi_js__WEBPACK_IMPORTED_MODULE_0__.mcf)},"./src/stories/utils/loader.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>preload});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function preload(_x){return _preload.apply(this,arguments)}function _preload(){return _preload=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(assets){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,pixi_js__WEBPACK_IMPORTED_MODULE_0__.sP.load(assets);case 2:case"end":return _context.stop()}}),_callee)}))),_preload.apply(this,arguments)}}}]);
\ No newline at end of file
diff --git a/storybook/2157.dd93b35a.iframe.bundle.js b/storybook/2157.dd93b35a.iframe.bundle.js
new file mode 100644
index 00000000..da624de9
--- /dev/null
+++ b/storybook/2157.dd93b35a.iframe.bundle.js
@@ -0,0 +1,2 @@
+/*! For license information please see 2157.dd93b35a.iframe.bundle.js.LICENSE.txt */
+"use strict";(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2157],{"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{aD:()=>chunk_AY7I2SME.aD});var chunk_AY7I2SME=__webpack_require__("./node_modules/@storybook/addon-actions/dist/chunk-AY7I2SME.mjs")},"./src/Select.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{P:()=>Select});var _pixi_display__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/display/lib/index.mjs"),_pixi_graphics__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@pixi/graphics/lib/index.mjs"),_pixi_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@pixi/text/lib/index.mjs"),typed_signals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/typed-signals/dist/index.js"),_FancyButton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/FancyButton.ts"),_ScrollBox__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/ScrollBox.ts"),_utils_helpers_view__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/utils/helpers/view.ts");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _defineProperties(target,props){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0;this.convertItemsToButtons(items).forEach((function(button,id){var text=button.text;id===selected&&(_this3.openButton.text=text,_this3.closeButton.text=text),button.onPress.connect((function(){_this3.value=id,_this3.onSelect.emit(id,text),_this3.openButton.text=text,_this3.closeButton.text=text,_this3.close()})),_this3.scrollBox.addItem(button)}))}},{key:"removeItem",value:function removeItem(itemID){this.scrollBox.removeItem(itemID)}},{key:"toggle",value:function toggle(){this.openView.visible=!this.openView.visible,this.openButton.visible=!this.openButton.visible}},{key:"open",value:function open(){this.openView.visible=!0,this.openButton.visible=!1}},{key:"close",value:function close(){this.openView.visible=!1,this.openButton.visible=!0}},{key:"convertItemsToButtons",value:function convertItemsToButtons(_ref2){var _TextClass2,items=_ref2.items,backgroundColor=_ref2.backgroundColor,hoverColor=_ref2.hoverColor,width=_ref2.width,height=_ref2.height,textStyle=_ref2.textStyle,TextClass=_ref2.TextClass,radius=_ref2.radius;TextClass=null!==(_TextClass2=TextClass)&&void 0!==_TextClass2?_TextClass2:_pixi_text__WEBPACK_IMPORTED_MODULE_2__.xv;var buttons=[];return items.forEach((function(item){var defaultView=(new _pixi_graphics__WEBPACK_IMPORTED_MODULE_1__.TC).beginFill(backgroundColor).drawRoundedRect(0,0,width,height,radius),color=null!=hoverColor?hoverColor:backgroundColor,hoverView=(new _pixi_graphics__WEBPACK_IMPORTED_MODULE_1__.TC).beginFill(color).drawRoundedRect(0,0,width,height,radius),text=new TextClass(item,textStyle),button=new _FancyButton__WEBPACK_IMPORTED_MODULE_4__.s({defaultView,hoverView,text});buttons.push(button)})),buttons}}]),Select}(_pixi_display__WEBPACK_IMPORTED_MODULE_0__.W2)},"./src/stories/utils/color.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Lq:()=>getColor});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{__webpack_require__.d(__webpack_exports__,{M:()=>preload});var _pixi_assets__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/assets/lib/index.mjs");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function preload(_x){return _preload.apply(this,arguments)}function _preload(){return _preload=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(assets){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,_pixi_assets__WEBPACK_IMPORTED_MODULE_0__.de.load(assets);case 2:case"end":return _context.stop()}}),_callee)}))),_preload.apply(this,arguments)}}}]);
\ No newline at end of file
diff --git a/storybook/1127.7f00f9d2.iframe.bundle.js.LICENSE.txt b/storybook/2157.dd93b35a.iframe.bundle.js.LICENSE.txt
similarity index 100%
rename from storybook/1127.7f00f9d2.iframe.bundle.js.LICENSE.txt
rename to storybook/2157.dd93b35a.iframe.bundle.js.LICENSE.txt
diff --git a/storybook/2604.72bc2cf7.iframe.bundle.js b/storybook/2604.72bc2cf7.iframe.bundle.js
new file mode 100644
index 00000000..6ae62c78
--- /dev/null
+++ b/storybook/2604.72bc2cf7.iframe.bundle.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2604],{"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{aD:()=>chunk_AY7I2SME.aD});var chunk_AY7I2SME=__webpack_require__("./node_modules/@storybook/addon-actions/dist/chunk-AY7I2SME.mjs")},"./src/Input.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{I:()=>Input});var _pixi_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/core/lib/index.mjs"),_pixi_display__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@pixi/display/lib/index.mjs"),_pixi_graphics__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@pixi/graphics/lib/index.mjs"),_pixi_mesh_extras__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@pixi/mesh-extras/lib/index.mjs"),_pixi_sprite__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@pixi/sprite/lib/index.mjs"),_pixi_text__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@pixi/text/lib/index.mjs"),typed_signals__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/typed-signals/dist/index.js"),_utils_helpers_view__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/utils/helpers/view.ts");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _construct(Parent,args,Class){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&_setPrototypeOf(instance,Class.prototype),instance},_construct.apply(null,arguments)}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=this.options.maxLength||(this.value=this.value+key,this.onChange.emit(this.value)))}},{key:"_delete",value:function _delete(){if(this.editing&&0!==this.value.length){var array=this.value.split("");array.pop(),this.value=array.join(""),this.onChange.emit(this.value)}}},{key:"_startEditing",value:function _startEditing(){this.options.cleanOnFocus&&(this.value=""),this.tick=0,this.editing=!0,this.placeholder.visible=!1,this._cursor.alpha=1,_pixi_core__WEBPACK_IMPORTED_MODULE_0__.P6.isMobile.any&&this.createInputField(),this.align()}},{key:"createInputField",value:function createInputField(){var _this$input,_this$input2;this.input&&(this.input.removeEventListener("blur",this.stopEditingBinding),this.input.removeEventListener("keyup",this.onKeyUpBinding),null===(_this$input=this.input)||void 0===_this$input||_this$input.blur(),null===(_this$input2=this.input)||void 0===_this$input2||_this$input2.remove(),this.input=null);var input=document.createElement("input");document.body.appendChild(input),input.style.position="fixed",input.style.left="".concat(this.getGlobalPosition().x,"px"),input.style.top="".concat(this.getGlobalPosition().y,"px"),input.style.opacity="0.0000001",input.style.width="".concat(this._bg.width,"px"),input.style.height="".concat(this._bg.height,"px"),input.style.border="none",input.style.outline="none",input.style.background="white",_pixi_core__WEBPACK_IMPORTED_MODULE_0__.P6.isMobile.android.device?setTimeout((function(){input.focus(),input.click()}),100):(input.focus(),input.click()),input.addEventListener("blur",this.stopEditingBinding),input.addEventListener("keyup",this.onKeyUpBinding),this.input=input,this.align()}},{key:"handleActivation",value:function handleActivation(){this.stopEditing(),this.activation&&(this._startEditing(),this.activation=!1)}},{key:"stopEditing",value:function stopEditing(){if(this.editing){var _this$input3,_this$input4;if(this._cursor.alpha=0,this.editing=!1,""===this.inputField.text&&(this.placeholder.visible=!0),0===this.value.length&&(this.placeholder.visible=!0),_pixi_core__WEBPACK_IMPORTED_MODULE_0__.P6.isMobile.any)null===(_this$input3=this.input)||void 0===_this$input3||_this$input3.blur(),null===(_this$input4=this.input)||void 0===_this$input4||_this$input4.remove(),this.input=null;this.align(),this.onEnter.emit(this.value)}}},{key:"update",value:function update(dt){this.editing&&(this.tick+=.1*dt,this._cursor.alpha=Math.round(.5*Math.sin(this.tick)+.5))}},{key:"align",value:function align(){if(this._bg){var align=this.getAlign();this.inputField.anchor.set(align,.5),this.inputField.x=this._bg.width*align+(1===align?-this.paddingRight:this.paddingLeft),this.inputField.y=this._bg.height/2+this.paddingTop-this.paddingBottom,this.placeholder.anchor.set(align,.5),this.placeholder.x=this._bg.width*align+(1===align?-this.paddingRight:this.paddingLeft),this.placeholder.y=this._bg.height/2,this._cursor.x=this.getCursorPosX(),this._cursor.y=this.inputField.y}}},{key:"getAlign",value:function getAlign(){var maxWidth=.95*this._bg.width,paddings=this.paddingLeft+this.paddingRight-10;if(this.inputField.width+paddings>maxWidth)return this.editing?1:0;switch(this.options.align){case"left":default:return 0;case"center":return.5;case"right":return 1}}},{key:"getCursorPosX",value:function getCursorPosX(){switch(this.getAlign()){case 0:return this.inputField.x+this.inputField.width;case.5:return this.inputField.x+.5*this.inputField.width;case 1:return this.inputField.x;default:return 0}}},{key:"value",get:function get(){return this.inputField.text},set:function set(text){this.inputField.text=text,0!==text.length?this.placeholder.visible=!1:this.placeholder.visible=!this.editing,this.align()}},{key:"padding",get:function get(){return[this.paddingTop,this.paddingRight,this.paddingBottom,this.paddingLeft]},set:function set(value){var _value$,_ref,_value$2,_ref2,_value$3,_ref3,_ref4,_value$4;if("number"==typeof value&&(this.paddingTop=value,this.paddingRight=value,this.paddingBottom=value,this.paddingLeft=value),Array.isArray(value))this.paddingTop=null!==(_value$=value[0])&&void 0!==_value$?_value$:0,this.paddingRight=null!==(_ref=null!==(_value$2=value[1])&&void 0!==_value$2?_value$2:value[0])&&void 0!==_ref?_ref:0,this.paddingBottom=null!==(_ref2=null!==(_value$3=value[2])&&void 0!==_value$3?_value$3:value[0])&&void 0!==_ref2?_ref2:0,this.paddingLeft=null!==(_ref3=null!==(_ref4=null!==(_value$4=value[3])&&void 0!==_value$4?_value$4:value[1])&&void 0!==_ref4?_ref4:value[0])&&void 0!==_ref3?_ref3:0;else if("object"===_typeof(value)){var _value$top,_value$right,_value$bottom,_value$left;this.paddingTop=null!==(_value$top=value.top)&&void 0!==_value$top?_value$top:0,this.paddingRight=null!==(_value$right=value.right)&&void 0!==_value$right?_value$right:0,this.paddingBottom=null!==(_value$bottom=value.bottom)&&void 0!==_value$bottom?_value$bottom:0,this.paddingLeft=null!==(_value$left=value.left)&&void 0!==_value$left?_value$left:0}}},{key:"destroy",value:function destroy(options){this.off("pointertap"),_pixi_core__WEBPACK_IMPORTED_MODULE_0__.P6.isMobile.any?window.removeEventListener("touchstart",this.handleActivationBinding):_pixi_core__WEBPACK_IMPORTED_MODULE_0__.P6.isMobile.any||(window.removeEventListener("click",this.handleActivationBinding),window.removeEventListener("keyup",this.onKeyUpBinding)),_get(_getPrototypeOf(Input.prototype),"destroy",this).call(this,options)}},{key:"width",get:function get(){return _get(_getPrototypeOf(Input.prototype),"width",this)},set:function set(width){var _this$options3;null!==(_this$options3=this.options)&&void 0!==_this$options3&&_this$options3.nineSlicePlane?(this._bg&&(this._bg.width=width),this.inputMask&&(this.inputMask.width=width-this.paddingLeft-this.paddingRight,this.inputMask.x=this.paddingLeft),this.align()):_set(_getPrototypeOf(Input.prototype),"width",width,this,!0)}},{key:"height",get:function get(){return _get(_getPrototypeOf(Input.prototype),"height",this)},set:function set(height){var _this$options4;null!==(_this$options4=this.options)&&void 0!==_this$options4&&_this$options4.nineSlicePlane?(this._bg&&(this._bg.height=height),this.inputMask&&(this.inputMask.height=height-this.paddingTop-this.paddingBottom,this.inputMask.y=this.paddingTop),this.align()):_set(_getPrototypeOf(Input.prototype),"height",height,this,!0)}}]),Input}(_pixi_display__WEBPACK_IMPORTED_MODULE_1__.W2)},"./node_modules/typed-signals/dist/Collector.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.Collector=void 0;exports.Collector=class Collector{constructor(signal){this.emit=(...args)=>{signal.emitCollecting(this,args)}}}},"./node_modules/typed-signals/dist/CollectorArray.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollectorArray=void 0;const Collector_1=__webpack_require__("./node_modules/typed-signals/dist/Collector.js");class CollectorArray extends Collector_1.Collector{constructor(){super(...arguments),this.result=[]}handleResult(result){return this.result.push(result),!0}getResult(){return this.result}reset(){this.result.length=0}}exports.CollectorArray=CollectorArray},"./node_modules/typed-signals/dist/CollectorLast.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollectorLast=void 0;const Collector_1=__webpack_require__("./node_modules/typed-signals/dist/Collector.js");class CollectorLast extends Collector_1.Collector{handleResult(result){return this.result=result,!0}getResult(){return this.result}reset(){delete this.result}}exports.CollectorLast=CollectorLast},"./node_modules/typed-signals/dist/CollectorUntil0.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollectorUntil0=void 0;const Collector_1=__webpack_require__("./node_modules/typed-signals/dist/Collector.js");class CollectorUntil0 extends Collector_1.Collector{constructor(){super(...arguments),this.result=!1}handleResult(result){return this.result=result,this.result}getResult(){return this.result}reset(){this.result=!1}}exports.CollectorUntil0=CollectorUntil0},"./node_modules/typed-signals/dist/CollectorWhile0.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollectorWhile0=void 0;const Collector_1=__webpack_require__("./node_modules/typed-signals/dist/Collector.js");class CollectorWhile0 extends Collector_1.Collector{constructor(){super(...arguments),this.result=!1}handleResult(result){return this.result=result,!this.result}getResult(){return this.result}reset(){this.result=!1}}exports.CollectorWhile0=CollectorWhile0},"./node_modules/typed-signals/dist/Signal.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.Signal=void 0;const SignalConnection_1=__webpack_require__("./node_modules/typed-signals/dist/SignalConnection.js"),SignalLink_1=__webpack_require__("./node_modules/typed-signals/dist/SignalLink.js");exports.Signal=class Signal{constructor(){this.head=new SignalLink_1.SignalLink,this.hasNewLinks=!1,this.emitDepth=0,this.connectionsCount=0}getConnectionsCount(){return this.connectionsCount}hasConnections(){return this.connectionsCount>0}connect(callback,order=0){this.connectionsCount++;const link=this.head.insert(callback,order);return this.emitDepth>0&&(this.hasNewLinks=!0,link.newLink=!0),new SignalConnection_1.SignalConnectionImpl(link,(()=>this.decrementConnectionCount()))}decrementConnectionCount(){this.connectionsCount--}disconnect(callback){for(let link=this.head.next;link!==this.head;link=link.next)if(link.callback===callback)return this.decrementConnectionCount(),link.unlink(),!0;return!1}disconnectAll(){for(;this.head.next!==this.head;)this.head.next.unlink();this.connectionsCount=0}emit(...args){this.emitDepth++;for(let link=this.head.next;link!==this.head;link=link.next)link.isEnabled()&&link.callback&&link.callback.apply(null,args);this.emitDepth--,this.unsetNewLink()}emitCollecting(collector,args){this.emitDepth++;for(let link=this.head.next;link!==this.head;link=link.next)if(link.isEnabled()&&link.callback){const result=link.callback.apply(null,args);if(!collector.handleResult(result))break}this.emitDepth--,this.unsetNewLink()}unsetNewLink(){if(this.hasNewLinks&&0===this.emitDepth){for(let link=this.head.next;link!==this.head;link=link.next)link.newLink=!1;this.hasNewLinks=!1}}}},"./node_modules/typed-signals/dist/SignalConnection.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.SignalConnectionImpl=void 0;exports.SignalConnectionImpl=class SignalConnectionImpl{constructor(link,parentCleanup){this.link=link,this.parentCleanup=parentCleanup}disconnect(){return null!==this.link&&(this.link.unlink(),this.link=null,this.parentCleanup(),this.parentCleanup=null,!0)}set enabled(enable){this.link&&this.link.setEnabled(enable)}get enabled(){return null!==this.link&&this.link.isEnabled()}}},"./node_modules/typed-signals/dist/SignalConnections.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.SignalConnections=void 0;exports.SignalConnections=class SignalConnections{constructor(){this.list=[]}add(connection){this.list.push(connection)}disconnectAll(){for(const connection of this.list)connection.disconnect();this.list=[]}getCount(){return this.list.length}isEmpty(){return 0===this.list.length}}},"./node_modules/typed-signals/dist/SignalLink.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.SignalLink=void 0;class SignalLink{constructor(prev=null,next=null,order=0){this.enabled=!0,this.newLink=!1,this.callback=null,this.prev=null!=prev?prev:this,this.next=null!=next?next:this,this.order=order}isEnabled(){return this.enabled&&!this.newLink}setEnabled(flag){this.enabled=flag}unlink(){this.callback=null,this.next.prev=this.prev,this.prev.next=this.next}insert(callback,order){let after=this.prev;for(;after!==this&&!(after.order<=order);)after=after.prev;const link=new SignalLink(after,after.next,order);return link.callback=callback,after.next=link,link.next.prev=link,link}}exports.SignalLink=SignalLink},"./node_modules/typed-signals/dist/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{exports.MZ=void 0;var Collector_1=__webpack_require__("./node_modules/typed-signals/dist/Collector.js");var CollectorArray_1=__webpack_require__("./node_modules/typed-signals/dist/CollectorArray.js");var CollectorLast_1=__webpack_require__("./node_modules/typed-signals/dist/CollectorLast.js");var CollectorUntil0_1=__webpack_require__("./node_modules/typed-signals/dist/CollectorUntil0.js");var CollectorWhile0_1=__webpack_require__("./node_modules/typed-signals/dist/CollectorWhile0.js");var Signal_1=__webpack_require__("./node_modules/typed-signals/dist/Signal.js");Object.defineProperty(exports,"MZ",{enumerable:!0,get:function(){return Signal_1.Signal}});var SignalConnections_1=__webpack_require__("./node_modules/typed-signals/dist/SignalConnections.js")}}]);
\ No newline at end of file
diff --git a/storybook/2857.e1a7f286.iframe.bundle.js b/storybook/2857.e1a7f286.iframe.bundle.js
deleted file mode 100644
index 3fa9c9f6..00000000
--- a/storybook/2857.e1a7f286.iframe.bundle.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2857],{"./node_modules/pixi.js/lib/rendering/renderers/gpu/WebGPURenderer.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{WebGPURenderer:()=>WebGPURenderer});var Extensions=__webpack_require__("./node_modules/pixi.js/lib/extensions/Extensions.mjs"),Matrix=__webpack_require__("./node_modules/pixi.js/lib/maths/matrix/Matrix.mjs"),getTextureBatchBindGroup=__webpack_require__("./node_modules/pixi.js/lib/rendering/batcher/gpu/getTextureBatchBindGroup.mjs"),shared_const=__webpack_require__("./node_modules/pixi.js/lib/rendering/batcher/shared/const.mjs"),compileHighShaderToProgram=__webpack_require__("./node_modules/pixi.js/lib/rendering/high-shader/compileHighShaderToProgram.mjs"),colorBit=__webpack_require__("./node_modules/pixi.js/lib/rendering/high-shader/shader-bits/colorBit.mjs"),generateTextureBatchBit=__webpack_require__("./node_modules/pixi.js/lib/rendering/high-shader/shader-bits/generateTextureBatchBit.mjs"),localUniformBit=__webpack_require__("./node_modules/pixi.js/lib/rendering/high-shader/shader-bits/localUniformBit.mjs"),roundPixelsBit=__webpack_require__("./node_modules/pixi.js/lib/rendering/high-shader/shader-bits/roundPixelsBit.mjs"),Shader=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/shader/Shader.mjs"),UniformGroup=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/shader/UniformGroup.mjs");class GpuGraphicsAdaptor{init(){const localUniforms=new UniformGroup.k({uTransformMatrix:{value:new Matrix.u,type:"mat3x3"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uRound:{value:0,type:"f32"}}),gpuProgram=(0,compileHighShaderToProgram.v)({name:"graphics",bits:[colorBit.F,(0,generateTextureBatchBit._)(shared_const.k),localUniformBit._Q,roundPixelsBit.b]});this.shader=new Shader.M({gpuProgram,resources:{localUniforms}})}execute(graphicsPipe,renderable){const context=renderable.context,shader=context.customShader||this.shader,renderer=graphicsPipe.renderer,contextSystem=renderer.graphicsContext,{geometry,instructions}=contextSystem.getContextRenderData(context),encoder=renderer.encoder;encoder.setPipelineFromGeometryProgramAndState(geometry,shader.gpuProgram,graphicsPipe.state),encoder.setGeometry(geometry);const globalUniformsBindGroup=renderer.globalUniforms.bindGroup;encoder.setBindGroup(0,globalUniformsBindGroup,shader.gpuProgram);const localBindGroup=renderer.renderPipes.uniformBatch.getUniformBindGroup(shader.resources.localUniforms,!0);encoder.setBindGroup(2,localBindGroup,shader.gpuProgram);const batches=instructions.instructions;for(let i=0;i",value:new Matrix.u}}}})}execute(meshPipe,mesh){const renderer=meshPipe.renderer;let shader=mesh._shader;if(shader){if(!shader.gpuProgram)return void(0,warn.R)("Mesh shader has no gpuProgram",mesh.shader)}else shader=this._shader,shader.resources.uTexture=mesh.texture.source,shader.resources.uSampler=mesh.texture.source.style,shader.resources.textureUniforms.uniforms.uTextureMatrix=mesh.texture.textureMatrix.mapCoord;const gpuProgram=shader.gpuProgram;if(gpuProgram.autoAssignGlobalUniforms&&(shader.groups[0]=renderer.globalUniforms.bindGroup),gpuProgram.autoAssignLocalUniforms){const localUniforms=meshPipe.localUniforms;shader.groups[1]=renderer.renderPipes.uniformBatch.getUniformBindGroup(localUniforms,!0)}renderer.encoder.draw({geometry:mesh._geometry,shader,state:mesh.state})}destroy(){this._shader.destroy(!0),this._shader=null}}GpuMeshAdapter.extension={type:[Extensions.Ag.WebGPUPipesAdaptor],name:"mesh"};var State=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/state/State.mjs");const tempState=State.U.for2d();class GpuBatchAdaptor{init(){const gpuProgram=(0,compileHighShaderToProgram.v)({name:"batch",bits:[colorBit.F,(0,generateTextureBatchBit._)(shared_const.k),roundPixelsBit.b]});this._shader=new Shader.M({gpuProgram,groups:{}})}start(batchPipe,geometry){const renderer=batchPipe.renderer,encoder=renderer.encoder,program=this._shader.gpuProgram;this._geometry=geometry,encoder.setGeometry(geometry),tempState.blendMode="normal",renderer.pipeline.getPipeline(geometry,program,tempState);const globalUniformsBindGroup=renderer.globalUniforms.bindGroup;encoder.resetBindGroup(1),encoder.setBindGroup(0,globalUniformsBindGroup,program)}execute(batchPipe,batch){const program=this._shader.gpuProgram,renderer=batchPipe.renderer,encoder=renderer.encoder;if(!batch.bindGroup){const textureBatch=batch.textures;batch.bindGroup=(0,getTextureBatchBindGroup.w)(textureBatch.textures,textureBatch.count)}tempState.blendMode=batch.blendMode;const gpuBindGroup=renderer.bindGroup.getBindGroup(batch.bindGroup,program,1),pipeline=renderer.pipeline.getPipeline(this._geometry,program,tempState);batch.bindGroup._touch(renderer.textureGC.count),encoder.setPipeline(pipeline),encoder.renderPassEncoder.setBindGroup(1,gpuBindGroup),encoder.renderPassEncoder.drawIndexed(batch.size,1,batch.start)}destroy(){this._shader.destroy(!0),this._shader=null}}GpuBatchAdaptor.extension={type:[Extensions.Ag.WebGPUPipesAdaptor],name:"batch"};var AbstractRenderer=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/system/AbstractRenderer.mjs"),SharedSystems=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/system/SharedSystems.mjs"),types=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/types.mjs");class BindGroupSystem{constructor(renderer){this._hash=Object.create(null),this._renderer=renderer}contextChange(gpu){this._gpu=gpu}getBindGroup(bindGroup,program,groupIndex){bindGroup._updateKey();return this._hash[bindGroup._key]||this._createBindGroup(bindGroup,program,groupIndex)}_createBindGroup(group,program,groupIndex){const device=this._gpu.device,groupLayout=program.layout[groupIndex],entries=[],renderer=this._renderer;for(const j in groupLayout){const resource=group.resources[j]??group.resources[groupLayout[j]];let gpuResource;if("uniformGroup"===resource._resourceType){const uniformGroup=resource;renderer.ubo.updateUniformGroup(uniformGroup);const buffer=uniformGroup.buffer;gpuResource={buffer:renderer.buffer.getGPUBuffer(buffer),offset:0,size:buffer.descriptor.size}}else if("buffer"===resource._resourceType){const buffer=resource;gpuResource={buffer:renderer.buffer.getGPUBuffer(buffer),offset:0,size:buffer.descriptor.size}}else if("bufferResource"===resource._resourceType){const bufferResource=resource;gpuResource={buffer:renderer.buffer.getGPUBuffer(bufferResource.buffer),offset:bufferResource.offset,size:bufferResource.size}}else if("textureSampler"===resource._resourceType){const sampler=resource;gpuResource=renderer.texture.getGpuSampler(sampler)}else if("textureSource"===resource._resourceType){const texture=resource;gpuResource=renderer.texture.getGpuSource(texture).createView({})}entries.push({binding:groupLayout[j],resource:gpuResource})}const layout=renderer.shader.getProgramData(program).bindGroups[groupIndex],gpuBindGroup=device.createBindGroup({layout,entries});return this._hash[group._key]=gpuBindGroup,gpuBindGroup}destroy(){for(const key of Object.keys(this._hash))this._hash[key]=null;this._hash=null,this._renderer=null}}BindGroupSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"bindGroup"};var fastCopy=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/buffer/utils/fastCopy.mjs");class GpuBufferSystem{constructor(){this._gpuBuffers=Object.create(null),this._managedBuffers=[]}contextChange(gpu){this._gpu=gpu}getGPUBuffer(buffer){return this._gpuBuffers[buffer.uid]||this.createGPUBuffer(buffer)}updateBuffer(buffer){const gpuBuffer=this._gpuBuffers[buffer.uid]||this.createGPUBuffer(buffer),data=buffer.data;return buffer._updateID&&data&&(buffer._updateID=0,this._gpu.device.queue.writeBuffer(gpuBuffer,0,data.buffer,0,(buffer._updateSize||data.byteLength)+3&-4)),gpuBuffer}destroyAll(){for(const id in this._gpuBuffers)this._gpuBuffers[id].destroy();this._gpuBuffers={}}createGPUBuffer(buffer){this._gpuBuffers[buffer.uid]||(buffer.on("update",this.updateBuffer,this),buffer.on("change",this.onBufferChange,this),buffer.on("destroy",this.onBufferDestroy,this));const gpuBuffer=this._gpu.device.createBuffer(buffer.descriptor);return buffer._updateID=0,buffer.data&&((0,fastCopy.W)(buffer.data.buffer,gpuBuffer.getMappedRange()),gpuBuffer.unmap()),this._gpuBuffers[buffer.uid]=gpuBuffer,this._managedBuffers.push(buffer),gpuBuffer}onBufferChange(buffer){this._gpuBuffers[buffer.uid].destroy(),buffer._updateID=0,this._gpuBuffers[buffer.uid]=this.createGPUBuffer(buffer)}onBufferDestroy(buffer){this._gpuBuffers[buffer.uid].destroy(),this._managedBuffers.splice(this._managedBuffers.indexOf(buffer),1),buffer.off("update",this.updateBuffer,this),buffer.off("change",this.onBufferChange,this),buffer.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[buffer.uid]=null}destroy(){this._managedBuffers.slice().forEach((buffer=>this.onBufferDestroy(buffer))),this._managedBuffers=null,this._gpuBuffers=null}}GpuBufferSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"buffer"};class GpuColorMaskSystem{constructor(renderer){this._colorMaskCache=15,this._renderer=renderer}setMask(colorMask){this._colorMaskCache!==colorMask&&(this._colorMaskCache=colorMask,this._renderer.pipeline.setColorMask(colorMask))}destroy(){this._renderer=null,this._colorMaskCache=null}}GpuColorMaskSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"colorMask"};class GpuDeviceSystem{constructor(renderer){this._renderer=renderer}async init(options){return this._initPromise||(this._initPromise=this._createDeviceAndAdaptor(options).then((gpu=>{this.gpu=gpu,this._renderer.runners.contextChange.emit(this.gpu)}))),this._initPromise}contextChange(gpu){this._renderer.gpu=gpu}async _createDeviceAndAdaptor(options){const adapter=await navigator.gpu.requestAdapter({powerPreference:options.powerPreference,forceFallbackAdapter:options.forceFallbackAdapter}),requiredFeatures=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter((feature=>adapter.features.has(feature))),device=await adapter.requestDevice({requiredFeatures});return{adapter,device}}destroy(){this.gpu=null,this._renderer=null}}GpuDeviceSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"device"},GpuDeviceSystem.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1};class GpuEncoderSystem{constructor(renderer){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=renderer}renderStart(){this.commandFinished=new Promise((resolve=>{this._resolveCommandFinished=resolve})),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(gpuRenderTarget){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(gpuRenderTarget.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(viewport){this.renderPassEncoder.setViewport(viewport.x,viewport.y,viewport.width,viewport.height,0,1)}setPipelineFromGeometryProgramAndState(geometry,program,state,topology){const pipeline=this._renderer.pipeline.getPipeline(geometry,program,state,topology);this.setPipeline(pipeline)}setPipeline(pipeline){this._boundPipeline!==pipeline&&(this._boundPipeline=pipeline,this.renderPassEncoder.setPipeline(pipeline))}_setVertexBuffer(index,buffer){this._boundVertexBuffer[index]!==buffer&&(this._boundVertexBuffer[index]=buffer,this.renderPassEncoder.setVertexBuffer(index,this._renderer.buffer.updateBuffer(buffer)))}_setIndexBuffer(buffer){if(this._boundIndexBuffer===buffer)return;this._boundIndexBuffer=buffer;const indexFormat=2===buffer.data.BYTES_PER_ELEMENT?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(buffer),indexFormat)}resetBindGroup(index){this._boundBindGroup[index]=null}setBindGroup(index,bindGroup,program){if(this._boundBindGroup[index]===bindGroup)return;this._boundBindGroup[index]=bindGroup,bindGroup._touch(this._renderer.textureGC.count);const gpuBindGroup=this._renderer.bindGroup.getBindGroup(bindGroup,program,index);this.renderPassEncoder.setBindGroup(index,gpuBindGroup)}setGeometry(geometry){for(const i in geometry.attributes){const attribute=geometry.attributes[i];this._setVertexBuffer(attribute.location,attribute.buffer)}geometry.indexBuffer&&this._setIndexBuffer(geometry.indexBuffer)}_setShaderBindGroups(shader,skipSync){for(const i in shader.groups){const bindGroup=shader.groups[i];skipSync||this._syncBindGroup(bindGroup),this.setBindGroup(i,bindGroup,shader.gpuProgram)}}_syncBindGroup(bindGroup){for(const j in bindGroup.resources){const resource=bindGroup.resources[j];resource.isUniformGroup&&this._renderer.ubo.updateUniformGroup(resource)}}draw(options){const{geometry,shader,state,topology,size,start,instanceCount,skipSync}=options;this.setPipelineFromGeometryProgramAndState(geometry,shader.gpuProgram,state,topology),this.setGeometry(geometry),this._setShaderBindGroups(shader,skipSync),geometry.indexBuffer?this.renderPassEncoder.drawIndexed(size||geometry.indexBuffer.data.length,instanceCount||geometry.instanceCount,start||0):this.renderPassEncoder.draw(size||geometry.getSize(),instanceCount||geometry.instanceCount,start||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){const descriptor=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(descriptor);const boundPipeline=this._boundPipeline,boundVertexBuffer={...this._boundVertexBuffer},boundIndexBuffer=this._boundIndexBuffer,boundBindGroup={...this._boundBindGroup};this._clearCache();const viewport=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(viewport.x,viewport.y,viewport.width,viewport.height,0,1),this.setPipeline(boundPipeline);for(const i in boundVertexBuffer)this._setVertexBuffer(i,boundVertexBuffer[i]);for(const i in boundBindGroup)this.setBindGroup(i,boundBindGroup[i],null);this._setIndexBuffer(boundIndexBuffer)}_clearCache(){for(let i=0;i<16;i++)this._boundBindGroup[i]=null,this._boundVertexBuffer[i]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(gpu){this._gpu=gpu}}GpuEncoderSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"encoder",priority:1};var state_const=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/state/const.mjs");class GpuStencilSystem{constructor(renderer){this._renderTargetStencilState=Object.create(null),this._renderer=renderer,renderer.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(renderTarget){let stencilState=this._renderTargetStencilState[renderTarget.uid];stencilState||(stencilState=this._renderTargetStencilState[renderTarget.uid]={stencilMode:state_const.K.DISABLED,stencilReference:0}),this._activeRenderTarget=renderTarget,this.setStencilMode(stencilState.stencilMode,stencilState.stencilReference)}setStencilMode(stencilMode,stencilReference){const stencilState=this._renderTargetStencilState[this._activeRenderTarget.uid];stencilState.stencilMode=stencilMode,stencilState.stencilReference=stencilReference;const renderer=this._renderer;renderer.pipeline.setStencilMode(stencilMode),renderer.encoder.renderPassEncoder.setStencilReference(stencilReference)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}}GpuStencilSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"stencil"};var UboSystem=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/shader/UboSystem.mjs");const WGSL_ALIGN_SIZE_DATA={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2":{align:8,size:8},"vec2":{align:8,size:8},"vec2":{align:8,size:8},"vec2":{align:4,size:4},"vec3":{align:16,size:12},"vec3":{align:16,size:12},"vec3":{align:16,size:12},"vec3":{align:8,size:6},"vec4":{align:16,size:16},"vec4":{align:16,size:16},"vec4":{align:16,size:16},"vec4":{align:8,size:8},"mat2x2":{align:8,size:16},"mat2x2":{align:4,size:8},"mat3x2":{align:8,size:24},"mat3x2":{align:4,size:12},"mat4x2":{align:8,size:32},"mat4x2":{align:4,size:16},"mat2x3":{align:16,size:32},"mat2x3":{align:8,size:16},"mat3x3":{align:16,size:48},"mat3x3":{align:8,size:24},"mat4x3":{align:16,size:64},"mat4x3":{align:8,size:32},"mat2x4":{align:16,size:32},"mat2x4":{align:8,size:16},"mat3x4":{align:16,size:48},"mat3x4":{align:8,size:24},"mat4x4":{align:16,size:64},"mat4x4":{align:8,size:32}};function createUboElementsWGSL(uniformData){const uboElements=uniformData.map((data=>({data,offset:0,size:0})));let offset=0;for(let i=0;i1&&(size=Math.max(size,align)*uboElement.data.size),offset=Math.ceil(offset/align)*align,uboElement.size=size,uboElement.offset=offset,offset+=size}return offset=16*Math.ceil(offset/16),{uboElements,size:offset}}var createUboSyncFunction=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/createUboSyncFunction.mjs"),uboSyncFunctions=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/uboSyncFunctions.mjs");function generateArraySyncWGSL(uboElement,offsetToAdd){const{size,align}=WGSL_ALIGN_SIZE_DATA[uboElement.data.type],remainder=(align-size)/4;return`\n v = uv.${uboElement.data.name};\n ${0!==offsetToAdd?`offset += ${offsetToAdd};`:""}\n\n arrayOffset = offset;\n\n t = 0;\n\n for(var i=0; i < ${uboElement.data.size*(size/4)}; i++)\n {\n for(var j = 0; j < ${size/4}; j++)\n {\n data[arrayOffset++] = v[t++];\n }\n ${0!==remainder?`arrayOffset += ${remainder};`:""}\n }\n `}function createUboSyncFunctionWGSL(uboElements){return(0,createUboSyncFunction.E)(uboElements,"uboWgsl",generateArraySyncWGSL,uboSyncFunctions._)}class GpuUboSystem extends UboSystem.W{constructor(){super({createUboElements:createUboElementsWGSL,generateUboSync:createUboSyncFunctionWGSL})}}GpuUboSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"ubo"};var Buffer=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/buffer/Buffer.mjs"),BufferResource=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/buffer/BufferResource.mjs"),buffer_const=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/buffer/const.mjs");class UboBatch{constructor({minUniformOffsetAlignment}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=minUniformOffsetAlignment,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(size){if(size>this._minUniformOffsetAlignment/4)throw new Error("UniformBufferBatch: array is too large: "+4*size);const start=this.byteIndex;let newSize=start+4*size;if(newSize=Math.ceil(newSize/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,newSize>4*this.data.length)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=newSize,start}addGroup(array){const offset=this.addEmptyGroup(array.length);for(let i=0;i{const bufferEntry={arrayStride:0,stepMode:"vertex",attributes:[]},bufferEntryAttributes=bufferEntry.attributes;for(const i in geometry.attributes){const attribute=geometry.attributes[i];attribute.buffer===buffer&&(bufferEntry.arrayStride=attribute.stride,bufferEntry.stepMode=attribute.instance?"instance":"vertex",bufferEntryAttributes.push({shaderLocation:attribute.location,offset:attribute.offset,format:attribute.format}))}bufferEntryAttributes.length&&vertexBuffersLayout.push(bufferEntry)})),this._bufferLayoutsCache[geometry._layoutKey]=vertexBuffersLayout,vertexBuffersLayout}_updatePipeHash(){const key=function getGlobalStateKey(stencilStateId,multiSampleCount,colorMask,renderTarget){return colorMask<<6|stencilStateId<<3|renderTarget<<1|multiSampleCount}(this._stencilMode,this._multisampleCount,this._colorMask,this._depthStencilAttachment);this._pipeStateCaches[key]||(this._pipeStateCaches[key]=Object.create(null)),this._pipeCache=this._pipeStateCaches[key]}destroy(){this._renderer=null,this._bufferLayoutsCache=null}}PipelineSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"pipeline"};var RenderTargetSystem=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/RenderTargetSystem.mjs"),gl_const=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/gl/const.mjs"),CanvasSource=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/CanvasSource.mjs"),TextureSource=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/TextureSource.mjs");class GpuRenderTarget{constructor(){this.contexts=[],this.msaaTextures=[],this.msaaSamples=1}}class GpuRenderTargetAdaptor{init(renderer,renderTargetSystem){this._renderer=renderer,this._renderTargetSystem=renderTargetSystem}copyToTexture(sourceRenderSurfaceTexture,destinationTexture,originSrc,size,originDest){const renderer=this._renderer,baseGpuTexture=this._getGpuColorTexture(sourceRenderSurfaceTexture),backGpuTexture=renderer.texture.getGpuSource(destinationTexture.source);return renderer.encoder.commandEncoder.copyTextureToTexture({texture:baseGpuTexture,origin:originSrc},{texture:backGpuTexture,origin:originDest},size),destinationTexture}startRenderPass(renderTarget,clear=!0,clearColor,viewport){const gpuRenderTarget=this._renderTargetSystem.getGpuRenderTarget(renderTarget),descriptor=this.getDescriptor(renderTarget,clear,clearColor);gpuRenderTarget.descriptor=descriptor,this._renderer.pipeline.setRenderTarget(gpuRenderTarget),this._renderer.encoder.beginRenderPass(gpuRenderTarget),this._renderer.encoder.setViewport(viewport)}finishRenderPass(){this._renderer.encoder.endRenderPass()}_getGpuColorTexture(renderTarget){const gpuRenderTarget=this._renderTargetSystem.getGpuRenderTarget(renderTarget);return gpuRenderTarget.contexts[0]?gpuRenderTarget.contexts[0].getCurrentTexture():this._renderer.texture.getGpuSource(renderTarget.colorTextures[0].source)}getDescriptor(renderTarget,clear,clearValue){"boolean"==typeof clear&&(clear=clear?gl_const.u.ALL:gl_const.u.NONE);const renderTargetSystem=this._renderTargetSystem,gpuRenderTarget=renderTargetSystem.getGpuRenderTarget(renderTarget),colorAttachments=renderTarget.colorTextures.map(((texture,i)=>{const context=gpuRenderTarget.contexts[i];let view,resolveTarget;if(context){view=context.getCurrentTexture().createView()}else view=this._renderer.texture.getGpuSource(texture).createView({mipLevelCount:1});gpuRenderTarget.msaaTextures[i]&&(resolveTarget=view,view=this._renderer.texture.getTextureView(gpuRenderTarget.msaaTextures[i]));const loadOp=clear&gl_const.u.COLOR?"clear":"load";return clearValue??(clearValue=renderTargetSystem.defaultClearColor),{view,resolveTarget,clearValue,storeOp:"store",loadOp}}));let depthStencilAttachment;if(!renderTarget.stencil&&!renderTarget.depth||renderTarget.depthStencilTexture||(renderTarget.ensureDepthStencilTexture(),renderTarget.depthStencilTexture.source.sampleCount=gpuRenderTarget.msaa?4:1),renderTarget.depthStencilTexture){const stencilLoadOp=clear&gl_const.u.STENCIL?"clear":"load",depthLoadOp=clear&gl_const.u.DEPTH?"clear":"load";depthStencilAttachment={view:this._renderer.texture.getGpuSource(renderTarget.depthStencilTexture.source).createView(),stencilStoreOp:"store",stencilLoadOp,depthClearValue:1,depthLoadOp,depthStoreOp:"store"}}return{colorAttachments,depthStencilAttachment}}clear(renderTarget,clear=!0,clearColor,viewport){if(!clear)return;const{gpu,encoder}=this._renderer,device=gpu.device;if(null===encoder.commandEncoder){const commandEncoder=device.createCommandEncoder(),renderPassDescriptor=this.getDescriptor(renderTarget,clear,clearColor),passEncoder=commandEncoder.beginRenderPass(renderPassDescriptor);passEncoder.setViewport(viewport.x,viewport.y,viewport.width,viewport.height,0,1),passEncoder.end();const gpuCommands=commandEncoder.finish();device.queue.submit([gpuCommands])}else this.startRenderPass(renderTarget,clear,clearColor,viewport)}initGpuRenderTarget(renderTarget){renderTarget.isRoot=!0;const gpuRenderTarget=new GpuRenderTarget;return renderTarget.colorTextures.forEach(((colorTexture,i)=>{if(CanvasSource.q.test(colorTexture.resource)){const context=colorTexture.resource.getContext("webgpu"),alphaMode=colorTexture.transparent?"premultiplied":"opaque";try{context.configure({device:this._renderer.gpu.device,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,format:"bgra8unorm",alphaMode})}catch(e){console.error(e)}gpuRenderTarget.contexts[i]=context}if(gpuRenderTarget.msaa=colorTexture.source.antialias,colorTexture.source.antialias){const msaaTexture=new TextureSource.v({width:0,height:0,sampleCount:4});gpuRenderTarget.msaaTextures[i]=msaaTexture}})),gpuRenderTarget.msaa&&(gpuRenderTarget.msaaSamples=4,renderTarget.depthStencilTexture&&(renderTarget.depthStencilTexture.source.sampleCount=4)),gpuRenderTarget}ensureDepthStencilTexture(renderTarget){const gpuRenderTarget=this._renderTargetSystem.getGpuRenderTarget(renderTarget);renderTarget.depthStencilTexture&&gpuRenderTarget.msaa&&(renderTarget.depthStencilTexture.source.sampleCount=4)}resizeGpuRenderTarget(renderTarget){const gpuRenderTarget=this._renderTargetSystem.getGpuRenderTarget(renderTarget);gpuRenderTarget.width=renderTarget.width,gpuRenderTarget.height=renderTarget.height,gpuRenderTarget.msaa&&renderTarget.colorTextures.forEach(((colorTexture,i)=>{const msaaTexture=gpuRenderTarget.msaaTextures[i];msaaTexture?.resize(colorTexture.source.width,colorTexture.source.height,colorTexture.source._resolution)}))}}class GpuRenderTargetSystem extends RenderTargetSystem.l{constructor(renderer){super(renderer),this.adaptor=new GpuRenderTargetAdaptor,this.adaptor.init(renderer,this)}}GpuRenderTargetSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"renderTarget"};class GpuShaderSystem{constructor(){this._gpuProgramData=Object.create(null)}contextChange(gpu){this._gpu=gpu}getProgramData(program){return this._gpuProgramData[program._layoutKey]||this._createGPUProgramData(program)}_createGPUProgramData(program){const device=this._gpu.device,bindGroups=program.gpuLayout.map((group=>device.createBindGroupLayout({entries:group}))),pipelineLayoutDesc={bindGroupLayouts:bindGroups};return this._gpuProgramData[program._layoutKey]={bindGroups,pipeline:device.createPipelineLayout(pipelineLayoutDesc)},this._gpuProgramData[program._layoutKey]}destroy(){this._gpu=null,this._gpuProgramData=null}}GpuShaderSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"shader"};const GpuBlendModesToPixi={normal:{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}},add:{alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one",operation:"add"}},multiply:{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"dst",dstFactor:"one-minus-src-alpha",operation:"add"}},screen:{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}},overlay:{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}},none:{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"zero",operation:"add"}},"normal-npm":{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"}},"add-npm":{alpha:{srcFactor:"one",dstFactor:"one",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one",operation:"add"}},"screen-npm":{alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src",operation:"add"}},erase:{alpha:{srcFactor:"zero",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"one-minus-src",operation:"add"}}};class GpuStateSystem{constructor(){this.defaultState=new State.U,this.defaultState.blend=!0}contextChange(gpu){this.gpu=gpu}getColorTargets(state){return[{format:"bgra8unorm",writeMask:0,blend:GpuBlendModesToPixi[state.blendMode]||GpuBlendModesToPixi.normal}]}destroy(){this.gpu=null}}GpuStateSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"state"};var adapter=__webpack_require__("./node_modules/pixi.js/lib/environment/adapter.mjs"),CanvasPool=__webpack_require__("./node_modules/pixi.js/lib/rendering/renderers/shared/texture/CanvasPool.mjs");const gpuUploadBufferImageResource={type:"image",upload(source,gpuTexture,gpu){const resource=source.resource,total=(0|source.pixelWidth)*(0|source.pixelHeight),bytesPerPixel=resource.byteLength/total;gpu.device.queue.writeTexture({texture:gpuTexture},resource,{offset:0,rowsPerImage:source.pixelHeight,bytesPerRow:source.pixelHeight*bytesPerPixel},{width:source.pixelWidth,height:source.pixelHeight,depthOrArrayLayers:1})}},blockDataMap={"bc1-rgba-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"bc2-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc3-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc7-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"etc1-rgb-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"etc2-rgba8unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"astc-4x4-unorm":{blockBytes:16,blockWidth:4,blockHeight:4}},defaultBlockData={blockBytes:4,blockWidth:1,blockHeight:1},gpuUploadCompressedTextureResource={type:"compressed",upload(source,gpuTexture,gpu){let mipWidth=source.pixelWidth,mipHeight=source.pixelHeight;const blockData=blockDataMap[source.format]||defaultBlockData;for(let i=0;i>1,1),mipHeight=Math.max(mipHeight>>1,1)}}},gpuUploadImageResource={type:"image",upload(source,gpuTexture,gpu){const resource=source.resource;if(!resource)return;const width=Math.min(gpuTexture.width,source.resourceWidth||source.pixelWidth),height=Math.min(gpuTexture.height,source.resourceHeight||source.pixelHeight),premultipliedAlpha="premultiply-alpha-on-upload"===source.alphaMode;gpu.device.queue.copyExternalImageToTexture({source:resource},{texture:gpuTexture,premultipliedAlpha},{width,height})}},gpuUploadVideoResource={type:"video",upload(source,gpuTexture,gpu){gpuUploadImageResource.upload(source,gpuTexture,gpu)}};class GpuMipmapGenerator{constructor(device){this.device=device,this.sampler=device.createSampler({minFilter:"linear"}),this.pipelines={}}_getMipmapPipeline(format){let pipeline=this.pipelines[format];return pipeline||(this.mipmapShaderModule||(this.mipmapShaderModule=this.device.createShaderModule({code:"\n var pos : array, 3> = array, 3>(\n vec2(-1.0, -1.0), vec2(-1.0, 3.0), vec2(3.0, -1.0));\n\n struct VertexOutput {\n @builtin(position) position : vec4,\n @location(0) texCoord : vec2,\n };\n\n @vertex\n fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {\n var output : VertexOutput;\n output.texCoord = pos[vertexIndex] * vec2(0.5, -0.5) + vec2(0.5);\n output.position = vec4(pos[vertexIndex], 0.0, 1.0);\n return output;\n }\n\n @group(0) @binding(0) var imgSampler : sampler;\n @group(0) @binding(1) var img : texture_2d;\n\n @fragment\n fn fragmentMain(@location(0) texCoord : vec2) -> @location(0) vec4 {\n return textureSample(img, imgSampler, texCoord);\n }\n "})),pipeline=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format}]}}),this.pipelines[format]=pipeline),pipeline}generateMipmap(texture){const pipeline=this._getMipmapPipeline(texture.format);if("3d"===texture.dimension||"1d"===texture.dimension)throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let mipTexture=texture;const arrayLayerCount=texture.depthOrArrayLayers||1,renderToSource=texture.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!renderToSource){const mipTextureDescriptor={size:{width:Math.ceil(texture.width/2),height:Math.ceil(texture.height/2),depthOrArrayLayers:arrayLayerCount},format:texture.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:texture.mipLevelCount-1};mipTexture=this.device.createTexture(mipTextureDescriptor)}const commandEncoder=this.device.createCommandEncoder({}),bindGroupLayout=pipeline.getBindGroupLayout(0);for(let arrayLayer=0;arrayLayer1&&this.onUpdateMipmaps(source))}onSourceUnload(source){const gpuTexture=this._gpuSources[source.uid];gpuTexture&&(this._gpuSources[source.uid]=null,gpuTexture.destroy())}onUpdateMipmaps(source){this._mipmapGenerator||(this._mipmapGenerator=new GpuMipmapGenerator(this._gpu.device));const gpuTexture=this.getGpuSource(source);this._mipmapGenerator.generateMipmap(gpuTexture)}onSourceDestroy(source){source.off("update",this.onSourceUpdate,this),source.off("unload",this.onSourceUnload,this),source.off("destroy",this.onSourceDestroy,this),source.off("resize",this.onSourceResize,this),source.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(source),1),this.onSourceUnload(source)}onSourceResize(source){const gpuTexture=this._gpuSources[source.uid];gpuTexture?gpuTexture.width===source.pixelWidth&&gpuTexture.height===source.pixelHeight||(this._textureViewHash[source.uid]=null,this._bindGroupHash[source.uid]=null,this.onSourceUnload(source),this.initSource(source)):this.initSource(source)}_initSampler(sampler){return this._gpuSamplers[sampler._resourceId]=this._gpu.device.createSampler(sampler),this._gpuSamplers[sampler._resourceId]}getGpuSampler(sampler){return this._gpuSamplers[sampler._resourceId]||this._initSampler(sampler)}getGpuSource(source){return this._gpuSources[source.uid]||this.initSource(source)}getTextureBindGroup(texture){return this._bindGroupHash[texture.uid]??this._createTextureBindGroup(texture)}_createTextureBindGroup(texture){const source=texture.source,bindGroupId=source.uid;return this._bindGroupHash[bindGroupId]=new BindGroup.T({0:source,1:source.style}),this._bindGroupHash[bindGroupId]}getTextureView(texture){const source=texture.source;return this._textureViewHash[source.uid]??this._createTextureView(source)}_createTextureView(texture){return this._textureViewHash[texture.uid]=this.getGpuSource(texture).createView(),this._textureViewHash[texture.uid]}generateCanvas(texture){const renderer=this._renderer,commandEncoder=renderer.gpu.device.createCommandEncoder(),canvas=adapter.e.get().createCanvas();canvas.width=texture.source.pixelWidth,canvas.height=texture.source.pixelHeight;const context=canvas.getContext("webgpu");return context.configure({device:renderer.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:navigator.gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),commandEncoder.copyTextureToTexture({texture:renderer.texture.getGpuSource(texture.source),origin:{x:0,y:0}},{texture:context.getCurrentTexture()},{width:canvas.width,height:canvas.height}),renderer.gpu.device.queue.submit([commandEncoder.finish()]),canvas}getPixels(texture){const webGPUCanvas=this.generateCanvas(texture),canvasAndContext=CanvasPool.N.getOptimalCanvasAndContext(webGPUCanvas.width,webGPUCanvas.height),context=canvasAndContext.context;context.drawImage(webGPUCanvas,0,0);const{width,height}=webGPUCanvas,imageData=context.getImageData(0,0,width,height),pixels=new Uint8ClampedArray(imageData.data.buffer);return CanvasPool.N.returnCanvasAndContext(canvasAndContext),{pixels,width,height}}destroy(){this.managedTextures.slice().forEach((source=>this.onSourceDestroy(source))),this.managedTextures=null;for(const k of Object.keys(this._bindGroupHash)){const key=Number(k),bindGroup=this._bindGroupHash[key];bindGroup?.destroy(),this._bindGroupHash[key]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}}GpuTextureSystem.extension={type:[Extensions.Ag.WebGPUSystem],name:"texture"};const DefaultWebGPUSystems=[...SharedSystems.i,GpuUboSystem,GpuEncoderSystem,GpuDeviceSystem,GpuBufferSystem,GpuTextureSystem,GpuRenderTargetSystem,GpuShaderSystem,GpuStateSystem,PipelineSystem,GpuColorMaskSystem,GpuStencilSystem,BindGroupSystem],DefaultWebGPUPipes=[...SharedSystems.f,GpuUniformBatchPipe],DefaultWebGPUAdapters=[GpuBatchAdaptor,GpuMeshAdapter,GpuGraphicsAdaptor],systems=[],renderPipes=[],renderPipeAdaptors=[];Extensions.XO.handleByNamedList(Extensions.Ag.WebGPUSystem,systems),Extensions.XO.handleByNamedList(Extensions.Ag.WebGPUPipes,renderPipes),Extensions.XO.handleByNamedList(Extensions.Ag.WebGPUPipesAdaptor,renderPipeAdaptors),Extensions.XO.add(...DefaultWebGPUSystems,...DefaultWebGPUPipes,...DefaultWebGPUAdapters);class WebGPURenderer extends AbstractRenderer.k{constructor(){super({name:"webgpu",type:types.W.WEBGPU,systems,renderPipes,renderPipeAdaptors})}}}}]);
\ No newline at end of file
diff --git a/storybook/2892.58b8270d.iframe.bundle.js b/storybook/2892.58b8270d.iframe.bundle.js
deleted file mode 100644
index e191099e..00000000
--- a/storybook/2892.58b8270d.iframe.bundle.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see 2892.58b8270d.iframe.bundle.js.LICENSE.txt */
-(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2892],{"./node_modules/@pixi/storybook-renderer/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M4:()=>PixiStory});var _chunk_N3U6A7KW_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/storybook-renderer/dist/chunk-N3U6A7KW.mjs"),global__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/global/window.js"),global__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__),_storybook_core_client__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("@storybook/core-client"),pixi_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs"),{window:globalWindow}=global__WEBPACK_IMPORTED_MODULE_1___default();globalWindow.STORYBOOK_ENV="PIXI";var api=(0,_storybook_core_client__WEBPACK_IMPORTED_MODULE_2__.start)(_chunk_N3U6A7KW_mjs__WEBPACK_IMPORTED_MODULE_0__.u),PixiStory=(api.forceReRender,api.clientApi.raw,class{constructor(options){this.view=new pixi_js__WEBPACK_IMPORTED_MODULE_3__.mcf,options.context.parameters.pixi.appReady.then((()=>{options.init(this.view)})),void 0!==options.update&&(this.update=ticker=>{options.update(this.view,ticker)}),void 0!==options.resize&&(this.resize=(width,height)=>{options.resize(this.view,width,height)}),void 0!==options.destroy&&(this.destroy=()=>{options.destroy(this.view)})}})},"./src/MaskedFrame.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>MaskedFrame});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs"),_utils_helpers_view__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/helpers/view.ts");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i{"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}__webpack_require__.d(__webpack_exports__,{U:()=>argTypes,p:()=>getDefaultArgs});var controls={select:{control:{type:"select"}},check:{control:{type:"check"}},color:{control:{type:"color"}},amount:{control:{type:"range"}},type:{control:{type:"radio"}},date:{control:{type:"date"}},switch:{control:{type:"boolean"}}},argTypes=function argTypes(args){var exportArgTypes={};for(var key in args)if("number"==typeof args[key]){var min=0,arg=args[key];key.includes("font")&&(min=1),exportArgTypes[key]=arg>=0?arg>=100?{control:{type:"range",min,max:1e3,step:10}}:arg>10?{control:{type:"range",min,max:100,step:1}}:0!==arg&&arg<1?{control:{type:"range",min:0,max:1,step:.1}}:{control:{type:"range",min,max:10,step:1}}:arg<=-100?{control:{type:"range",min:-1e3,max:1e3,step:10}}:arg<-10?{control:{type:"range",min:-100,max:100,step:10}}:0!==arg&&arg>-1?{control:{type:"range",min:-1,max:0,step:.1}}:{control:{type:"range",min:-10,max:10,step:1}}}else switch(getArgType(key)&&(exportArgTypes[key]=getArgType(key)),_typeof(args[key])){case"object":exportArgTypes[key]=controls.select,Array.isArray(args[key])?exportArgTypes[key].options=args[key]:exportArgTypes[key].options=Object.keys(args).map((function(key){return args[key]}));break;case"boolean":exportArgTypes[key]=controls.switch}return exportArgTypes};function getArgType(type){for(var control in controls)if(type.toLowerCase().indexOf(control)>-1)return controls[control]}var getDefaultArgs=function getDefaultArgs(args){var exportArgs={};for(var key in args)if("object"===_typeof(args[key]))Array.isArray(args[key])&&(exportArgs[key]=args[key][0]);else exportArgs[key]=args[key];return exportArgs}},"./src/stories/utils/loader.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>preload});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function preload(_x){return _preload.apply(this,arguments)}function _preload(){return _preload=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(assets){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,pixi_js__WEBPACK_IMPORTED_MODULE_0__.sP.load(assets);case 2:case"end":return _context.stop()}}),_callee)}))),_preload.apply(this,arguments)}},"./src/utils/helpers/resize.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function centerElement(view,horPos,verPos){var canvas=document.getElementById("storybook-root");view.width>0?view.x=0===horPos?0:horPos?canvas.offsetWidth*horPos-view.width/2:canvas.offsetWidth/2-view.width/2:view.x=canvas.offsetWidth/2,view.height>0?view.y=0===verPos?0:verPos?canvas.offsetHeight*verPos-view.height/2:canvas.offsetHeight/2-view.height/2:view.y=canvas.offsetHeight/2}function centerView(view){var canvas=document.getElementById("storybook-root");view.x=canvas.offsetWidth/2,view.y=canvas.offsetHeight/2}__webpack_require__.d(__webpack_exports__,{E:()=>centerElement,l:()=>centerView})},"./src/utils/helpers/view.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>getView,l:()=>getSpriteView});var pixi_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/pixi.js/lib/index.mjs");function getView(view){return"string"==typeof view?pixi_js__WEBPACK_IMPORTED_MODULE_0__.kxk.from(view):view}function getSpriteView(view){return"string"==typeof view?pixi_js__WEBPACK_IMPORTED_MODULE_0__.kxk.from(view):view}},"./node_modules/global/window.js":(module,__unused_webpack_exports,__webpack_require__)=>{var win;win="undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},module.exports=win}}]);
\ No newline at end of file
diff --git a/storybook/2903.528bd197.iframe.bundle.js b/storybook/2903.528bd197.iframe.bundle.js
new file mode 100644
index 00000000..7a61509b
--- /dev/null
+++ b/storybook/2903.528bd197.iframe.bundle.js
@@ -0,0 +1,2 @@
+/*! For license information please see 2903.528bd197.iframe.bundle.js.LICENSE.txt */
+"use strict";(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2903],{"./src/MaskedFrame.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{O:()=>MaskedFrame});var _pixi_graphics__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/graphics/lib/index.mjs"),_pixi_sprite__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@pixi/sprite/lib/index.mjs"),_utils_helpers_view__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/utils/helpers/view.ts");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i{function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}__webpack_require__.d(__webpack_exports__,{P:()=>argTypes,V:()=>getDefaultArgs});var controls={select:{control:{type:"select"}},check:{control:{type:"check"}},color:{control:{type:"color"}},amount:{control:{type:"range"}},type:{control:{type:"radio"}},date:{control:{type:"date"}},switch:{control:{type:"boolean"}}},argTypes=function argTypes(args){var exportArgTypes={};for(var key in args)if("number"==typeof args[key]){var min=0,arg=args[key];key.includes("font")&&(min=1),exportArgTypes[key]=arg>=0?arg>=100?{control:{type:"range",min,max:1e3,step:10}}:arg>10?{control:{type:"range",min,max:100,step:1}}:0!==arg&&arg<1?{control:{type:"range",min:0,max:1,step:.1}}:{control:{type:"range",min,max:10,step:1}}:arg<=-100?{control:{type:"range",min:-1e3,max:1e3,step:10}}:arg<-10?{control:{type:"range",min:-100,max:100,step:10}}:0!==arg&&arg>-1?{control:{type:"range",min:-1,max:0,step:.1}}:{control:{type:"range",min:-10,max:10,step:1}}}else switch(getArgType(key)&&(exportArgTypes[key]=getArgType(key)),_typeof(args[key])){case"object":exportArgTypes[key]=controls.select,Array.isArray(args[key])?exportArgTypes[key].options=args[key]:exportArgTypes[key].options=Object.keys(args).map((function(key){return args[key]}));break;case"boolean":exportArgTypes[key]=controls.switch}return exportArgTypes};function getArgType(type){for(var control in controls)if(type.toLowerCase().indexOf(control)>-1)return controls[control]}var getDefaultArgs=function getDefaultArgs(args){var exportArgs={};for(var key in args)if("object"===_typeof(args[key]))Array.isArray(args[key])&&(exportArgs[key]=args[key][0]);else exportArgs[key]=args[key];return exportArgs}},"./src/stories/utils/loader.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{M:()=>preload});var _pixi_assets__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/assets/lib/index.mjs");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function preload(_x){return _preload.apply(this,arguments)}function _preload(){return _preload=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(assets){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,_pixi_assets__WEBPACK_IMPORTED_MODULE_0__.de.load(assets);case 2:case"end":return _context.stop()}}),_callee)}))),_preload.apply(this,arguments)}},"./src/utils/helpers/resize.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{function centerElement(view,horPos,verPos){var canvas=document.getElementById("storybook-root");view.width>0?view.x=0===horPos?0:horPos?canvas.offsetWidth*horPos-view.width/2:canvas.offsetWidth/2-view.width/2:view.x=canvas.offsetWidth/2,view.height>0?view.y=0===verPos?0:verPos?canvas.offsetHeight*verPos-view.height/2:canvas.offsetHeight/2-view.height/2:view.y=canvas.offsetHeight/2}function centerView(view){var canvas=document.getElementById("storybook-root");view.x=canvas.offsetWidth/2,view.y=canvas.offsetHeight/2}__webpack_require__.d(__webpack_exports__,{C:()=>centerView,w:()=>centerElement})},"./src/utils/helpers/view.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{X:()=>getView,v:()=>getSpriteView});var _pixi_sprite__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@pixi/sprite/lib/index.mjs");function getView(view){return"string"==typeof view?_pixi_sprite__WEBPACK_IMPORTED_MODULE_0__.j.from(view):view}function getSpriteView(view){return"string"==typeof view?_pixi_sprite__WEBPACK_IMPORTED_MODULE_0__.j.from(view):view}}}]);
\ No newline at end of file
diff --git a/storybook/2892.58b8270d.iframe.bundle.js.LICENSE.txt b/storybook/2903.528bd197.iframe.bundle.js.LICENSE.txt
similarity index 100%
rename from storybook/2892.58b8270d.iframe.bundle.js.LICENSE.txt
rename to storybook/2903.528bd197.iframe.bundle.js.LICENSE.txt
diff --git a/storybook/2939.092dd382.iframe.bundle.js b/storybook/2939.092dd382.iframe.bundle.js
new file mode 100644
index 00000000..890590d2
--- /dev/null
+++ b/storybook/2939.092dd382.iframe.bundle.js
@@ -0,0 +1,9 @@
+/*! For license information please see 2939.092dd382.iframe.bundle.js.LICENSE.txt */
+(self.webpackChunk_pixi_ui=self.webpackChunk_pixi_ui||[]).push([[2939],{"./node_modules/@pixi/assets/lib/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{de:()=>Assets,Q2:()=>LoaderParserPriority,gN:()=>checkExtension,uz:()=>copySearchParams,cU:()=>createTexture});var lib=__webpack_require__("./node_modules/@pixi/core/lib/index.mjs");const assetKeyMap={loader:lib.nw.LoadParser,resolver:lib.nw.ResolveParser,cache:lib.nw.CacheParser,detection:lib.nw.DetectionParser};lib.Rw.handle(lib.nw.Asset,(extension=>{const ref=extension.ref;Object.entries(assetKeyMap).filter((([key])=>!!ref[key])).forEach((([key,type])=>lib.Rw.add(Object.assign(ref[key],{extension:ref[key].extension??type}))))}),(extension=>{const ref=extension.ref;Object.keys(assetKeyMap).filter((key=>!!ref[key])).forEach((key=>lib.Rw.remove(ref[key])))}));class BackgroundLoader{constructor(loader,verbose=!1){this._loader=loader,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=verbose}add(assetUrls){assetUrls.forEach((a=>{this._assetList.push(a)})),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const toLoad=[],toLoadAmount=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(input)||(input=[input]),transform?input.map((item=>"string"==typeof item||forceTransform?transform(item):item)):input);const Cache=new class CacheClass{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(key){return this._cache.has(key)}get(key){const result=this._cache.get(key);return result||console.warn(`[Assets] Asset id ${key} was not found in the Cache`),result}set(key,value){const keys=convertToList(key);let cacheableAssets;for(let i=0;i{cacheableAssets[key2]=value})));const cacheKeys=Object.keys(cacheableAssets),cachedAssets={cacheKeys,keys};if(keys.forEach((key2=>{this._cacheMap.set(key2,cachedAssets)})),cacheKeys.forEach((key2=>{this._cache.has(key2)&&this._cache.get(key2)!==value&&console.warn("[Cache] already has key:",key2),this._cache.set(key2,cacheableAssets[key2])})),value instanceof lib.xE){const texture=value;keys.forEach((key2=>{texture.baseTexture!==lib.xE.EMPTY.baseTexture&&lib.VL.addToCache(texture.baseTexture,key2),lib.xE.addToCache(texture,key2)}))}}remove(key){if(!this._cacheMap.has(key))return void console.warn(`[Assets] Asset id ${key} was not found in the Cache`);const cacheMap=this._cacheMap.get(key);cacheMap.cacheKeys.forEach((key2=>{this._cache.delete(key2)})),cacheMap.keys.forEach((key2=>{this._cacheMap.delete(key2)}))}get parsers(){return this._parsers}},isSingleItem=item=>!Array.isArray(item);class Loader{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(target,key,value)=>(this._parsersValidated=!1,target[key]=value,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(url,data){const result={promise:null,parser:null};return result.promise=(async()=>{let asset=null,parser=null;if(data.loadParser&&(parser=this._parserHash[data.loadParser],parser||console.warn(`[Assets] specified load parser "${data.loadParser}" not found while loading ${url}`)),!parser){for(let i=0;i({alias:[item],src:item}))),total=assetsToLoad.length,promises=assetsToLoad.map((async asset=>{const url=lib.P6.path.toAbsolute(asset.src);if(!assets[asset.src])try{this.promiseCache[url]||(this.promiseCache[url]=this._getLoadPromiseAndParser(url,asset)),assets[asset.src]=await this.promiseCache[url].promise,onProgress&&onProgress(++count/total)}catch(e){throw delete this.promiseCache[url],delete assets[asset.src],new Error(`[Loader.load] Failed to load ${url}.\n${e}`)}}));return await Promise.all(promises),singleAsset?assets[assetsToLoad[0].src]:assets}async unload(assetsToUnloadIn){const promises=convertToList(assetsToUnloadIn,(item=>({alias:[item],src:item}))).map((async asset=>{const url=lib.P6.path.toAbsolute(asset.src),loadPromise=this.promiseCache[url];if(loadPromise){const loadedAsset=await loadPromise.promise;delete this.promiseCache[url],loadPromise.parser?.unload?.(loadedAsset,asset,this)}}));await Promise.all(promises)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter((parser=>parser.name)).reduce(((hash,parser)=>(hash[parser.name]&&console.warn(`[Assets] loadParser name conflict "${parser.name}"`),{...hash,[parser.name]:parser})),{})}}var LoaderParserPriority=(LoaderParserPriority2=>(LoaderParserPriority2[LoaderParserPriority2.Low=0]="Low",LoaderParserPriority2[LoaderParserPriority2.Normal=1]="Normal",LoaderParserPriority2[LoaderParserPriority2.High=2]="High",LoaderParserPriority2))(LoaderParserPriority||{});function checkDataUrl(url,mimes){if(Array.isArray(mimes)){for(const mime of mimes)if(url.startsWith(`data:${mime}`))return!0;return!1}return url.startsWith(`data:${mimes}`)}const loadJson={extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.Low},name:"loadJson",test:url=>checkDataUrl(url,"application/json")||checkExtension(url,".json"),load:async url=>await(await lib.Xd.ADAPTER.fetch(url)).json()};lib.Rw.add(loadJson);const loadTxt={name:"loadTxt",extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.Low},test:url=>checkDataUrl(url,"text/plain")||checkExtension(url,".txt"),load:async url=>await(await lib.Xd.ADAPTER.fetch(url)).text()};lib.Rw.add(loadTxt);const validWeights=["normal","bold","100","200","300","400","500","600","700","800","900"],validFontExtensions=[".ttf",".otf",".woff",".woff2"],validFontMIMEs=["font/ttf","font/otf","font/woff","font/woff2"],CSS_IDENT_TOKEN_REGEX=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;const validURICharactersRegex=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;const loadWebFont={extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.Low},name:"loadWebFont",test:url=>checkDataUrl(url,validFontMIMEs)||checkExtension(url,validFontExtensions),async load(url,options){const fonts=lib.Xd.ADAPTER.getFontFaceSet();if(fonts){const fontFaces=[],name=options.data?.family??function getFontFamilyName(url){const ext=lib.P6.path.extname(url),nameTokens=lib.P6.path.basename(url,ext).replace(/(-|_)/g," ").toLowerCase().split(" ").map((word=>word.charAt(0).toUpperCase()+word.slice(1)));let valid=nameTokens.length>0;for(const token of nameTokens)if(!token.match(CSS_IDENT_TOKEN_REGEX)){valid=!1;break}let fontFamilyName=nameTokens.join(" ");return valid||(fontFamilyName=`"${fontFamilyName.replace(/[\\"]/g,"\\$&")}"`),fontFamilyName}(url),weights=options.data?.weights?.filter((weight=>validWeights.includes(weight)))??["normal"],data=options.data??{};for(let i=0;ilib.Xd.ADAPTER.getFontFaceSet().delete(t)))}};lib.Rw.add(loadWebFont);let MAX_WORKERS,UUID=0;const checkImageBitmapCode={id:"checkImageBitmap",code:"\n async function checkImageBitmap()\n {\n try\n {\n if (typeof createImageBitmap !== 'function') return false;\n\n const response = await fetch('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=');\n const imageBlob = await response.blob();\n const imageBitmap = await createImageBitmap(imageBlob);\n\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n }\n catch (e)\n {\n return false;\n }\n }\n checkImageBitmap().then((result) => { self.postMessage(result); });\n "},workerCode={id:"loadImageBitmap",code:"\n async function loadImageBitmap(url)\n {\n const response = await fetch(url);\n\n if (!response.ok)\n {\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: `\n + `${response.status} ${response.statusText}`);\n }\n\n const imageBlob = await response.blob();\n const imageBitmap = await createImageBitmap(imageBlob);\n\n return imageBitmap;\n }\n self.onmessage = async (event) =>\n {\n try\n {\n const imageBitmap = await loadImageBitmap(event.data.data[0]);\n\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id,\n }, [imageBitmap]);\n }\n catch(e)\n {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id,\n });\n }\n };"};let workerURL;const WorkerManager=new class WorkerManagerClass{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise((resolve=>{const workerURL2=URL.createObjectURL(new Blob([checkImageBitmapCode.code],{type:"application/javascript"})),worker=new Worker(workerURL2);worker.addEventListener("message",(event=>{worker.terminate(),URL.revokeObjectURL(workerURL2),resolve(event.data)}))}))),this._isImageBitmapSupported}loadImageBitmap(src){return this._run("loadImageBitmap",[src])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){void 0===MAX_WORKERS&&(MAX_WORKERS=navigator.hardwareConcurrency||4);let worker=this.workerPool.pop();return!worker&&this._createdWorkers{this.complete(event.data),this.returnWorker(event.target),this.next()}))),worker}returnWorker(worker){this.workerPool.push(worker)}complete(data){void 0!==data.error?this.resolveHash[data.uuid].reject(data.error):this.resolveHash[data.uuid].resolve(data.data),this.resolveHash[data.uuid]=null}async _run(id,args){await this._initWorkers();const promise=new Promise(((resolve,reject)=>{this.queue.push({id,arguments:args,resolve,reject})}));return this.next(),promise}next(){if(!this.queue.length)return;const worker=this.getWorker();if(!worker)return;const toDo=this.queue.pop(),id=toDo.id;this.resolveHash[UUID]={resolve:toDo.resolve,reject:toDo.reject},worker.postMessage({data:toDo.arguments,uuid:UUID++,id})}};function createTexture(base,loader,url){base.resource.internal=!0;const texture=new lib.xE(base),unload=()=>{delete loader.promiseCache[url],Cache.has(url)&&Cache.remove(url)};return texture.baseTexture.once("destroyed",(()=>{url in loader.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),unload())})),texture.once("destroyed",(()=>{base.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),unload())})),texture}const validImageExtensions=[".jpeg",".jpg",".png",".webp",".avif"],validImageMIMEs=["image/jpeg","image/png","image/webp","image/avif"];const loadTextures={name:"loadTextures",extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test:url=>checkDataUrl(url,validImageMIMEs)||checkExtension(url,validImageExtensions),async load(url,asset,loader){const useImageBitmap=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let src;src=useImageBitmap?this.config.preferWorkers&&await WorkerManager.isImageBitmapSupported()?await WorkerManager.loadImageBitmap(url):await async function loadImageBitmap(url){const response=await lib.Xd.ADAPTER.fetch(url);if(!response.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);const imageBlob=await response.blob();return await createImageBitmap(imageBlob)}(url):await new Promise(((resolve,reject)=>{const src2=new Image;src2.crossOrigin=this.config.crossOrigin,src2.src=url,src2.complete?resolve(src2):(src2.onload=()=>resolve(src2),src2.onerror=e=>reject(e))}));const options={...asset.data};options.resolution??(options.resolution=lib.P6.getResolutionOfUrl(url)),useImageBitmap&&void 0===options.resourceOptions?.ownsImageBitmap&&(options.resourceOptions={...options.resourceOptions},options.resourceOptions.ownsImageBitmap=!0);const base=new lib.VL(src,options);return base.resource.src=url,createTexture(base,loader,url)},unload(texture){texture.destroy(!0)}};lib.Rw.add(loadTextures);const loadSVG={extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.High},name:"loadSVG",test:url=>checkDataUrl(url,"image/svg+xml")||checkExtension(url,".svg"),testParse:async data=>lib.pX.test(data),async parse(asset,data,loader){const src=new lib.pX(asset,data?.data?.resourceOptions);await src.load();const base=new lib.VL(src,{resolution:lib.P6.getResolutionOfUrl(asset),...data?.data});return base.resource.src=data.src,createTexture(base,loader,data.src)},load:async(url,_options)=>(await lib.Xd.ADAPTER.fetch(url)).text(),unload:loadTextures.unload};lib.Rw.add(loadSVG);const validVideoExtensions=[".mp4",".m4v",".webm",".ogv"],validVideoMIMEs=["video/mp4","video/webm","video/ogg"],loadVideo={name:"loadVideo",extension:{type:lib.nw.LoadParser,priority:LoaderParserPriority.High},config:{defaultAutoPlay:!0},test:url=>checkDataUrl(url,validVideoMIMEs)||checkExtension(url,validVideoExtensions),async load(url,loadAsset,loader){let texture;const blob=await(await lib.Xd.ADAPTER.fetch(url)).blob(),blobURL=URL.createObjectURL(blob);try{const options={autoPlay:this.config.defaultAutoPlay,...loadAsset?.data?.resourceOptions},src=new lib.eH(blobURL,options);await src.load();const base=new lib.VL(src,{alphaMode:await lib.P6.detectVideoAlphaMode(),resolution:lib.P6.getResolutionOfUrl(url),...loadAsset?.data});base.resource.src=url,texture=createTexture(base,loader,url),texture.baseTexture.once("destroyed",(()=>{URL.revokeObjectURL(blobURL)}))}catch(e){throw URL.revokeObjectURL(blobURL),e}return texture},unload(texture){texture.destroy(!0)}};function processX(base,ids,depth,result,tags){const id=ids[depth];for(let i=0;i{const split=vars.substring(1,vars.length-1).split(",");ids.push(split)})),processX(string,ids,0,result,tags)}else tags.push(string);return tags}lib.Rw.add(loadVideo);class Resolver{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(bundleId,assetId)=>`${bundleId}${this._bundleIdConnector}${assetId}`,extractAssetIdFromBundle:(bundleId,assetBundleId)=>assetBundleId.replace(`${bundleId}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(bundleIdentifier){if(this._bundleIdConnector=bundleIdentifier.connector??this._bundleIdConnector,this._createBundleAssetId=bundleIdentifier.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=bundleIdentifier.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...preferOrders){preferOrders.forEach((prefer=>{this._preferredOrder.push(prefer),prefer.priority||(prefer.priority=Object.keys(prefer.params))})),this._resolverHash={}}set basePath(basePath){this._basePath=basePath}get basePath(){return this._basePath}set rootPath(rootPath){this._rootPath=rootPath}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(searchParams){if("string"==typeof searchParams)this._defaultSearchParams=searchParams;else{const queryValues=searchParams;this._defaultSearchParams=Object.keys(queryValues).map((key=>`${encodeURIComponent(key)}=${encodeURIComponent(queryValues[key])}`)).join("&")}}getAlias(asset){const{alias,name,src,srcs}=asset;return convertToList(alias||name||src||srcs,(value=>"string"==typeof value?value:Array.isArray(value)?value.map((v=>v?.src??v?.srcs??v)):value?.src||value?.srcs?value.src??value.srcs:value),!0)}addManifest(manifest){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=manifest,manifest.bundles.forEach((bundle=>{this.addBundle(bundle.name,bundle.assets)}))}addBundle(bundleId,assets){const assetNames=[];Array.isArray(assets)?assets.forEach((asset=>{const srcs=asset.src??asset.srcs,aliases=asset.alias??asset.name;let ids;if("string"==typeof aliases){const bundleAssetId=this._createBundleAssetId(bundleId,aliases);assetNames.push(bundleAssetId),ids=[aliases,bundleAssetId]}else{const bundleIds=aliases.map((name=>this._createBundleAssetId(bundleId,name)));assetNames.push(...bundleIds),ids=[...aliases,...bundleIds]}this.add({...asset,alias:ids,src:srcs})})):Object.keys(assets).forEach((key=>{const aliases=[key,this._createBundleAssetId(bundleId,key)];if("string"==typeof assets[key])this.add({alias:aliases,src:assets[key]});else if(Array.isArray(assets[key]))this.add({alias:aliases,src:assets[key]});else{const asset=assets[key],assetSrc=asset.src??asset.srcs;this.add({...asset,alias:aliases,src:Array.isArray(assetSrc)?assetSrc:[assetSrc]})}assetNames.push(...aliases)})),this._bundles[bundleId]=assetNames}add(aliases,srcs,data,format,loadParser){const assets=[];let keyCheck;"string"==typeof aliases||Array.isArray(aliases)&&"string"==typeof aliases[0]?(lib.P6.deprecation("7.2.0","Assets.add now uses an object instead of individual parameters.\nPlease use Assets.add({ alias, src, data, format, loadParser }) instead."),assets.push({alias:aliases,src:srcs,data,format,loadParser})):Array.isArray(aliases)?assets.push(...aliases):assets.push(aliases),keyCheck=key=>{this.hasKey(key)&&console.warn(`[Resolver] already has key: ${key} overwriting`)},convertToList(assets).forEach((asset=>{const{src,srcs:srcs2}=asset;let{data:data2,format:format2,loadParser:loadParser2}=asset;const srcsToUse=convertToList(src||srcs2).map((src2=>"string"==typeof src2?createStringVariations(src2):Array.isArray(src2)?src2:[src2])),aliasesToUse=this.getAlias(asset);Array.isArray(aliasesToUse)?aliasesToUse.forEach(keyCheck):keyCheck(aliasesToUse);const resolvedAssets=[];srcsToUse.forEach((srcs3=>{srcs3.forEach((src2=>{let formattedAsset={};if("object"!=typeof src2){formattedAsset.src=src2;for(let i=0;i{this._assetMap[alias]=resolvedAssets}))}))}resolveBundle(bundleIds){const singleAsset=isSingleItem(bundleIds);bundleIds=convertToList(bundleIds);const out={};return bundleIds.forEach((bundleId=>{const assetNames=this._bundles[bundleId];if(assetNames){const results=this.resolve(assetNames),assets={};for(const key in results){const asset=results[key];assets[this._extractAssetIdFromBundle(bundleId,key)]=asset}out[bundleId]=assets}})),singleAsset?out[bundleIds[0]]:out}resolveUrl(key){const result=this.resolve(key);if("string"!=typeof key){const out={};for(const i in result)out[i]=result[i].src;return out}return result.src}resolve(keys){const singleAsset=isSingleItem(keys);keys=convertToList(keys);const result={};return keys.forEach((key=>{if(!this._resolverHash[key])if(this._assetMap[key]){let assets=this._assetMap[key];const bestAsset=assets[0],preferredOrder=this._getPreferredOrder(assets);preferredOrder?.priority.forEach((priorityKey=>{preferredOrder.params[priorityKey].forEach((value=>{const filteredAssets=assets.filter((asset=>!!asset[priorityKey]&&asset[priorityKey]===value));filteredAssets.length&&(assets=filteredAssets)}))})),this._resolverHash[key]=assets[0]??bestAsset}else this._resolverHash[key]=this.buildResolvedAsset({alias:[key],src:key},{});result[key]=this._resolverHash[key]})),singleAsset?result[keys[0]]:result}hasKey(key){return!!this._assetMap[key]}hasBundle(key){return!!this._bundles[key]}_getPreferredOrder(assets){for(let i=0;ipreference.params.format.includes(asset.format)));if(preferred)return preferred}return this._preferredOrder[0]}_appendDefaultSearchParams(url){if(!this._defaultSearchParams)return url;return`${url}${/\?/.test(url)?"&":"?"}${this._defaultSearchParams}`}buildResolvedAsset(formattedAsset,data){const{aliases,data:assetData,loadParser,format}=data;return(this._basePath||this._rootPath)&&(formattedAsset.src=lib.P6.path.toAbsolute(formattedAsset.src,this._basePath,this._rootPath)),formattedAsset.alias=aliases??formattedAsset.alias??[formattedAsset.src],formattedAsset.src=this._appendDefaultSearchParams(formattedAsset.src),formattedAsset.data={...assetData||{},...formattedAsset.data},formattedAsset.loadParser=loadParser??formattedAsset.loadParser,formattedAsset.format=format??lib.P6.path.extname(formattedAsset.src).slice(1),formattedAsset.srcs=formattedAsset.src,formattedAsset.name=formattedAsset.alias,formattedAsset}}const Assets=new class AssetsClass{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Resolver,this.loader=new Loader,this.cache=Cache,this._backgroundLoader=new BackgroundLoader(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(options={}){if(this._initialized)return void console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");if(this._initialized=!0,options.defaultSearchParams&&this.resolver.setDefaultSearchParams(options.defaultSearchParams),options.basePath&&(this.resolver.basePath=options.basePath),options.bundleIdentifier&&this.resolver.setBundleIdentifier(options.bundleIdentifier),options.manifest){let manifest=options.manifest;"string"==typeof manifest&&(manifest=await this.load(manifest)),this.resolver.addManifest(manifest)}const resolutionPref=options.texturePreference?.resolution??1,resolution="number"==typeof resolutionPref?[resolutionPref]:resolutionPref,formats=await this._detectFormats({preferredFormats:options.texturePreference?.format,skipDetections:options.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:formats,resolution}}),options.preferences&&this.setPreferences(options.preferences)}add(aliases,srcs,data,format,loadParser){this.resolver.add(aliases,srcs,data,format,loadParser)}async load(urls,onProgress){this._initialized||await this.init();const singleAsset=isSingleItem(urls),urlArray=convertToList(urls).map((url=>{if("string"!=typeof url){const aliases=this.resolver.getAlias(url);return aliases.some((alias=>!this.resolver.hasKey(alias)))&&this.add(url),Array.isArray(aliases)?aliases[0]:aliases}return this.resolver.hasKey(url)||this.add({alias:url,src:url}),url})),resolveResults=this.resolver.resolve(urlArray),out=await this._mapLoadToResolve(resolveResults,onProgress);return singleAsset?out[urlArray[0]]:out}addBundle(bundleId,assets){this.resolver.addBundle(bundleId,assets)}async loadBundle(bundleIds,onProgress){this._initialized||await this.init();let singleAsset=!1;"string"==typeof bundleIds&&(singleAsset=!0,bundleIds=[bundleIds]);const resolveResults=this.resolver.resolveBundle(bundleIds),out={},keys=Object.keys(resolveResults);let count=0,total=0;const _onProgress=()=>{onProgress?.(++count/total)},promises=keys.map((bundleId=>{const resolveResult=resolveResults[bundleId];return total+=Object.keys(resolveResult).length,this._mapLoadToResolve(resolveResult,_onProgress).then((resolveResult2=>{out[bundleId]=resolveResult2}))}));return await Promise.all(promises),singleAsset?out[bundleIds[0]]:out}async backgroundLoad(urls){this._initialized||await this.init(),"string"==typeof urls&&(urls=[urls]);const resolveResults=this.resolver.resolve(urls);this._backgroundLoader.add(Object.values(resolveResults))}async backgroundLoadBundle(bundleIds){this._initialized||await this.init(),"string"==typeof bundleIds&&(bundleIds=[bundleIds]);const resolveResults=this.resolver.resolveBundle(bundleIds);Object.values(resolveResults).forEach((resolveResult=>{this._backgroundLoader.add(Object.values(resolveResult))}))}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(keys){if("string"==typeof keys)return Cache.get(keys);const assets={};for(let i=0;i{const asset=loadedAssets[resolveResult.src],keys=[resolveResult.src];resolveResult.alias&&keys.push(...resolveResult.alias),out[resolveKeys[i]]=asset,Cache.set(keys,asset)})),out}async unload(urls){this._initialized||await this.init();const urlArray=convertToList(urls).map((url=>"string"!=typeof url?url.src:url)),resolveResults=this.resolver.resolve(urlArray);await this._unloadFromResolved(resolveResults)}async unloadBundle(bundleIds){this._initialized||await this.init(),bundleIds=convertToList(bundleIds);const resolveResults=this.resolver.resolveBundle(bundleIds),promises=Object.keys(resolveResults).map((bundleId=>this._unloadFromResolved(resolveResults[bundleId])));await Promise.all(promises)}async _unloadFromResolved(resolveResult){const resolveArray=Object.values(resolveResult);resolveArray.forEach((resolveResult2=>{Cache.remove(resolveResult2.src)})),await this.loader.unload(resolveArray)}async _detectFormats(options){let formats=[];options.preferredFormats&&(formats=Array.isArray(options.preferredFormats)?options.preferredFormats:[options.preferredFormats]);for(const detection of options.detections)options.skipDetections||await detection.test()?formats=await detection.add(formats):options.skipDetections||(formats=await detection.remove(formats));return formats=formats.filter(((format,index)=>formats.indexOf(format)===index)),formats}get detections(){return this._detections}get preferWorkers(){return loadTextures.config.preferWorkers}set preferWorkers(value){lib.P6.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:value})}setPreferences(preferences){this.loader.parsers.forEach((parser=>{parser.config&&Object.keys(parser.config).filter((key=>key in preferences)).forEach((key=>{parser.config[key]=preferences[key]}))}))}};lib.Rw.handleByList(lib.nw.LoadParser,Assets.loader.parsers).handleByList(lib.nw.ResolveParser,Assets.resolver.parsers).handleByList(lib.nw.CacheParser,Assets.cache.parsers).handleByList(lib.nw.DetectionParser,Assets.detections);const cacheTextureArray={extension:lib.nw.CacheParser,test:asset=>Array.isArray(asset)&&asset.every((t=>t instanceof lib.xE)),getCacheableAssets:(keys,asset)=>{const out={};return keys.forEach((key=>{asset.forEach(((item,i)=>{out[key+(0===i?"":i+1)]=item}))})),out}};async function testImageFormat(imageData){if("Image"in globalThis)return new Promise((resolve=>{const image=new Image;image.onload=()=>{resolve(!0)},image.onerror=()=>{resolve(!1)},image.src=imageData}));if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const blob=await(await fetch(imageData)).blob();await createImageBitmap(blob)}catch{return!1}return!0}return!1}lib.Rw.add(cacheTextureArray);const detectAvif={extension:{type:lib.nw.DetectionParser,priority:1},test:async()=>testImageFormat("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async formats=>[...formats,"avif"],remove:async formats=>formats.filter((f=>"avif"!==f))};lib.Rw.add(detectAvif);const detectWebp={extension:{type:lib.nw.DetectionParser,priority:0},test:async()=>testImageFormat("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async formats=>[...formats,"webp"],remove:async formats=>formats.filter((f=>"webp"!==f))};lib.Rw.add(detectWebp);const imageFormats=["png","jpg","jpeg"],detectDefaults={extension:{type:lib.nw.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async formats=>[...formats,...imageFormats],remove:async formats=>formats.filter((f=>!imageFormats.includes(f)))};lib.Rw.add(detectDefaults);const inWorker="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function testVideoFormat(mimeType){return!inWorker&&""!==document.createElement("video").canPlayType(mimeType)}const detectWebm={extension:{type:lib.nw.DetectionParser,priority:0},test:async()=>testVideoFormat("video/webm"),add:async formats=>[...formats,"webm"],remove:async formats=>formats.filter((f=>"webm"!==f))};lib.Rw.add(detectWebm);const detectMp4={extension:{type:lib.nw.DetectionParser,priority:0},test:async()=>testVideoFormat("video/mp4"),add:async formats=>[...formats,"mp4","m4v"],remove:async formats=>formats.filter((f=>"mp4"!==f&&"m4v"!==f))};lib.Rw.add(detectMp4);const detectOgv={extension:{type:lib.nw.DetectionParser,priority:0},test:async()=>testVideoFormat("video/ogg"),add:async formats=>[...formats,"ogv"],remove:async formats=>formats.filter((f=>"ogv"!==f))};lib.Rw.add(detectOgv);const resolveTextureUrl={extension:lib.nw.ResolveParser,test:loadTextures.test,parse:value=>({resolution:parseFloat(lib.Xd.RETINA_PREFIX.exec(value)?.[1]??"1"),format:lib.P6.path.extname(value).slice(1),src:value})};lib.Rw.add(resolveTextureUrl);const copySearchParams=(targetUrl,sourceUrl)=>{const searchParams=sourceUrl.split("?")[1];return searchParams&&(targetUrl+=`?${searchParams}`),targetUrl}},"./node_modules/@pixi/compressed-textures/lib/loaders/compressedTextureExtensions.mjs":()=>{},"./node_modules/@pixi/core/lib/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{iw:()=>ALPHA_MODES,T$:()=>BLEND_MODES,VL:()=>BaseTexture,a$:()=>BatchDrawCall,JZ:()=>BatchGeometry,Ie:()=>BatchTextureArray,lW:()=>Buffer,qm:()=>BufferResource,yl:()=>CLEAR_MODES,Cd:()=>Circle,Il:()=>Color,ZX:()=>DEG_TO_RAD,lg:()=>DRAW_MODES,Pj:()=>Ellipse,nw:()=>ExtensionType,I2:()=>FORMATS,wn:()=>Filter,wG:()=>Geometry,A7:()=>MASK_TYPES,KI:()=>MIPMAP_MODES,y3:()=>Matrix,bO:()=>ObjectRenderer,AB:()=>ObservablePoint,_b:()=>PI_2,E9:()=>Point,mg:()=>Polygon,$r:()=>Program,ud:()=>QuadUv,jl:()=>RAD_TO_DEG,Ae:()=>Rectangle,TI:()=>RenderTexture,c9:()=>RoundedRectangle,HS:()=>SHAPES,pX:()=>SVGResource,ex:()=>Shader,ZM:()=>State,vK:()=>TYPES,xE:()=>Texture,UX:()=>TextureMatrix,vB:()=>Ticker,wx:()=>Transform,uF:()=>UPDATE_PRIORITY,oo:()=>UniformGroup,eH:()=>VideoResource,Rv:()=>ViewableBuffer,Nt:()=>WRAP_MODES,e6:()=>autoDetectRenderer,Y9:()=>defaultFilterVertex,kP:()=>fragments_defaultVertex,Rw:()=>extensions,tq:()=>isMobile_isMobile,Xd:()=>settings,P6:()=>utils_lib_namespaceObject});var utils_lib_namespaceObject={};__webpack_require__.r(utils_lib_namespaceObject),__webpack_require__.d(utils_lib_namespaceObject,{BaseTextureCache:()=>BaseTextureCache,BoundingBox:()=>BoundingBox,CanvasRenderTarget:()=>CanvasRenderTarget,DATA_URI:()=>DATA_URI,EventEmitter:()=>eventemitter3_default(),ProgramCache:()=>ProgramCache,TextureCache:()=>TextureCache,clearTextureCache:()=>clearTextureCache,correctBlendMode:()=>correctBlendMode,createIndicesForQuads:()=>createIndicesForQuads,decomposeDataUri:()=>decomposeDataUri,deprecation:()=>deprecation,destroyTextureCache:()=>destroyTextureCache,detectVideoAlphaMode:()=>detectVideoAlphaMode,determineCrossOrigin:()=>determineCrossOrigin,earcut:()=>earcut_default(),getBufferType:()=>getBufferType,getCanvasBoundingBox:()=>getCanvasBoundingBox,getResolutionOfUrl:()=>getResolutionOfUrl,hex2rgb:()=>hex2rgb,hex2string:()=>hex2string,interleaveTypedArrays:()=>interleaveTypedArrays,isMobile:()=>isMobile_isMobile,isPow2:()=>isPow2,isWebGLSupported:()=>isWebGLSupported,log2:()=>log2,nextPow2:()=>nextPow2,path:()=>path,premultiplyBlendMode:()=>premultiplyBlendMode,premultiplyRgba:()=>premultiplyRgba,premultiplyTint:()=>premultiplyTint,premultiplyTintToRgba:()=>premultiplyTintToRgba,removeItems:()=>removeItems,rgb2hex:()=>rgb2hex,sayHello:()=>sayHello,sign:()=>sign,skipHello:()=>skipHello,string2hex:()=>string2hex,trimCanvas:()=>trimCanvas,uid:()=>uid,url:()=>url_url});var ENV=(ENV2=>(ENV2[ENV2.WEBGL_LEGACY=0]="WEBGL_LEGACY",ENV2[ENV2.WEBGL=1]="WEBGL",ENV2[ENV2.WEBGL2=2]="WEBGL2",ENV2))(ENV||{}),RENDERER_TYPE=(RENDERER_TYPE2=>(RENDERER_TYPE2[RENDERER_TYPE2.UNKNOWN=0]="UNKNOWN",RENDERER_TYPE2[RENDERER_TYPE2.WEBGL=1]="WEBGL",RENDERER_TYPE2[RENDERER_TYPE2.CANVAS=2]="CANVAS",RENDERER_TYPE2))(RENDERER_TYPE||{}),BUFFER_BITS=(BUFFER_BITS2=>(BUFFER_BITS2[BUFFER_BITS2.COLOR=16384]="COLOR",BUFFER_BITS2[BUFFER_BITS2.DEPTH=256]="DEPTH",BUFFER_BITS2[BUFFER_BITS2.STENCIL=1024]="STENCIL",BUFFER_BITS2))(BUFFER_BITS||{}),BLEND_MODES=(BLEND_MODES2=>(BLEND_MODES2[BLEND_MODES2.NORMAL=0]="NORMAL",BLEND_MODES2[BLEND_MODES2.ADD=1]="ADD",BLEND_MODES2[BLEND_MODES2.MULTIPLY=2]="MULTIPLY",BLEND_MODES2[BLEND_MODES2.SCREEN=3]="SCREEN",BLEND_MODES2[BLEND_MODES2.OVERLAY=4]="OVERLAY",BLEND_MODES2[BLEND_MODES2.DARKEN=5]="DARKEN",BLEND_MODES2[BLEND_MODES2.LIGHTEN=6]="LIGHTEN",BLEND_MODES2[BLEND_MODES2.COLOR_DODGE=7]="COLOR_DODGE",BLEND_MODES2[BLEND_MODES2.COLOR_BURN=8]="COLOR_BURN",BLEND_MODES2[BLEND_MODES2.HARD_LIGHT=9]="HARD_LIGHT",BLEND_MODES2[BLEND_MODES2.SOFT_LIGHT=10]="SOFT_LIGHT",BLEND_MODES2[BLEND_MODES2.DIFFERENCE=11]="DIFFERENCE",BLEND_MODES2[BLEND_MODES2.EXCLUSION=12]="EXCLUSION",BLEND_MODES2[BLEND_MODES2.HUE=13]="HUE",BLEND_MODES2[BLEND_MODES2.SATURATION=14]="SATURATION",BLEND_MODES2[BLEND_MODES2.COLOR=15]="COLOR",BLEND_MODES2[BLEND_MODES2.LUMINOSITY=16]="LUMINOSITY",BLEND_MODES2[BLEND_MODES2.NORMAL_NPM=17]="NORMAL_NPM",BLEND_MODES2[BLEND_MODES2.ADD_NPM=18]="ADD_NPM",BLEND_MODES2[BLEND_MODES2.SCREEN_NPM=19]="SCREEN_NPM",BLEND_MODES2[BLEND_MODES2.NONE=20]="NONE",BLEND_MODES2[BLEND_MODES2.SRC_OVER=0]="SRC_OVER",BLEND_MODES2[BLEND_MODES2.SRC_IN=21]="SRC_IN",BLEND_MODES2[BLEND_MODES2.SRC_OUT=22]="SRC_OUT",BLEND_MODES2[BLEND_MODES2.SRC_ATOP=23]="SRC_ATOP",BLEND_MODES2[BLEND_MODES2.DST_OVER=24]="DST_OVER",BLEND_MODES2[BLEND_MODES2.DST_IN=25]="DST_IN",BLEND_MODES2[BLEND_MODES2.DST_OUT=26]="DST_OUT",BLEND_MODES2[BLEND_MODES2.DST_ATOP=27]="DST_ATOP",BLEND_MODES2[BLEND_MODES2.ERASE=26]="ERASE",BLEND_MODES2[BLEND_MODES2.SUBTRACT=28]="SUBTRACT",BLEND_MODES2[BLEND_MODES2.XOR=29]="XOR",BLEND_MODES2))(BLEND_MODES||{}),DRAW_MODES=(DRAW_MODES2=>(DRAW_MODES2[DRAW_MODES2.POINTS=0]="POINTS",DRAW_MODES2[DRAW_MODES2.LINES=1]="LINES",DRAW_MODES2[DRAW_MODES2.LINE_LOOP=2]="LINE_LOOP",DRAW_MODES2[DRAW_MODES2.LINE_STRIP=3]="LINE_STRIP",DRAW_MODES2[DRAW_MODES2.TRIANGLES=4]="TRIANGLES",DRAW_MODES2[DRAW_MODES2.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",DRAW_MODES2[DRAW_MODES2.TRIANGLE_FAN=6]="TRIANGLE_FAN",DRAW_MODES2))(DRAW_MODES||{}),FORMATS=(FORMATS2=>(FORMATS2[FORMATS2.RGBA=6408]="RGBA",FORMATS2[FORMATS2.RGB=6407]="RGB",FORMATS2[FORMATS2.RG=33319]="RG",FORMATS2[FORMATS2.RED=6403]="RED",FORMATS2[FORMATS2.RGBA_INTEGER=36249]="RGBA_INTEGER",FORMATS2[FORMATS2.RGB_INTEGER=36248]="RGB_INTEGER",FORMATS2[FORMATS2.RG_INTEGER=33320]="RG_INTEGER",FORMATS2[FORMATS2.RED_INTEGER=36244]="RED_INTEGER",FORMATS2[FORMATS2.ALPHA=6406]="ALPHA",FORMATS2[FORMATS2.LUMINANCE=6409]="LUMINANCE",FORMATS2[FORMATS2.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",FORMATS2[FORMATS2.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",FORMATS2[FORMATS2.DEPTH_STENCIL=34041]="DEPTH_STENCIL",FORMATS2))(FORMATS||{}),TARGETS=(TARGETS2=>(TARGETS2[TARGETS2.TEXTURE_2D=3553]="TEXTURE_2D",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",TARGETS2[TARGETS2.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",TARGETS2[TARGETS2.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",TARGETS2))(TARGETS||{}),TYPES=(TYPES2=>(TYPES2[TYPES2.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",TYPES2[TYPES2.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",TYPES2[TYPES2.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",TYPES2[TYPES2.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",TYPES2[TYPES2.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",TYPES2[TYPES2.UNSIGNED_INT=5125]="UNSIGNED_INT",TYPES2[TYPES2.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",TYPES2[TYPES2.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",TYPES2[TYPES2.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",TYPES2[TYPES2.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",TYPES2[TYPES2.BYTE=5120]="BYTE",TYPES2[TYPES2.SHORT=5122]="SHORT",TYPES2[TYPES2.INT=5124]="INT",TYPES2[TYPES2.FLOAT=5126]="FLOAT",TYPES2[TYPES2.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",TYPES2[TYPES2.HALF_FLOAT=36193]="HALF_FLOAT",TYPES2))(TYPES||{}),SAMPLER_TYPES=(SAMPLER_TYPES2=>(SAMPLER_TYPES2[SAMPLER_TYPES2.FLOAT=0]="FLOAT",SAMPLER_TYPES2[SAMPLER_TYPES2.INT=1]="INT",SAMPLER_TYPES2[SAMPLER_TYPES2.UINT=2]="UINT",SAMPLER_TYPES2))(SAMPLER_TYPES||{}),SCALE_MODES=(SCALE_MODES2=>(SCALE_MODES2[SCALE_MODES2.NEAREST=0]="NEAREST",SCALE_MODES2[SCALE_MODES2.LINEAR=1]="LINEAR",SCALE_MODES2))(SCALE_MODES||{}),WRAP_MODES=(WRAP_MODES2=>(WRAP_MODES2[WRAP_MODES2.CLAMP=33071]="CLAMP",WRAP_MODES2[WRAP_MODES2.REPEAT=10497]="REPEAT",WRAP_MODES2[WRAP_MODES2.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",WRAP_MODES2))(WRAP_MODES||{}),MIPMAP_MODES=(MIPMAP_MODES2=>(MIPMAP_MODES2[MIPMAP_MODES2.OFF=0]="OFF",MIPMAP_MODES2[MIPMAP_MODES2.POW2=1]="POW2",MIPMAP_MODES2[MIPMAP_MODES2.ON=2]="ON",MIPMAP_MODES2[MIPMAP_MODES2.ON_MANUAL=3]="ON_MANUAL",MIPMAP_MODES2))(MIPMAP_MODES||{}),ALPHA_MODES=(ALPHA_MODES2=>(ALPHA_MODES2[ALPHA_MODES2.NPM=0]="NPM",ALPHA_MODES2[ALPHA_MODES2.UNPACK=1]="UNPACK",ALPHA_MODES2[ALPHA_MODES2.PMA=2]="PMA",ALPHA_MODES2[ALPHA_MODES2.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",ALPHA_MODES2[ALPHA_MODES2.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",ALPHA_MODES2[ALPHA_MODES2.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",ALPHA_MODES2))(ALPHA_MODES||{}),CLEAR_MODES=(CLEAR_MODES2=>(CLEAR_MODES2[CLEAR_MODES2.NO=0]="NO",CLEAR_MODES2[CLEAR_MODES2.YES=1]="YES",CLEAR_MODES2[CLEAR_MODES2.AUTO=2]="AUTO",CLEAR_MODES2[CLEAR_MODES2.BLEND=0]="BLEND",CLEAR_MODES2[CLEAR_MODES2.CLEAR=1]="CLEAR",CLEAR_MODES2[CLEAR_MODES2.BLIT=2]="BLIT",CLEAR_MODES2))(CLEAR_MODES||{}),GC_MODES=(GC_MODES2=>(GC_MODES2[GC_MODES2.AUTO=0]="AUTO",GC_MODES2[GC_MODES2.MANUAL=1]="MANUAL",GC_MODES2))(GC_MODES||{}),PRECISION=(PRECISION2=>(PRECISION2.LOW="lowp",PRECISION2.MEDIUM="mediump",PRECISION2.HIGH="highp",PRECISION2))(PRECISION||{}),MASK_TYPES=(MASK_TYPES2=>(MASK_TYPES2[MASK_TYPES2.NONE=0]="NONE",MASK_TYPES2[MASK_TYPES2.SCISSOR=1]="SCISSOR",MASK_TYPES2[MASK_TYPES2.STENCIL=2]="STENCIL",MASK_TYPES2[MASK_TYPES2.SPRITE=3]="SPRITE",MASK_TYPES2[MASK_TYPES2.COLOR=4]="COLOR",MASK_TYPES2))(MASK_TYPES||{}),MSAA_QUALITY=(MSAA_QUALITY2=>(MSAA_QUALITY2[MSAA_QUALITY2.NONE=0]="NONE",MSAA_QUALITY2[MSAA_QUALITY2.LOW=2]="LOW",MSAA_QUALITY2[MSAA_QUALITY2.MEDIUM=4]="MEDIUM",MSAA_QUALITY2[MSAA_QUALITY2.HIGH=8]="HIGH",MSAA_QUALITY2))(MSAA_QUALITY||{}),BUFFER_TYPE=(BUFFER_TYPE2=>(BUFFER_TYPE2[BUFFER_TYPE2.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",BUFFER_TYPE2[BUFFER_TYPE2.ARRAY_BUFFER=34962]="ARRAY_BUFFER",BUFFER_TYPE2[BUFFER_TYPE2.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",BUFFER_TYPE2))(BUFFER_TYPE||{});const BrowserAdapter={createCanvas:(width,height)=>{const canvas=document.createElement("canvas");return canvas.width=width,canvas.height=height,canvas},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(url,options)=>fetch(url,options),parseXML:xml=>(new DOMParser).parseFromString(xml,"text/xml")},settings={ADAPTER:BrowserAdapter,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var appleIphone=/iPhone/i,appleIpod=/iPod/i,appleTablet=/iPad/i,appleUniversal=/\biOS-universal(?:.+)Mac\b/i,androidPhone=/\bAndroid(?:.+)Mobile\b/i,androidTablet=/Android/i,amazonPhone=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,amazonTablet=/Silk/i,windowsPhone=/Windows Phone/i,windowsTablet=/\bWindows(?:.+)ARM\b/i,otherBlackBerry=/BlackBerry/i,otherBlackBerry10=/BB10/i,otherOpera=/Opera Mini/i,otherChrome=/\b(CriOS|Chrome)(?:.+)Mobile/i,otherFirefox=/Mobile(?:.+)Firefox\b/i,isAppleTabletOnIos13=function(navigator){return void 0!==navigator&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1&&"undefined"==typeof MSStream};function isMobile(param){var nav={userAgent:"",platform:"",maxTouchPoints:0};param||"undefined"==typeof navigator?"string"==typeof param?nav.userAgent=param:param&¶m.userAgent&&(nav={userAgent:param.userAgent,platform:param.platform,maxTouchPoints:param.maxTouchPoints||0}):nav={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var userAgent=nav.userAgent,tmp=userAgent.split("[FBAN");void 0!==tmp[1]&&(userAgent=tmp[0]),void 0!==(tmp=userAgent.split("Twitter"))[1]&&(userAgent=tmp[0]);var match=function createMatch(userAgent){return function(regex){return regex.test(userAgent)}}(userAgent),result={apple:{phone:match(appleIphone)&&!match(windowsPhone),ipod:match(appleIpod),tablet:!match(appleIphone)&&(match(appleTablet)||isAppleTabletOnIos13(nav))&&!match(windowsPhone),universal:match(appleUniversal),device:(match(appleIphone)||match(appleIpod)||match(appleTablet)||match(appleUniversal)||isAppleTabletOnIos13(nav))&&!match(windowsPhone)},amazon:{phone:match(amazonPhone),tablet:!match(amazonPhone)&&match(amazonTablet),device:match(amazonPhone)||match(amazonTablet)},android:{phone:!match(windowsPhone)&&match(amazonPhone)||!match(windowsPhone)&&match(androidPhone),tablet:!match(windowsPhone)&&!match(amazonPhone)&&!match(androidPhone)&&(match(amazonTablet)||match(androidTablet)),device:!match(windowsPhone)&&(match(amazonPhone)||match(amazonTablet)||match(androidPhone)||match(androidTablet))||match(/\bokhttp\b/i)},windows:{phone:match(windowsPhone),tablet:match(windowsTablet),device:match(windowsPhone)||match(windowsTablet)},other:{blackberry:match(otherBlackBerry),blackberry10:match(otherBlackBerry10),opera:match(otherOpera),firefox:match(otherFirefox),chrome:match(otherChrome),device:match(otherBlackBerry)||match(otherBlackBerry10)||match(otherOpera)||match(otherFirefox)||match(otherChrome)},any:!1,phone:!1,tablet:!1};return result.any=result.apple.device||result.android.device||result.windows.device||result.other.device,result.phone=result.apple.phone||result.android.phone||result.windows.phone,result.tablet=result.apple.tablet||result.android.tablet||result.windows.tablet,result}const isMobile_isMobile=(isMobile.default??isMobile)(globalThis.navigator);settings.RETINA_PREFIX=/@([0-9\.]+)x/,settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var eventemitter3=__webpack_require__("./node_modules/eventemitter3/index.js"),eventemitter3_default=__webpack_require__.n(eventemitter3),earcut=__webpack_require__("./node_modules/earcut/src/earcut.js"),earcut_default=__webpack_require__.n(earcut),url=__webpack_require__("./node_modules/url/url.js");const warnings={};function deprecation(version,message,ignoreDepth=3){if(warnings[message])return;let stack=(new Error).stack;typeof stack>"u"?console.warn("PixiJS Deprecation Warning: ",`${message}\nDeprecated since v${version}`):(stack=stack.split("\n").splice(ignoreDepth).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${message}\nDeprecated since v${version}`),console.warn(stack),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${message}\nDeprecated since v${version}`),console.warn(stack))),warnings[message]=!0}const url_url={get parse(){return deprecation("7.3.0","utils.url.parse is deprecated, use native URL API instead."),url.Qc},get format(){return deprecation("7.3.0","utils.url.format is deprecated, use native URL API instead."),url.WU},get resolve(){return deprecation("7.3.0","utils.url.resolve is deprecated, use native URL API instead."),url.DB}};function assertPath(path2){if("string"!=typeof path2)throw new TypeError(`Path must be a string. Received ${JSON.stringify(path2)}`)}function removeUrlParams(url){return url.split("?")[0].split("#")[0]}const path={toPosix:path2=>function replaceAll(str,find,replace){return str.replace(new RegExp(function escapeRegExp(string){return string.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(find),"g"),replace)}(path2,"\\","/"),isUrl(path2){return/^https?:/.test(this.toPosix(path2))},isDataUrl:path2=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(path2),isBlobUrl:path2=>path2.startsWith("blob:"),hasProtocol(path2){return/^[^/:]+:/.test(this.toPosix(path2))},getProtocol(path2){assertPath(path2),path2=this.toPosix(path2);const matchFile=/^file:\/\/\//.exec(path2);if(matchFile)return matchFile[0];const matchProtocol=/^[^/:]+:\/{0,2}/.exec(path2);return matchProtocol?matchProtocol[0]:""},toAbsolute(url,customBaseUrl,customRootUrl){if(assertPath(url),this.isDataUrl(url)||this.isBlobUrl(url))return url;const baseUrl=removeUrlParams(this.toPosix(customBaseUrl??settings.ADAPTER.getBaseUrl())),rootUrl=removeUrlParams(this.toPosix(customRootUrl??this.rootname(baseUrl)));return(url=this.toPosix(url)).startsWith("/")?path.join(rootUrl,url.slice(1)):this.isAbsolute(url)?url:this.join(baseUrl,url)},normalize(path2){if(assertPath(path2),0===path2.length)return".";if(this.isDataUrl(path2)||this.isBlobUrl(path2))return path2;let protocol="";const isAbsolute=(path2=this.toPosix(path2)).startsWith("/");this.hasProtocol(path2)&&(protocol=this.rootname(path2),path2=path2.slice(protocol.length));const trailingSeparator=path2.endsWith("/");return path2=function normalizeStringPosix(path2,allowAboveRoot){let res="",lastSegmentLength=0,lastSlash=-1,dots=0,code=-1;for(let i=0;i<=path2.length;++i){if(i2){const lastSlashIndex=res.lastIndexOf("/");if(lastSlashIndex!==res.length-1){-1===lastSlashIndex?(res="",lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf("/")),lastSlash=i,dots=0;continue}}else if(2===res.length||1===res.length){res="",lastSegmentLength=0,lastSlash=i,dots=0;continue}allowAboveRoot&&(res.length>0?res+="/..":res="..",lastSegmentLength=2)}else res.length>0?res+=`/${path2.slice(lastSlash+1,i)}`:res=path2.slice(lastSlash+1,i),lastSegmentLength=i-lastSlash-1;lastSlash=i,dots=0}else 46===code&&-1!==dots?++dots:dots=-1}return res}(path2,!1),path2.length>0&&trailingSeparator&&(path2+="/"),isAbsolute?`/${path2}`:protocol+path2},isAbsolute(path2){return assertPath(path2),path2=this.toPosix(path2),!!this.hasProtocol(path2)||path2.startsWith("/")},join(...segments){if(0===segments.length)return".";let joined;for(let i=0;i0)if(void 0===joined)joined=arg;else{const prevArg=segments[i-1]??"";this.extname(prevArg)?joined+=`/../${arg}`:joined+=`/${arg}`}}return void 0===joined?".":this.normalize(joined)},dirname(path2){if(assertPath(path2),0===path2.length)return".";let code=(path2=this.toPosix(path2)).charCodeAt(0);const hasRoot=47===code;let end=-1,matchedSlash=!0;const proto=this.getProtocol(path2),origpath=path2;for(let i=(path2=path2.slice(proto.length)).length-1;i>=1;--i)if(code=path2.charCodeAt(i),47===code){if(!matchedSlash){end=i;break}}else matchedSlash=!1;return-1===end?hasRoot?"/":this.isUrl(origpath)?proto+path2:proto:hasRoot&&1===end?"//":proto+path2.slice(0,end)},rootname(path2){assertPath(path2);let root="";if(root=(path2=this.toPosix(path2)).startsWith("/")?"/":this.getProtocol(path2),this.isUrl(path2)){const index=path2.indexOf("/",root.length);root=-1!==index?path2.slice(0,index):path2,root.endsWith("/")||(root+="/")}return root},basename(path2,ext){assertPath(path2),ext&&assertPath(ext),path2=removeUrlParams(this.toPosix(path2));let i,start=0,end=-1,matchedSlash=!0;if(void 0!==ext&&ext.length>0&&ext.length<=path2.length){if(ext.length===path2.length&&ext===path2)return"";let extIdx=ext.length-1,firstNonSlashEnd=-1;for(i=path2.length-1;i>=0;--i){const code=path2.charCodeAt(i);if(47===code){if(!matchedSlash){start=i+1;break}}else-1===firstNonSlashEnd&&(matchedSlash=!1,firstNonSlashEnd=i+1),extIdx>=0&&(code===ext.charCodeAt(extIdx)?-1==--extIdx&&(end=i):(extIdx=-1,end=firstNonSlashEnd))}return start===end?end=firstNonSlashEnd:-1===end&&(end=path2.length),path2.slice(start,end)}for(i=path2.length-1;i>=0;--i)if(47===path2.charCodeAt(i)){if(!matchedSlash){start=i+1;break}}else-1===end&&(matchedSlash=!1,end=i+1);return-1===end?"":path2.slice(start,end)},extname(path2){assertPath(path2);let startDot=-1,startPart=0,end=-1,matchedSlash=!0,preDotState=0;for(let i=(path2=removeUrlParams(this.toPosix(path2))).length-1;i>=0;--i){const code=path2.charCodeAt(i);if(47!==code)-1===end&&(matchedSlash=!1,end=i+1),46===code?-1===startDot?startDot=i:1!==preDotState&&(preDotState=1):-1!==startDot&&(preDotState=-1);else if(!matchedSlash){startPart=i+1;break}}return-1===startDot||-1===end||0===preDotState||1===preDotState&&startDot===end-1&&startDot===startPart+1?"":path2.slice(startDot,end)},parse(path2){assertPath(path2);const ret={root:"",dir:"",base:"",ext:"",name:""};if(0===path2.length)return ret;let code=(path2=removeUrlParams(this.toPosix(path2))).charCodeAt(0);const isAbsolute=this.isAbsolute(path2);let start;ret.root=this.rootname(path2),start=isAbsolute||this.hasProtocol(path2)?1:0;let startDot=-1,startPart=0,end=-1,matchedSlash=!0,i=path2.length-1,preDotState=0;for(;i>=start;--i)if(code=path2.charCodeAt(i),47!==code)-1===end&&(matchedSlash=!1,end=i+1),46===code?-1===startDot?startDot=i:1!==preDotState&&(preDotState=1):-1!==startDot&&(preDotState=-1);else if(!matchedSlash){startPart=i+1;break}return-1===startDot||-1===end||0===preDotState||1===preDotState&&startDot===end-1&&startDot===startPart+1?-1!==end&&(ret.base=ret.name=0===startPart&&isAbsolute?path2.slice(1,end):path2.slice(startPart,end)):(0===startPart&&isAbsolute?(ret.name=path2.slice(1,startDot),ret.base=path2.slice(1,end)):(ret.name=path2.slice(startPart,startDot),ret.base=path2.slice(startPart,end)),ret.ext=path2.slice(startDot,end)),ret.dir=this.dirname(path2),ret},sep:"/",delimiter:":"};let promise,supported;async function detectVideoAlphaMode(){return promise??(promise=(async()=>{const gl=document.createElement("canvas").getContext("webgl");if(!gl)return ALPHA_MODES.UNPACK;const video=await new Promise((resolve=>{const video2=document.createElement("video");video2.onloadeddata=()=>resolve(video2),video2.onerror=()=>resolve(null),video2.autoplay=!1,video2.crossOrigin="anonymous",video2.preload="auto",video2.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",video2.load()}));if(!video)return ALPHA_MODES.UNPACK;const texture=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,texture);const framebuffer=gl.createFramebuffer();gl.bindFramebuffer(gl.FRAMEBUFFER,framebuffer),gl.framebufferTexture2D(gl.FRAMEBUFFER,gl.COLOR_ATTACHMENT0,gl.TEXTURE_2D,texture,0),gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,gl.NONE),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,video);const pixel=new Uint8Array(4);return gl.readPixels(0,0,1,1,gl.RGBA,gl.UNSIGNED_BYTE,pixel),gl.deleteFramebuffer(framebuffer),gl.deleteTexture(texture),gl.getExtension("WEBGL_lose_context")?.loseContext(),pixel[0]<=pixel[3]?ALPHA_MODES.PMA:ALPHA_MODES.UNPACK})()),promise}function skipHello(){deprecation("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function sayHello(){deprecation("7.0.0",'sayHello is deprecated, please use Renderer\'s "hello" option')}function isWebGLSupported(){return typeof supported>"u"&&(supported=function(){const contextOptions={stencil:!0,failIfMajorPerformanceCaveat:settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!settings.ADAPTER.getWebGLRenderingContext())return!1;const canvas=settings.ADAPTER.createCanvas();let gl=canvas.getContext("webgl",contextOptions)||canvas.getContext("experimental-webgl",contextOptions);const success=!!gl?.getContextAttributes()?.stencil;if(gl){const loseContext=gl.getExtension("WEBGL_lose_context");loseContext&&loseContext.loseContext()}return gl=null,success}catch{return!1}}()),supported}var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return t=(r=o(this.rgba)).r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return t=(r=o(this.rgba)).r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return t=(r=d(c(this.rgba))).h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[];!function(r){r.forEach((function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))}))}([function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));uv===value2[i]));if(null!==value1&&null!==value2){const keys1=Object.keys(value1),keys2=Object.keys(value2);return keys1.length===keys2.length&&keys1.every((key=>value1[key]===value2[key]))}return value1===value2}toRgba(){const[r,g,b,a]=this._components;return{r,g,b,a}}toRgb(){const[r,g,b]=this._components;return{r,g,b}}toRgbaString(){const[r,g,b]=this.toUint8RgbArray();return`rgba(${r},${g},${b},${this.alpha})`}toUint8RgbArray(out){const[r,g,b]=this._components;return(out=out??[])[0]=Math.round(255*r),out[1]=Math.round(255*g),out[2]=Math.round(255*b),out}toRgbArray(out){out=out??[];const[r,g,b]=this._components;return out[0]=r,out[1]=g,out[2]=b,out}toNumber(){return this._int}toLittleEndianNumber(){const value=this._int;return(value>>16)+(65280&value)+((255&value)<<16)}multiply(value){const[r,g,b,a]=_Color2.temp.setValue(value)._components;return this._components[0]*=r,this._components[1]*=g,this._components[2]*=b,this._components[3]*=a,this.refreshInt(),this._value=null,this}premultiply(alpha,applyToRGB=!0){return applyToRGB&&(this._components[0]*=alpha,this._components[1]*=alpha,this._components[2]*=alpha),this._components[3]=alpha,this.refreshInt(),this._value=null,this}toPremultiplied(alpha,applyToRGB=!0){if(1===alpha)return(255<<24)+this._int;if(0===alpha)return applyToRGB?0:this._int;let r=this._int>>16&255,g=this._int>>8&255,b=255&this._int;return applyToRGB&&(r=r*alpha+.5|0,g=g*alpha+.5|0,b=b*alpha+.5|0),(255*alpha<<24)+(r<<16)+(g<<8)+b}toHex(){const hexString=this._int.toString(16);return`#${"000000".substring(0,6-hexString.length)+hexString}`}toHexa(){const alphaString=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-alphaString.length)+alphaString}setAlpha(alpha){return this._components[3]=this._clamp(alpha),this}round(steps){const[r,g,b]=this._components;return this._components[0]=Math.round(r*steps)/steps,this._components[1]=Math.round(g*steps)/steps,this._components[2]=Math.round(b*steps)/steps,this.refreshInt(),this._value=null,this}toArray(out){out=out??[];const[r,g,b,a]=this._components;return out[0]=r,out[1]=g,out[2]=b,out[3]=a,out}normalize(value){let r,g,b,a;if(("number"==typeof value||value instanceof Number)&&value>=0&&value<=16777215){r=(value>>16&255)/255,g=(value>>8&255)/255,b=(255&value)/255,a=1}else if((Array.isArray(value)||value instanceof Float32Array)&&value.length>=3&&value.length<=4)value=this._clamp(value),[r,g,b,a=1]=value;else if((value instanceof Uint8Array||value instanceof Uint8ClampedArray)&&value.length>=3&&value.length<=4)value=this._clamp(value,0,255),[r,g,b,a=255]=value,r/=255,g/=255,b/=255,a/=255;else if("string"==typeof value||"object"==typeof value){if("string"==typeof value){const match=_Color2.HEX_PATTERN.exec(value);match&&(value=`#${match[2]}`)}const color=w(value);color.isValid()&&(({r,g,b,a}=color.rgba),r/=255,g/=255,b/=255)}if(void 0===r)throw new Error(`Unable to convert color ${value}`);this._components[0]=r,this._components[1]=g,this._components[2]=b,this._components[3]=a,this.refreshInt()}refreshInt(){this._clamp(this._components);const[r,g,b]=this._components;this._int=(255*r<<16)+(255*g<<8)+(255*b|0)}_clamp(value,min=0,max=1){return"number"==typeof value?Math.min(Math.max(value,min),max):(value.forEach(((v,i)=>{value[i]=Math.min(Math.max(v,min),max)})),value)}};_Color.shared=new _Color,_Color.temp=new _Color,_Color.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Color=_Color;function hex2rgb(hex,out=[]){return deprecation("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Color.shared.setValue(hex).toRgbArray(out)}function hex2string(hex){return deprecation("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Color.shared.setValue(hex).toHex()}function string2hex(string){return deprecation("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),Color.shared.setValue(string).toNumber()}function rgb2hex(rgb){return deprecation("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Color.shared.setValue(rgb).toNumber()}const premultiplyBlendMode=function mapPremultipliedBlendModes(){const pm=[],npm=[];for(let i=0;i<32;i++)pm[i]=i,npm[i]=i;pm[BLEND_MODES.NORMAL_NPM]=BLEND_MODES.NORMAL,pm[BLEND_MODES.ADD_NPM]=BLEND_MODES.ADD,pm[BLEND_MODES.SCREEN_NPM]=BLEND_MODES.SCREEN,npm[BLEND_MODES.NORMAL]=BLEND_MODES.NORMAL_NPM,npm[BLEND_MODES.ADD]=BLEND_MODES.ADD_NPM,npm[BLEND_MODES.SCREEN]=BLEND_MODES.SCREEN_NPM;const array=[];return array.push(npm),array.push(pm),array}();function correctBlendMode(blendMode,premultiplied){return premultiplyBlendMode[premultiplied?1:0][blendMode]}function premultiplyRgba(rgb,alpha,out,premultiply=!0){return deprecation("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),Color.shared.setValue(rgb).premultiply(alpha,premultiply).toArray(out??new Float32Array(4))}function premultiplyTint(tint,alpha){return deprecation("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),Color.shared.setValue(tint).toPremultiplied(alpha)}function premultiplyTintToRgba(tint,alpha,out,premultiply=!0){return deprecation("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),Color.shared.setValue(tint).premultiply(alpha,premultiply).toArray(out??new Float32Array(4))}const DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function createIndicesForQuads(size,outBuffer=null){const totalIndices=6*size;if((outBuffer=outBuffer||new Uint16Array(totalIndices)).length!==totalIndices)throw new Error(`Out buffer length is incorrect, got ${outBuffer.length} and expected ${totalIndices}`);for(let i=0,j=0;i>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,(v|=v>>>16)+1}function isPow2(v){return!(v&v-1||!v)}function log2(v){let r=(v>65535?1:0)<<4,shift=((v>>>=r)>255?1:0)<<3;return r|=shift,shift=((v>>>=shift)>15?1:0)<<2,r|=shift,shift=((v>>>=shift)>3?1:0)<<1,r|=shift,r|(v>>>=shift)>>1}function removeItems(arr,startIdx,removeCount){const length=arr.length;let i;if(startIdx>=length||0===removeCount)return;const len=length-(removeCount=startIdx+removeCount>length?length-startIdx:removeCount);for(i=startIdx;i(ExtensionType2.Renderer="renderer",ExtensionType2.Application="application",ExtensionType2.RendererSystem="renderer-webgl-system",ExtensionType2.RendererPlugin="renderer-webgl-plugin",ExtensionType2.CanvasRendererSystem="renderer-canvas-system",ExtensionType2.CanvasRendererPlugin="renderer-canvas-plugin",ExtensionType2.Asset="asset",ExtensionType2.LoadParser="load-parser",ExtensionType2.ResolveParser="resolve-parser",ExtensionType2.CacheParser="cache-parser",ExtensionType2.DetectionParser="detection-parser",ExtensionType2))(ExtensionType||{});const normalizeExtension=ext=>{if("function"==typeof ext||"object"==typeof ext&&ext.extension){if(!ext.extension)throw new Error("Extension class must have an extension object");ext={..."object"!=typeof ext.extension?{type:ext.extension}:ext.extension,ref:ext}}if("object"!=typeof ext)throw new Error("Invalid extension type");return"string"==typeof(ext={...ext}).type&&(ext.type=[ext.type]),ext},normalizePriority=(ext,defaultPriority)=>normalizeExtension(ext).priority??defaultPriority,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...extensions2){return extensions2.map(normalizeExtension).forEach((ext=>{ext.type.forEach((type=>this._removeHandlers[type]?.(ext)))})),this},add(...extensions2){return extensions2.map(normalizeExtension).forEach((ext=>{ext.type.forEach((type=>{const handlers=this._addHandlers,queue=this._queue;handlers[type]?handlers[type](ext):(queue[type]=queue[type]||[],queue[type].push(ext))}))})),this},handle(type,onAdd,onRemove){const addHandlers=this._addHandlers,removeHandlers=this._removeHandlers;if(addHandlers[type]||removeHandlers[type])throw new Error(`Extension type ${type} already has a handler`);addHandlers[type]=onAdd,removeHandlers[type]=onRemove;const queue=this._queue;return queue[type]&&(queue[type].forEach((ext=>onAdd(ext))),delete queue[type]),this},handleByMap(type,map){return this.handle(type,(extension=>{map[extension.name]=extension.ref}),(extension=>{delete map[extension.name]}))},handleByList(type,list,defaultPriority=-1){return this.handle(type,(extension=>{list.includes(extension.ref)||(list.push(extension.ref),list.sort(((a,b)=>normalizePriority(b,defaultPriority)-normalizePriority(a,defaultPriority))))}),(extension=>{const index=list.indexOf(extension.ref);-1!==index&&list.splice(index,1)}))}};class ViewableBuffer{constructor(sizeOrBuffer){"number"==typeof sizeOrBuffer?this.rawBinaryData=new ArrayBuffer(sizeOrBuffer):sizeOrBuffer instanceof Uint8Array?this.rawBinaryData=sizeOrBuffer.buffer:this.rawBinaryData=sizeOrBuffer,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(type){return this[`${type}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(type){switch(type){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${type} isn't a valid view type`)}}}const fragTemplate=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function generateIfTestSrc(maxIfs){let src="";for(let i=0;i0&&(src+="\nelse "),i=0;--i){const ResourcePlugin=INSTALLED[i];if(ResourcePlugin.test&&ResourcePlugin.test(source,extension))return new ResourcePlugin(source,options)}throw new Error("Unrecognized source type to auto-detect Resource")}class Runner_Runner{constructor(name){this.items=[],this._name=name,this._aliasCount=0}emit(a0,a1,a2,a3,a4,a5,a6,a7){if(arguments.length>8)throw new Error("max arguments reached");const{name,items}=this;this._aliasCount++;for(let i=0,len=items.length;i0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(item){return item[this._name]&&(this.ensureNonAliasedItems(),this.remove(item),this.items.push(item)),this}remove(item){const index=this.items.indexOf(item);return-1!==index&&(this.ensureNonAliasedItems(),this.items.splice(index,1)),this}contains(item){return this.items.includes(item)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return 0===this.items.length}get name(){return this._name}}Object.defineProperties(Runner_Runner.prototype,{dispatch:{value:Runner_Runner.prototype.emit},run:{value:Runner_Runner.prototype.emit}});class Resource{constructor(width=0,height=0){this._width=width,this._height=height,this.destroyed=!1,this.internal=!1,this.onResize=new Runner_Runner("setRealSize"),this.onUpdate=new Runner_Runner("update"),this.onError=new Runner_Runner("onError")}bind(baseTexture){this.onResize.add(baseTexture),this.onUpdate.add(baseTexture),this.onError.add(baseTexture),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(baseTexture){this.onResize.remove(baseTexture),this.onUpdate.remove(baseTexture),this.onError.remove(baseTexture)}resize(width,height){(width!==this._width||height!==this._height)&&(this._width=width,this._height=height,this.onResize.emit(width,height))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(_renderer,_baseTexture,_glTexture){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(_source,_extension){return!1}}class BufferResource extends Resource{constructor(source,options){const{width,height}=options||{};if(!width||!height)throw new Error("BufferResource width or height invalid");super(width,height),this.data=source,this.unpackAlignment=options.unpackAlignment??4}upload(renderer,baseTexture,glTexture){const gl=renderer.gl;gl.pixelStorei(gl.UNPACK_ALIGNMENT,this.unpackAlignment),gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,baseTexture.alphaMode===ALPHA_MODES.UNPACK);const width=baseTexture.realWidth,height=baseTexture.realHeight;return glTexture.width===width&&glTexture.height===height?gl.texSubImage2D(baseTexture.target,0,0,0,width,height,baseTexture.format,glTexture.type,this.data):(glTexture.width=width,glTexture.height=height,gl.texImage2D(baseTexture.target,0,glTexture.internalFormat,width,height,0,baseTexture.format,glTexture.type,this.data)),!0}dispose(){this.data=null}static test(source){return null===source||source instanceof Int8Array||source instanceof Uint8Array||source instanceof Uint8ClampedArray||source instanceof Int16Array||source instanceof Uint16Array||source instanceof Int32Array||source instanceof Uint32Array||source instanceof Float32Array}}const defaultBufferOptions={scaleMode:SCALE_MODES.NEAREST,alphaMode:ALPHA_MODES.NPM},_BaseTexture=class _BaseTexture2 extends(eventemitter3_default()){constructor(resource=null,options=null){super(),options=Object.assign({},_BaseTexture2.defaultOptions,options);const{alphaMode,mipmap,anisotropicLevel,scaleMode,width,height,wrapMode,format,type,target,resolution,resourceOptions}=options;resource&&!(resource instanceof Resource)&&((resource=autoDetectResource(resource,resourceOptions)).internal=!0),this.resolution=resolution||settings.RESOLUTION,this.width=Math.round((width||0)*this.resolution)/this.resolution,this.height=Math.round((height||0)*this.resolution)/this.resolution,this._mipmap=mipmap,this.anisotropicLevel=anisotropicLevel,this._wrapMode=wrapMode,this._scaleMode=scaleMode,this.format=format,this.type=type,this.target=target,this.alphaMode=alphaMode,this.uid=uid(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=width>0&&height>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(resource)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(value){this._mipmap!==value&&(this._mipmap=value,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(value){this._scaleMode!==value&&(this._scaleMode=value,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(value){this._wrapMode!==value&&(this._wrapMode=value,this.dirtyStyleId++)}setStyle(scaleMode,mipmap){let dirty;return void 0!==scaleMode&&scaleMode!==this.scaleMode&&(this.scaleMode=scaleMode,dirty=!0),void 0!==mipmap&&mipmap!==this.mipmap&&(this.mipmap=mipmap,dirty=!0),dirty&&this.dirtyStyleId++,this}setSize(desiredWidth,desiredHeight,resolution){return resolution=resolution||this.resolution,this.setRealSize(desiredWidth*resolution,desiredHeight*resolution,resolution)}setRealSize(realWidth,realHeight,resolution){return this.resolution=resolution||this.resolution,this.width=Math.round(realWidth)/this.resolution,this.height=Math.round(realHeight)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=isPow2(this.realWidth)&&isPow2(this.realHeight)}setResolution(resolution){const oldResolution=this.resolution;return oldResolution===resolution||(this.resolution=resolution,this.valid&&(this.width=Math.round(this.width*oldResolution)/resolution,this.height=Math.round(this.height*oldResolution)/resolution,this.emit("update",this)),this._refreshPOT()),this}setResource(resource){if(this.resource===resource)return this;if(this.resource)throw new Error("Resource can be set only once");return resource.bind(this),this.resource=resource,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(event){this.emit("error",this,event)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete BaseTextureCache[this.cacheId],delete TextureCache[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),_BaseTexture2.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(source,options,strict=settings.STRICT_TEXTURE_CACHE){const isFrame="string"==typeof source;let cacheId=null;if(isFrame)cacheId=source;else{if(!source._pixiId){const prefix=options?.pixiIdPrefix||"pixiid";source._pixiId=`${prefix}_${uid()}`}cacheId=source._pixiId}let baseTexture=BaseTextureCache[cacheId];if(isFrame&&strict&&!baseTexture)throw new Error(`The cacheId "${cacheId}" does not exist in BaseTextureCache.`);return baseTexture||(baseTexture=new _BaseTexture2(source,options),baseTexture.cacheId=cacheId,_BaseTexture2.addToCache(baseTexture,cacheId)),baseTexture}static fromBuffer(buffer,width,height,options){buffer=buffer||new Float32Array(width*height*4);const resource=new BufferResource(buffer,{width,height,...options?.resourceOptions});let format,type;return buffer instanceof Float32Array?(format=FORMATS.RGBA,type=TYPES.FLOAT):buffer instanceof Int32Array?(format=FORMATS.RGBA_INTEGER,type=TYPES.INT):buffer instanceof Uint32Array?(format=FORMATS.RGBA_INTEGER,type=TYPES.UNSIGNED_INT):buffer instanceof Int16Array?(format=FORMATS.RGBA_INTEGER,type=TYPES.SHORT):buffer instanceof Uint16Array?(format=FORMATS.RGBA_INTEGER,type=TYPES.UNSIGNED_SHORT):buffer instanceof Int8Array?(format=FORMATS.RGBA,type=TYPES.BYTE):(format=FORMATS.RGBA,type=TYPES.UNSIGNED_BYTE),resource.internal=!0,new _BaseTexture2(resource,Object.assign({},defaultBufferOptions,{type,format},options))}static addToCache(baseTexture,id){id&&(baseTexture.textureCacheIds.includes(id)||baseTexture.textureCacheIds.push(id),BaseTextureCache[id]&&BaseTextureCache[id]!==baseTexture&&console.warn(`BaseTexture added to the cache with an id [${id}] that already had an entry`),BaseTextureCache[id]=baseTexture)}static removeFromCache(baseTexture){if("string"==typeof baseTexture){const baseTextureFromCache=BaseTextureCache[baseTexture];if(baseTextureFromCache){const index=baseTextureFromCache.textureCacheIds.indexOf(baseTexture);return index>-1&&baseTextureFromCache.textureCacheIds.splice(index,1),delete BaseTextureCache[baseTexture],baseTextureFromCache}}else if(baseTexture?.textureCacheIds){for(let i=0;i1){for(let i=0;i(SHAPES2[SHAPES2.POLY=0]="POLY",SHAPES2[SHAPES2.RECT=1]="RECT",SHAPES2[SHAPES2.CIRC=2]="CIRC",SHAPES2[SHAPES2.ELIP=3]="ELIP",SHAPES2[SHAPES2.RREC=4]="RREC",SHAPES2))(SHAPES||{});class Point{constructor(x=0,y=0){this.x=0,this.y=0,this.x=x,this.y=y}clone(){return new Point(this.x,this.y)}copyFrom(p){return this.set(p.x,p.y),this}copyTo(p){return p.set(this.x,this.y),p}equals(p){return p.x===this.x&&p.y===this.y}set(x=0,y=x){return this.x=x,this.y=y,this}}Point.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const tempPoints=[new Point,new Point,new Point,new Point];class Rectangle{constructor(x=0,y=0,width=0,height=0){this.x=Number(x),this.y=Number(y),this.width=Number(width),this.height=Number(height),this.type=SHAPES.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Rectangle(0,0,0,0)}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}copyFrom(rectangle){return this.x=rectangle.x,this.y=rectangle.y,this.width=rectangle.width,this.height=rectangle.height,this}copyTo(rectangle){return rectangle.x=this.x,rectangle.y=this.y,rectangle.width=this.width,rectangle.height=this.height,rectangle}contains(x,y){return!(this.width<=0||this.height<=0)&&(x>=this.x&&x=this.y&&yother.right?other.right:this.right)<=x02)return!1;const y02=this.yother.bottom?other.bottom:this.bottom)>y02}const x0=this.left,x1=this.right,y0=this.top,y1=this.bottom;if(x1<=x0||y1<=y0)return!1;const lt=tempPoints[0].set(other.left,other.top),lb=tempPoints[1].set(other.left,other.bottom),rt=tempPoints[2].set(other.right,other.top),rb=tempPoints[3].set(other.right,other.bottom);if(rt.x<=lt.x||lb.y<=lt.y)return!1;const s=Math.sign(transform.a*transform.d-transform.b*transform.c);if(0===s||(transform.apply(lt,lt),transform.apply(lb,lb),transform.apply(rt,rt),transform.apply(rb,rb),Math.max(lt.x,lb.x,rt.x,rb.x)<=x0||Math.min(lt.x,lb.x,rt.x,rb.x)>=x1||Math.max(lt.y,lb.y,rt.y,rb.y)<=y0||Math.min(lt.y,lb.y,rt.y,rb.y)>=y1))return!1;const nx=s*(lb.y-lt.y),ny=s*(lt.x-lb.x),n00=nx*x0+ny*y0,n10=nx*x1+ny*y0,n01=nx*x0+ny*y1,n11=nx*x1+ny*y1;if(Math.max(n00,n10,n01,n11)<=nx*lt.x+ny*lt.y||Math.min(n00,n10,n01,n11)>=nx*rb.x+ny*rb.y)return!1;const mx=s*(lt.y-rt.y),my=s*(rt.x-lt.x),m00=mx*x0+my*y0,m10=mx*x1+my*y0,m01=mx*x0+my*y1,m11=mx*x1+my*y1;return!(Math.max(m00,m10,m01,m11)<=mx*lt.x+my*lt.y||Math.min(m00,m10,m01,m11)>=mx*rb.x+my*rb.y)}pad(paddingX=0,paddingY=paddingX){return this.x-=paddingX,this.y-=paddingY,this.width+=2*paddingX,this.height+=2*paddingY,this}fit(rectangle){const x1=Math.max(this.x,rectangle.x),x2=Math.min(this.x+this.width,rectangle.x+rectangle.width),y1=Math.max(this.y,rectangle.y),y2=Math.min(this.y+this.height,rectangle.y+rectangle.height);return this.x=x1,this.width=Math.max(x2-x1,0),this.y=y1,this.height=Math.max(y2-y1,0),this}ceil(resolution=1,eps=.001){const x2=Math.ceil((this.x+this.width-eps)*resolution)/resolution,y2=Math.ceil((this.y+this.height-eps)*resolution)/resolution;return this.x=Math.floor((this.x+eps)*resolution)/resolution,this.y=Math.floor((this.y+eps)*resolution)/resolution,this.width=x2-this.x,this.height=y2-this.y,this}enlarge(rectangle){const x1=Math.min(this.x,rectangle.x),x2=Math.max(this.x+this.width,rectangle.x+rectangle.width),y1=Math.min(this.y,rectangle.y),y2=Math.max(this.y+this.height,rectangle.y+rectangle.height);return this.x=x1,this.width=x2-x1,this.y=y1,this.height=y2-y1,this}}Rectangle.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Circle{constructor(x=0,y=0,radius=0){this.x=x,this.y=y,this.radius=radius,this.type=SHAPES.CIRC}clone(){return new Circle(this.x,this.y,this.radius)}contains(x,y){if(this.radius<=0)return!1;const r2=this.radius*this.radius;let dx=this.x-x,dy=this.y-y;return dx*=dx,dy*=dy,dx+dy<=r2}getBounds(){return new Rectangle(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}}Circle.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class Ellipse{constructor(x=0,y=0,halfWidth=0,halfHeight=0){this.x=x,this.y=y,this.width=halfWidth,this.height=halfHeight,this.type=SHAPES.ELIP}clone(){return new Ellipse(this.x,this.y,this.width,this.height)}contains(x,y){if(this.width<=0||this.height<=0)return!1;let normx=(x-this.x)/this.width,normy=(y-this.y)/this.height;return normx*=normx,normy*=normy,normx+normy<=1}getBounds(){return new Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)}}Ellipse.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Polygon{constructor(...points){let flat=Array.isArray(points[0])?points[0]:points;if("number"!=typeof flat[0]){const p=[];for(let i=0,il=flat.length;iy!=yj>y&&x<(y-yi)/(yj-yi)*(xj-xi)+xi&&(inside=!inside)}return inside}}Polygon.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce(((pointsDesc,currentPoint)=>`${pointsDesc}, ${currentPoint}`),"")}]`};class RoundedRectangle{constructor(x=0,y=0,width=0,height=0,radius=20){this.x=x,this.y=y,this.width=width,this.height=height,this.radius=radius,this.type=SHAPES.RREC}clone(){return new RoundedRectangle(this.x,this.y,this.width,this.height,this.radius)}contains(x,y){if(this.width<=0||this.height<=0)return!1;if(x>=this.x&&x<=this.x+this.width&&y>=this.y&&y<=this.y+this.height){const radius=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(y>=this.y+radius&&y<=this.y+this.height-radius||x>=this.x+radius&&x<=this.x+this.width-radius)return!0;let dx=x-(this.x+radius),dy=y-(this.y+radius);const radius2=radius*radius;if(dx*dx+dy*dy<=radius2||(dx=x-(this.x+this.width-radius),dx*dx+dy*dy<=radius2)||(dy=y-(this.y+this.height-radius),dx*dx+dy*dy<=radius2)||(dx=x-(this.x+radius),dx*dx+dy*dy<=radius2))return!0}return!1}}RoundedRectangle.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class Matrix{constructor(a=1,b=0,c=0,d=1,tx=0,ty=0){this.array=null,this.a=a,this.b=b,this.c=c,this.d=d,this.tx=tx,this.ty=ty}fromArray(array){this.a=array[0],this.b=array[1],this.c=array[3],this.d=array[4],this.tx=array[2],this.ty=array[5]}set(a,b,c,d,tx,ty){return this.a=a,this.b=b,this.c=c,this.d=d,this.tx=tx,this.ty=ty,this}toArray(transpose,out){this.array||(this.array=new Float32Array(9));const array=out||this.array;return transpose?(array[0]=this.a,array[1]=this.b,array[2]=0,array[3]=this.c,array[4]=this.d,array[5]=0,array[6]=this.tx,array[7]=this.ty,array[8]=1):(array[0]=this.a,array[1]=this.c,array[2]=this.tx,array[3]=this.b,array[4]=this.d,array[5]=this.ty,array[6]=0,array[7]=0,array[8]=1),array}apply(pos,newPos){newPos=newPos||new Point;const x=pos.x,y=pos.y;return newPos.x=this.a*x+this.c*y+this.tx,newPos.y=this.b*x+this.d*y+this.ty,newPos}applyInverse(pos,newPos){newPos=newPos||new Point;const id=1/(this.a*this.d+this.c*-this.b),x=pos.x,y=pos.y;return newPos.x=this.d*id*x+-this.c*id*y+(this.ty*this.c-this.tx*this.d)*id,newPos.y=this.a*id*y+-this.b*id*x+(-this.ty*this.a+this.tx*this.b)*id,newPos}translate(x,y){return this.tx+=x,this.ty+=y,this}scale(x,y){return this.a*=x,this.d*=y,this.c*=x,this.b*=y,this.tx*=x,this.ty*=y,this}rotate(angle){const cos=Math.cos(angle),sin=Math.sin(angle),a1=this.a,c1=this.c,tx1=this.tx;return this.a=a1*cos-this.b*sin,this.b=a1*sin+this.b*cos,this.c=c1*cos-this.d*sin,this.d=c1*sin+this.d*cos,this.tx=tx1*cos-this.ty*sin,this.ty=tx1*sin+this.ty*cos,this}append(matrix){const a1=this.a,b1=this.b,c1=this.c,d1=this.d;return this.a=matrix.a*a1+matrix.b*c1,this.b=matrix.a*b1+matrix.b*d1,this.c=matrix.c*a1+matrix.d*c1,this.d=matrix.c*b1+matrix.d*d1,this.tx=matrix.tx*a1+matrix.ty*c1+this.tx,this.ty=matrix.tx*b1+matrix.ty*d1+this.ty,this}setTransform(x,y,pivotX,pivotY,scaleX,scaleY,rotation,skewX,skewY){return this.a=Math.cos(rotation+skewY)*scaleX,this.b=Math.sin(rotation+skewY)*scaleX,this.c=-Math.sin(rotation-skewX)*scaleY,this.d=Math.cos(rotation-skewX)*scaleY,this.tx=x-(pivotX*this.a+pivotY*this.c),this.ty=y-(pivotX*this.b+pivotY*this.d),this}prepend(matrix){const tx1=this.tx;if(1!==matrix.a||0!==matrix.b||0!==matrix.c||1!==matrix.d){const a1=this.a,c1=this.c;this.a=a1*matrix.a+this.b*matrix.c,this.b=a1*matrix.b+this.b*matrix.d,this.c=c1*matrix.a+this.d*matrix.c,this.d=c1*matrix.b+this.d*matrix.d}return this.tx=tx1*matrix.a+this.ty*matrix.c+matrix.tx,this.ty=tx1*matrix.b+this.ty*matrix.d+matrix.ty,this}decompose(transform){const a=this.a,b=this.b,c=this.c,d=this.d,pivot=transform.pivot,skewX=-Math.atan2(-c,d),skewY=Math.atan2(b,a),delta=Math.abs(skewX+skewY);return delta<1e-5||Math.abs(PI_2-delta)<1e-5?(transform.rotation=skewY,transform.skew.x=transform.skew.y=0):(transform.rotation=0,transform.skew.x=skewX,transform.skew.y=skewY),transform.scale.x=Math.sqrt(a*a+b*b),transform.scale.y=Math.sqrt(c*c+d*d),transform.position.x=this.tx+(pivot.x*a+pivot.y*c),transform.position.y=this.ty+(pivot.x*b+pivot.y*d),transform}invert(){const a1=this.a,b1=this.b,c1=this.c,d1=this.d,tx1=this.tx,n=a1*d1-b1*c1;return this.a=d1/n,this.b=-b1/n,this.c=-c1/n,this.d=a1/n,this.tx=(c1*this.ty-d1*tx1)/n,this.ty=-(a1*this.ty-b1*tx1)/n,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const matrix=new Matrix;return matrix.a=this.a,matrix.b=this.b,matrix.c=this.c,matrix.d=this.d,matrix.tx=this.tx,matrix.ty=this.ty,matrix}copyTo(matrix){return matrix.a=this.a,matrix.b=this.b,matrix.c=this.c,matrix.d=this.d,matrix.tx=this.tx,matrix.ty=this.ty,matrix}copyFrom(matrix){return this.a=matrix.a,this.b=matrix.b,this.c=matrix.c,this.d=matrix.d,this.tx=matrix.tx,this.ty=matrix.ty,this}static get IDENTITY(){return new Matrix}static get TEMP_MATRIX(){return new Matrix}}Matrix.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;!function init(){for(let i=0;i<16;i++){const row=[];rotationCayley.push(row);for(let j=0;j<16;j++){const _ux=signum(ux[i]*ux[j]+vx[i]*uy[j]),_uy=signum(uy[i]*ux[j]+vy[i]*uy[j]),_vx=signum(ux[i]*vx[j]+vx[i]*vy[j]),_vy=signum(uy[i]*vx[j]+vy[i]*vy[j]);for(let k=0;k<16;k++)if(ux[k]===_ux&&uy[k]===_uy&&vx[k]===_vx&&vy[k]===_vy){row.push(k);break}}}for(let i=0;i<16;i++){const mat=new Matrix;mat.set(ux[i],uy[i],vx[i],vy[i],0,0),rotationMatrices.push(mat)}}();const groupD8={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:ind=>ux[ind],uY:ind=>uy[ind],vX:ind=>vx[ind],vY:ind=>vy[ind],inv:rotation=>8&rotation?15&rotation:7&-rotation,add:(rotationSecond,rotationFirst)=>rotationCayley[rotationSecond][rotationFirst],sub:(rotationSecond,rotationFirst)=>rotationCayley[rotationSecond][groupD8.inv(rotationFirst)],rotate180:rotation=>4^rotation,isVertical:rotation=>2==(3&rotation),byDirection:(dx,dy)=>2*Math.abs(dx)<=Math.abs(dy)?dy>=0?groupD8.S:groupD8.N:2*Math.abs(dy)<=Math.abs(dx)?dx>0?groupD8.E:groupD8.W:dy>0?dx>0?groupD8.SE:groupD8.SW:dx>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(matrix,rotation,tx=0,ty=0)=>{const mat=rotationMatrices[groupD8.inv(rotation)];mat.tx=tx,mat.ty=ty,matrix.append(mat)}};class ObservablePoint{constructor(cb,scope,x=0,y=0){this._x=x,this._y=y,this.cb=cb,this.scope=scope}clone(cb=this.cb,scope=this.scope){return new ObservablePoint(cb,scope,this._x,this._y)}set(x=0,y=x){return(this._x!==x||this._y!==y)&&(this._x=x,this._y=y,this.cb.call(this.scope)),this}copyFrom(p){return(this._x!==p.x||this._y!==p.y)&&(this._x=p.x,this._y=p.y,this.cb.call(this.scope)),this}copyTo(p){return p.set(this._x,this._y),p}equals(p){return p.x===this._x&&p.y===this._y}get x(){return this._x}set x(value){this._x!==value&&(this._x=value,this.cb.call(this.scope))}get y(){return this._y}set y(value){this._y!==value&&(this._y=value,this.cb.call(this.scope))}}ObservablePoint.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const _Transform=class{constructor(){this.worldTransform=new Matrix,this.localTransform=new Matrix,this.position=new ObservablePoint(this.onChange,this,0,0),this.scale=new ObservablePoint(this.onChange,this,1,1),this.pivot=new ObservablePoint(this.onChange,this,0,0),this.skew=new ObservablePoint(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const lt=this.localTransform;this._localID!==this._currentLocalID&&(lt.a=this._cx*this.scale.x,lt.b=this._sx*this.scale.x,lt.c=this._cy*this.scale.y,lt.d=this._sy*this.scale.y,lt.tx=this.position.x-(this.pivot.x*lt.a+this.pivot.y*lt.c),lt.ty=this.position.y-(this.pivot.x*lt.b+this.pivot.y*lt.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(parentTransform){const lt=this.localTransform;if(this._localID!==this._currentLocalID&&(lt.a=this._cx*this.scale.x,lt.b=this._sx*this.scale.x,lt.c=this._cy*this.scale.y,lt.d=this._sy*this.scale.y,lt.tx=this.position.x-(this.pivot.x*lt.a+this.pivot.y*lt.c),lt.ty=this.position.y-(this.pivot.x*lt.b+this.pivot.y*lt.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==parentTransform._worldID){const pt=parentTransform.worldTransform,wt=this.worldTransform;wt.a=lt.a*pt.a+lt.b*pt.c,wt.b=lt.a*pt.b+lt.b*pt.d,wt.c=lt.c*pt.a+lt.d*pt.c,wt.d=lt.c*pt.b+lt.d*pt.d,wt.tx=lt.tx*pt.a+lt.ty*pt.c+pt.tx,wt.ty=lt.tx*pt.b+lt.ty*pt.d+pt.ty,this._parentID=parentTransform._worldID,this._worldID++}}setFromMatrix(matrix){matrix.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(value){this._rotation!==value&&(this._rotation=value,this.updateSkew())}};_Transform.IDENTITY=new _Transform;let Transform=_Transform;Transform.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};const uniformParsers=[{test:data=>"float"===data.type&&1===data.size&&!data.isArray,code:name=>`\n if(uv["${name}"] !== ud["${name}"].value)\n {\n ud["${name}"].value = uv["${name}"]\n gl.uniform1f(ud["${name}"].location, uv["${name}"])\n }\n `},{test:(data,uniform)=>!("sampler2D"!==data.type&&"samplerCube"!==data.type&&"sampler2DArray"!==data.type||1!==data.size||data.isArray||null!=uniform&&void 0===uniform.castToBaseTexture),code:name=>`t = syncData.textureCount++;\n\n renderer.texture.bind(uv["${name}"], t);\n\n if(ud["${name}"].value !== t)\n {\n ud["${name}"].value = t;\n gl.uniform1i(ud["${name}"].location, t);\n; // eslint-disable-line max-len\n }`},{test:(data,uniform)=>"mat3"===data.type&&1===data.size&&!data.isArray&&void 0!==uniform.a,code:name=>`\n gl.uniformMatrix3fv(ud["${name}"].location, false, uv["${name}"].toArray(true));\n `,codeUbo:name=>`\n var ${name}_matrix = uv.${name}.toArray(true);\n\n data[offset] = ${name}_matrix[0];\n data[offset+1] = ${name}_matrix[1];\n data[offset+2] = ${name}_matrix[2];\n \n data[offset + 4] = ${name}_matrix[3];\n data[offset + 5] = ${name}_matrix[4];\n data[offset + 6] = ${name}_matrix[5];\n \n data[offset + 8] = ${name}_matrix[6];\n data[offset + 9] = ${name}_matrix[7];\n data[offset + 10] = ${name}_matrix[8];\n `},{test:(data,uniform)=>"vec2"===data.type&&1===data.size&&!data.isArray&&void 0!==uniform.x,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["${name}"].location, v.x, v.y);\n }`,codeUbo:name=>`\n v = uv.${name};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n `},{test:data=>"vec2"===data.type&&1===data.size&&!data.isArray,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["${name}"].location, v[0], v[1]);\n }\n `},{test:(data,uniform)=>"vec4"===data.type&&1===data.size&&!data.isArray&&void 0!==uniform.width,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["${name}"].location, v.x, v.y, v.width, v.height)\n }`,codeUbo:name=>`\n v = uv.${name};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n `},{test:(data,uniform)=>"vec4"===data.type&&1===data.size&&!data.isArray&&void 0!==uniform.red,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud["${name}"].location, v.red, v.green, v.blue, v.alpha)\n }`,codeUbo:name=>`\n v = uv.${name};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n data[offset+3] = v.alpha;\n `},{test:(data,uniform)=>"vec3"===data.type&&1===data.size&&!data.isArray&&void 0!==uniform.red,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n \n gl.uniform3f(ud["${name}"].location, v.red, v.green, v.blue)\n }`,codeUbo:name=>`\n v = uv.${name};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n `},{test:data=>"vec4"===data.type&&1===data.size&&!data.isArray,code:name=>`\n cv = ud["${name}"].value;\n v = uv["${name}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["${name}"].location, v[0], v[1], v[2], v[3])\n }`}],GLSL_TO_SINGLE_SETTERS_CACHED={float:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }",vec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }",vec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }",vec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",samplerCube:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",sampler2DArray:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }"},GLSL_TO_ARRAY_SETTERS={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};const unknownContext={};let maxFragmentPrecision,context=unknownContext;function getMaxFragmentPrecision(){if(!maxFragmentPrecision){maxFragmentPrecision=PRECISION.MEDIUM;const gl=function getTestContext(){if(context===unknownContext||context?.isContextLost()){const canvas=settings.ADAPTER.createCanvas();let gl;settings.PREFER_ENV>=ENV.WEBGL2&&(gl=canvas.getContext("webgl2",{})),gl||(gl=canvas.getContext("webgl",{})||canvas.getContext("experimental-webgl",{}),gl?gl.getExtension("WEBGL_draw_buffers"):gl=null),context=gl}return context}();if(gl&&gl.getShaderPrecisionFormat){const shaderFragment=gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT);shaderFragment&&(maxFragmentPrecision=shaderFragment.precision?PRECISION.HIGH:PRECISION.MEDIUM)}}return maxFragmentPrecision}const GLSL_TO_SIZE={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function mapSize(type){return GLSL_TO_SIZE[type]}let GL_TABLE=null;const GL_TO_GLSL_TYPES={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function mapType(gl,type){if(!GL_TABLE){const typeNames=Object.keys(GL_TO_GLSL_TYPES);GL_TABLE={};for(let i=0;i0&&(src+="\nelse "),ithis.size&&this.flush(),this._vertexCount+=element.vertexData.length/2,this._indexCount+=element.indices.length,this._bufferedTextures[this._bufferSize]=element._texture.baseTexture,this._bufferedElements[this._bufferSize++]=element)}buildTexturesAndDrawCalls(){const{_bufferedTextures:textures,maxTextures}=this,textureArrays=_BatchRenderer2._textureArrayPool,batch=this.renderer.batch,boundTextures=this._tempBoundTextures,touch=this.renderer.textureGC.count;let TICK=++BaseTexture._globalBatch,countTexArrays=0,texArray=textureArrays[0],start=0;batch.copyBoundTextures(boundTextures,maxTextures);for(let i=0;i=maxTextures&&(batch.boundArray(texArray,boundTextures,TICK,maxTextures),this.buildDrawCalls(texArray,start,i),start=i,texArray=textureArrays[++countTexArrays],++TICK),tex._batchEnabled=TICK,tex.touched=touch,texArray.elements[texArray.count++]=tex)}texArray.count>0&&(batch.boundArray(texArray,boundTextures,TICK,maxTextures),this.buildDrawCalls(texArray,start,this._bufferSize),++countTexArrays,++TICK);for(let i=0;i0);for(let i=0;i=0;--i)arr[i]=boundTextures[i]||null,arr[i]&&(arr[i]._batchLocation=i)}boundArray(texArray,boundTextures,batchId,maxTextures){const{elements,ids,count}=texArray;let j=0;for(let i=0;i=0&&loc=ENV.WEBGL2&&(gl=canvas.getContext("webgl2",options)),gl)this.webGLVersion=2;else if(this.webGLVersion=1,gl=canvas.getContext("webgl",options)||canvas.getContext("experimental-webgl",options),!gl)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=gl,this.getExtensions(),this.gl}getExtensions(){const{gl}=this,common={loseContext:gl.getExtension("WEBGL_lose_context"),anisotropicFiltering:gl.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:gl.getExtension("OES_texture_float_linear"),s3tc:gl.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:gl.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:gl.getExtension("WEBGL_compressed_texture_etc"),etc1:gl.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:gl.getExtension("WEBGL_compressed_texture_pvrtc")||gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:gl.getExtension("WEBGL_compressed_texture_atc"),astc:gl.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,common,{drawBuffers:gl.getExtension("WEBGL_draw_buffers"),depthTexture:gl.getExtension("WEBGL_depth_texture"),vertexArrayObject:gl.getExtension("OES_vertex_array_object")||gl.getExtension("MOZ_OES_vertex_array_object")||gl.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:gl.getExtension("OES_element_index_uint"),floatTexture:gl.getExtension("OES_texture_float"),floatTextureLinear:gl.getExtension("OES_texture_float_linear"),textureHalfFloat:gl.getExtension("OES_texture_half_float"),textureHalfFloatLinear:gl.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,common,{colorBufferFloat:gl.getExtension("EXT_color_buffer_float")})}handleContextLost(event){event.preventDefault(),setTimeout((()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()}),0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const view=this.renderer.view;this.renderer=null,void 0!==view.removeEventListener&&(view.removeEventListener("webglcontextlost",this.handleContextLost),view.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(gl){const attributes=gl.getContextAttributes(),isWebGl2="WebGL2RenderingContext"in globalThis&&gl instanceof globalThis.WebGL2RenderingContext;isWebGl2&&(this.webGLVersion=2),attributes&&!attributes.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const hasuint32=isWebGl2||!!gl.getExtension("OES_element_index_uint");this.supports.uint32Indices=hasuint32,hasuint32||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ContextSystem.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ContextSystem.extension={type:ExtensionType.RendererSystem,name:"context"},extensions.add(ContextSystem);class Framebuffer{constructor(width,height){if(this.width=Math.round(width),this.height=Math.round(height),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Runner_Runner("disposeFramebuffer"),this.multisample=MSAA_QUALITY.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(index=0,texture){return this.colorTextures[index]=texture||new BaseTexture(null,{scaleMode:SCALE_MODES.NEAREST,resolution:1,mipmap:MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(texture){return this.depthTexture=texture||new BaseTexture(null,{scaleMode:SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:MIPMAP_MODES.OFF,format:FORMATS.DEPTH_COMPONENT,type:TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(width,height){if(width=Math.round(width),height=Math.round(height),!width||!height)throw new Error("Framebuffer width and height must not be zero");if(width!==this.width||height!==this.height){this.width=width,this.height=height,this.dirtyId++,this.dirtySize++;for(let i=0;i{const source=this.source;this.url=source.src;const completed=()=>{this.destroyed||(source.onload=null,source.onerror=null,this.update(),this._load=null,this.createBitmap?resolve(this.process()):resolve(this))};source.complete&&source.src?completed():(source.onload=completed,source.onerror=event=>{reject(event),this.onError.emit(event)})}))),this._load}process(){const source=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!globalThis.createImageBitmap)return Promise.resolve(this);const createImageBitmap=globalThis.createImageBitmap,cors=!source.crossOrigin||"anonymous"===source.crossOrigin;return this._process=fetch(source.src,{mode:cors?"cors":"no-cors"}).then((r=>r.blob())).then((blob=>createImageBitmap(blob,0,0,source.width,source.height,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"}))).then((bitmap=>this.destroyed?Promise.reject():(this.bitmap=bitmap,this.update(),this._process=null,Promise.resolve(this)))),this._process}upload(renderer,baseTexture,glTexture){if("number"==typeof this.alphaMode&&(baseTexture.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(renderer,baseTexture,glTexture);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(renderer,baseTexture,glTexture,this.bitmap),!this.preserveBitmap){let flag=!0;const glTextures=baseTexture._glTextures;for(const key in glTextures){const otherTex=glTextures[key];if(otherTex!==glTexture&&otherTex.dirtyId!==baseTexture.dirtyId){flag=!1;break}}flag&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(source){return typeof HTMLImageElement<"u"&&("string"==typeof source||source instanceof HTMLImageElement)}}class TextureUvs{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(frame,baseFrame,rotate){const tw=baseFrame.width,th=baseFrame.height;if(rotate){const w2=frame.width/2/tw,h2=frame.height/2/th,cX=frame.x/tw+w2,cY=frame.y/th+h2;rotate=groupD8.add(rotate,groupD8.NW),this.x0=cX+w2*groupD8.uX(rotate),this.y0=cY+h2*groupD8.uY(rotate),rotate=groupD8.add(rotate,2),this.x1=cX+w2*groupD8.uX(rotate),this.y1=cY+h2*groupD8.uY(rotate),rotate=groupD8.add(rotate,2),this.x2=cX+w2*groupD8.uX(rotate),this.y2=cY+h2*groupD8.uY(rotate),rotate=groupD8.add(rotate,2),this.x3=cX+w2*groupD8.uX(rotate),this.y3=cY+h2*groupD8.uY(rotate)}else this.x0=frame.x/tw,this.y0=frame.y/th,this.x1=(frame.x+frame.width)/tw,this.y1=frame.y/th,this.x2=(frame.x+frame.width)/tw,this.y2=(frame.y+frame.height)/th,this.x3=frame.x/tw,this.y3=(frame.y+frame.height)/th;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}TextureUvs.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const DEFAULT_UVS=new TextureUvs;function removeAllHandlers(tex){tex.destroy=function(){},tex.on=function(){},tex.once=function(){},tex.emit=function(){}}class Texture extends(eventemitter3_default()){constructor(baseTexture,frame,orig,trim,rotate,anchor,borders){if(super(),this.noFrame=!1,frame||(this.noFrame=!0,frame=new Rectangle(0,0,1,1)),baseTexture instanceof Texture&&(baseTexture=baseTexture.baseTexture),this.baseTexture=baseTexture,this._frame=frame,this.trim=trim,this.valid=!1,this.destroyed=!1,this._uvs=DEFAULT_UVS,this.uvMatrix=null,this.orig=orig||frame,this._rotate=Number(rotate||0),!0===rotate)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=anchor?new Point(anchor.x,anchor.y):new Point(0,0),this.defaultBorders=borders,this._updateID=0,this.textureCacheIds=[],baseTexture.valid?this.noFrame?baseTexture.valid&&this.onBaseTextureUpdated(baseTexture):this.frame=frame:baseTexture.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&baseTexture.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(baseTexture){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=baseTexture.width,this._frame.height=baseTexture.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(destroyBase){if(this.baseTexture){if(destroyBase){const{resource}=this.baseTexture;resource?.url&&TextureCache[resource.url]&&Texture.removeFromCache(resource.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Texture.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const clonedFrame=this._frame.clone(),clonedOrig=this._frame===this.orig?clonedFrame:this.orig.clone(),clonedTexture=new Texture(this.baseTexture,!this.noFrame&&clonedFrame,clonedOrig,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(clonedTexture._frame=clonedFrame),clonedTexture}updateUvs(){this._uvs===DEFAULT_UVS&&(this._uvs=new TextureUvs),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(source,options={},strict=settings.STRICT_TEXTURE_CACHE){const isFrame="string"==typeof source;let cacheId=null;if(isFrame)cacheId=source;else if(source instanceof BaseTexture){if(!source.cacheId){const prefix=options?.pixiIdPrefix||"pixiid";source.cacheId=`${prefix}-${uid()}`,BaseTexture.addToCache(source,source.cacheId)}cacheId=source.cacheId}else{if(!source._pixiId){const prefix=options?.pixiIdPrefix||"pixiid";source._pixiId=`${prefix}_${uid()}`}cacheId=source._pixiId}let texture=TextureCache[cacheId];if(isFrame&&strict&&!texture)throw new Error(`The cacheId "${cacheId}" does not exist in TextureCache.`);return texture||source instanceof BaseTexture?!texture&&source instanceof BaseTexture&&(texture=new Texture(source),Texture.addToCache(texture,cacheId)):(options.resolution||(options.resolution=getResolutionOfUrl(source)),texture=new Texture(new BaseTexture(source,options)),texture.baseTexture.cacheId=cacheId,BaseTexture.addToCache(texture.baseTexture,cacheId),Texture.addToCache(texture,cacheId)),texture}static fromURL(url,options){const resourceOptions=Object.assign({autoLoad:!1},options?.resourceOptions),texture=Texture.from(url,Object.assign({resourceOptions},options),!1),resource=texture.baseTexture.resource;return texture.baseTexture.valid?Promise.resolve(texture):resource.load().then((()=>Promise.resolve(texture)))}static fromBuffer(buffer,width,height,options){return new Texture(BaseTexture.fromBuffer(buffer,width,height,options))}static fromLoader(source,imageUrl,name,options){const baseTexture=new BaseTexture(source,Object.assign({scaleMode:BaseTexture.defaultOptions.scaleMode,resolution:getResolutionOfUrl(imageUrl)},options)),{resource}=baseTexture;resource instanceof ImageResource&&(resource.url=imageUrl);const texture=new Texture(baseTexture);return name||(name=imageUrl),BaseTexture.addToCache(texture.baseTexture,name),Texture.addToCache(texture,name),name!==imageUrl&&(BaseTexture.addToCache(texture.baseTexture,imageUrl),Texture.addToCache(texture,imageUrl)),texture.baseTexture.valid?Promise.resolve(texture):new Promise((resolve=>{texture.baseTexture.once("loaded",(()=>resolve(texture)))}))}static addToCache(texture,id){id&&(texture.textureCacheIds.includes(id)||texture.textureCacheIds.push(id),TextureCache[id]&&TextureCache[id]!==texture&&console.warn(`Texture added to the cache with an id [${id}] that already had an entry`),TextureCache[id]=texture)}static removeFromCache(texture){if("string"==typeof texture){const textureFromCache=TextureCache[texture];if(textureFromCache){const index=textureFromCache.textureCacheIds.indexOf(texture);return index>-1&&textureFromCache.textureCacheIds.splice(index,1),delete TextureCache[texture],textureFromCache}}else if(texture?.textureCacheIds){for(let i=0;ithis.baseTexture.width,yNotFit=y+height>this.baseTexture.height;if(xNotFit||yNotFit){const relationship=xNotFit&&yNotFit?"and":"or",errorX=`X: ${x} + ${width} = ${x+width} > ${this.baseTexture.width}`,errorY=`Y: ${y} + ${height} = ${y+height} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${errorX} ${relationship} ${errorY}`)}this.valid=width&&height&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=frame),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(rotate){this._rotate=rotate,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Texture._EMPTY||(Texture._EMPTY=new Texture(new BaseTexture),removeAllHandlers(Texture._EMPTY),removeAllHandlers(Texture._EMPTY.baseTexture)),Texture._EMPTY}static get WHITE(){if(!Texture._WHITE){const canvas=settings.ADAPTER.createCanvas(16,16),context=canvas.getContext("2d");canvas.width=16,canvas.height=16,context.fillStyle="white",context.fillRect(0,0,16,16),Texture._WHITE=new Texture(BaseTexture.from(canvas)),removeAllHandlers(Texture._WHITE),removeAllHandlers(Texture._WHITE.baseTexture)}return Texture._WHITE}}class RenderTexture extends Texture{constructor(baseRenderTexture,frame){super(baseRenderTexture,frame),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(value){this.framebuffer.multisample=value}resize(desiredWidth,desiredHeight,resizeBaseTexture=!0){const resolution=this.baseTexture.resolution,width=Math.round(desiredWidth*resolution)/resolution,height=Math.round(desiredHeight*resolution)/resolution;this.valid=width>0&&height>0,this._frame.width=this.orig.width=width,this._frame.height=this.orig.height=height,resizeBaseTexture&&this.baseTexture.resize(width,height),this.updateUvs()}setResolution(resolution){const{baseTexture}=this;baseTexture.resolution!==resolution&&(baseTexture.setResolution(resolution),this.resize(baseTexture.width,baseTexture.height,!1))}static create(options){return new RenderTexture(new BaseRenderTexture(options))}}class RenderTexturePool{constructor(textureOptions){this.texturePool={},this.textureOptions=textureOptions||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(realWidth,realHeight,multisample=MSAA_QUALITY.NONE){const baseRenderTexture=new BaseRenderTexture(Object.assign({width:realWidth,height:realHeight,resolution:1,multisample},this.textureOptions));return new RenderTexture(baseRenderTexture)}getOptimalTexture(minWidth,minHeight,resolution=1,multisample=MSAA_QUALITY.NONE){let key;minWidth=Math.max(Math.ceil(minWidth*resolution-1e-6),1),minHeight=Math.max(Math.ceil(minHeight*resolution-1e-6),1),this.enableFullScreen&&minWidth===this._pixelsWidth&&minHeight===this._pixelsHeight?key=multisample>1?-multisample:-1:(key=((65535&(minWidth=nextPow2(minWidth)))<<16|65535&(minHeight=nextPow2(minHeight)))>>>0,multisample>1&&(key+=4294967296*multisample)),this.texturePool[key]||(this.texturePool[key]=[]);let renderTexture=this.texturePool[key].pop();return renderTexture||(renderTexture=this.createTexture(minWidth,minHeight,multisample)),renderTexture.filterPoolKey=key,renderTexture.setResolution(resolution),renderTexture}getFilterTexture(input,resolution,multisample){const filterTexture=this.getOptimalTexture(input.width,input.height,resolution||input.resolution,multisample||MSAA_QUALITY.NONE);return filterTexture.filterFrame=input.filterFrame,filterTexture}returnTexture(renderTexture){const key=renderTexture.filterPoolKey;renderTexture.filterFrame=null,this.texturePool[key].push(renderTexture)}returnFilterTexture(renderTexture){this.returnTexture(renderTexture)}clear(destroyTextures){if(destroyTextures=!1!==destroyTextures)for(const i in this.texturePool){const textures=this.texturePool[i];if(textures)for(let j=0;j0&&size.height>0;for(const i in this.texturePool){if(!(Number(i)<0))continue;const textures=this.texturePool[i];if(textures)for(let j=0;j1&&(flop=this.getOptimalFilterTexture(flip.width,flip.height,state.resolution),flop.filterFrame=flip.filterFrame),filters[i].apply(this,flip,flop,CLEAR_MODES.CLEAR,state);const t=flip;flip=flop,flop=t}filters[i].apply(this,flip,lastState.renderTexture,CLEAR_MODES.BLEND,state),i>1&&state.multisample>1&&this.returnFilterTexture(state.renderTexture),this.returnFilterTexture(flip),this.returnFilterTexture(flop)}state.clear(),this.statePool.push(state)}bindAndClear(filterTexture,clearMode=CLEAR_MODES.CLEAR){const{renderTexture:renderTextureSystem,state:stateSystem}=this.renderer;if(filterTexture===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,filterTexture?.filterFrame){const destinationFrame=this.tempRect;destinationFrame.x=0,destinationFrame.y=0,destinationFrame.width=filterTexture.filterFrame.width,destinationFrame.height=filterTexture.filterFrame.height,renderTextureSystem.bind(filterTexture,filterTexture.filterFrame,destinationFrame)}else filterTexture!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?renderTextureSystem.bind(filterTexture):this.renderer.renderTexture.bind(filterTexture,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const autoClear=1&stateSystem.stateId||this.forceClear;(clearMode===CLEAR_MODES.CLEAR||clearMode===CLEAR_MODES.BLIT&&autoClear)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(filter,input,output,clearMode){const renderer=this.renderer;renderer.state.set(filter.state),this.bindAndClear(output,clearMode),filter.uniforms.uSampler=input,filter.uniforms.filterGlobals=this.globalUniforms,renderer.shader.bind(filter),filter.legacy=!!filter.program.attributeData.aTextureCoord,filter.legacy?(this.quadUv.map(input._frame,input.filterFrame),renderer.geometry.bind(this.quadUv),renderer.geometry.draw(DRAW_MODES.TRIANGLES)):(renderer.geometry.bind(this.quad),renderer.geometry.draw(DRAW_MODES.TRIANGLE_STRIP))}calculateSpriteMatrix(outputMatrix,sprite){const{sourceFrame,destinationFrame}=this.activeState,{orig}=sprite._texture,mappedMatrix=outputMatrix.set(destinationFrame.width,0,0,destinationFrame.height,sourceFrame.x,sourceFrame.y),worldTransform=sprite.worldTransform.copyTo(Matrix.TEMP_MATRIX);return worldTransform.invert(),mappedMatrix.prepend(worldTransform),mappedMatrix.scale(1/orig.width,1/orig.height),mappedMatrix.translate(sprite.anchor.x,sprite.anchor.y),mappedMatrix}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(minWidth,minHeight,resolution=1,multisample=MSAA_QUALITY.NONE){return this.texturePool.getOptimalTexture(minWidth,minHeight,resolution,multisample)}getFilterTexture(input,resolution,multisample){if("number"==typeof input){const swap=input;input=resolution,resolution=swap}input=input||this.activeState.renderTexture;const filterTexture=this.texturePool.getOptimalTexture(input.width,input.height,resolution||input.resolution,multisample||MSAA_QUALITY.NONE);return filterTexture.filterFrame=input.filterFrame,filterTexture}returnFilterTexture(renderTexture){this.texturePool.returnTexture(renderTexture)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(matrix,rect){const lt=FilterSystem_tempPoints[0],lb=FilterSystem_tempPoints[1],rt=FilterSystem_tempPoints[2],rb=FilterSystem_tempPoints[3];lt.set(rect.left,rect.top),lb.set(rect.left,rect.bottom),rt.set(rect.right,rect.top),rb.set(rect.right,rect.bottom),matrix.apply(lt,lt),matrix.apply(lb,lb),matrix.apply(rt,rt),matrix.apply(rb,rb);const x0=Math.min(lt.x,lb.x,rt.x,rb.x),y0=Math.min(lt.y,lb.y,rt.y,rb.y),x1=Math.max(lt.x,lb.x,rt.x,rb.x),y1=Math.max(lt.y,lb.y,rt.y,rb.y);rect.x=x0,rect.y=y0,rect.width=x1-x0,rect.height=y1-y0}roundFrame(frame,resolution,bindingSourceFrame,bindingDestinationFrame,transform){if(!(frame.width<=0||frame.height<=0||bindingSourceFrame.width<=0||bindingSourceFrame.height<=0)){if(transform){const{a,b,c,d}=transform;if((Math.abs(b)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(d)>1e-4))return}(transform=transform?tempMatrix.copyFrom(transform):tempMatrix.identity()).translate(-bindingSourceFrame.x,-bindingSourceFrame.y).scale(bindingDestinationFrame.width/bindingSourceFrame.width,bindingDestinationFrame.height/bindingSourceFrame.height).translate(bindingDestinationFrame.x,bindingDestinationFrame.y),this.transformAABB(transform,frame),frame.ceil(resolution),this.transformAABB(transform.invert(),frame)}}}FilterSystem.extension={type:ExtensionType.RendererSystem,name:"filter"},extensions.add(FilterSystem);class GLFramebuffer{constructor(framebuffer){this.framebuffer=framebuffer,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const tempRectangle=new Rectangle;class FramebufferSystem{constructor(renderer){this.renderer=renderer,this.managedFramebuffers=[],this.unknownFramebuffer=new Framebuffer(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const gl=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,1===this.renderer.context.webGLVersion){let nativeDrawBuffersExtension=this.renderer.context.extensions.drawBuffers,nativeDepthTextureExtension=this.renderer.context.extensions.depthTexture;settings.PREFER_ENV===ENV.WEBGL_LEGACY&&(nativeDrawBuffersExtension=null,nativeDepthTextureExtension=null),nativeDrawBuffersExtension?gl.drawBuffers=activeTextures=>nativeDrawBuffersExtension.drawBuffersWEBGL(activeTextures):(this.hasMRT=!1,gl.drawBuffers=()=>{}),nativeDepthTextureExtension||(this.writeDepthTexture=!1)}else this.msaaSamples=gl.getInternalformatParameter(gl.RENDERBUFFER,gl.RGBA8,gl.SAMPLES)}bind(framebuffer,frame,mipLevel=0){const{gl}=this;if(framebuffer){const fbo=framebuffer.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(framebuffer);this.current!==framebuffer&&(this.current=framebuffer,gl.bindFramebuffer(gl.FRAMEBUFFER,fbo.framebuffer)),fbo.mipLevel!==mipLevel&&(framebuffer.dirtyId++,framebuffer.dirtyFormat++,fbo.mipLevel=mipLevel),fbo.dirtyId!==framebuffer.dirtyId&&(fbo.dirtyId=framebuffer.dirtyId,fbo.dirtyFormat!==framebuffer.dirtyFormat?(fbo.dirtyFormat=framebuffer.dirtyFormat,fbo.dirtySize=framebuffer.dirtySize,this.updateFramebuffer(framebuffer,mipLevel)):fbo.dirtySize!==framebuffer.dirtySize&&(fbo.dirtySize=framebuffer.dirtySize,this.resizeFramebuffer(framebuffer)));for(let i=0;i>mipLevel,mipHeight=frame.height>>mipLevel,scale=mipWidth/frame.width;this.setViewport(frame.x*scale,frame.y*scale,mipWidth,mipHeight)}else{const mipWidth=framebuffer.width>>mipLevel,mipHeight=framebuffer.height>>mipLevel;this.setViewport(0,0,mipWidth,mipHeight)}}else this.current&&(this.current=null,gl.bindFramebuffer(gl.FRAMEBUFFER,null)),frame?this.setViewport(frame.x,frame.y,frame.width,frame.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(x,y,width,height){const v=this.viewport;x=Math.round(x),y=Math.round(y),width=Math.round(width),height=Math.round(height),(v.width!==width||v.height!==height||v.x!==x||v.y!==y)&&(v.x=x,v.y=y,v.width=width,v.height=height,this.gl.viewport(x,y,width,height))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(r,g,b,a,mask=BUFFER_BITS.COLOR|BUFFER_BITS.DEPTH){const{gl}=this;gl.clearColor(r,g,b,a),gl.clear(mask)}initFramebuffer(framebuffer){const{gl}=this,fbo=new GLFramebuffer(gl.createFramebuffer());return fbo.multisample=this.detectSamples(framebuffer.multisample),framebuffer.glFramebuffers[this.CONTEXT_UID]=fbo,this.managedFramebuffers.push(framebuffer),framebuffer.disposeRunner.add(this),fbo}resizeFramebuffer(framebuffer){const{gl}=this,fbo=framebuffer.glFramebuffers[this.CONTEXT_UID];if(fbo.stencil){let stencilFormat;gl.bindRenderbuffer(gl.RENDERBUFFER,fbo.stencil),stencilFormat=1===this.renderer.context.webGLVersion?gl.DEPTH_STENCIL:framebuffer.depth&&framebuffer.stencil?gl.DEPTH24_STENCIL8:framebuffer.depth?gl.DEPTH_COMPONENT24:gl.STENCIL_INDEX8,fbo.msaaBuffer?gl.renderbufferStorageMultisample(gl.RENDERBUFFER,fbo.multisample,stencilFormat,framebuffer.width,framebuffer.height):gl.renderbufferStorage(gl.RENDERBUFFER,stencilFormat,framebuffer.width,framebuffer.height)}const colorTextures=framebuffer.colorTextures;let count=colorTextures.length;gl.drawBuffers||(count=Math.min(count,1));for(let i=0;i1&&this.canMultisampleFramebuffer(framebuffer)?fbo.msaaBuffer=fbo.msaaBuffer||gl.createRenderbuffer():fbo.msaaBuffer&&(gl.deleteRenderbuffer(fbo.msaaBuffer),fbo.msaaBuffer=null,fbo.blitFramebuffer&&(fbo.blitFramebuffer.dispose(),fbo.blitFramebuffer=null));const activeTextures=[];for(let i=0;i1&&gl.drawBuffers(activeTextures),framebuffer.depthTexture&&this.writeDepthTexture){const depthTexture=framebuffer.depthTexture;this.renderer.texture.bind(depthTexture,0),gl.framebufferTexture2D(gl.FRAMEBUFFER,gl.DEPTH_ATTACHMENT,gl.TEXTURE_2D,depthTexture._glTextures[this.CONTEXT_UID].texture,mipLevel)}if(!framebuffer.stencil&&!framebuffer.depth||framebuffer.depthTexture&&this.writeDepthTexture)fbo.stencil&&(gl.deleteRenderbuffer(fbo.stencil),fbo.stencil=null);else{let stencilAttachment,stencilFormat;fbo.stencil=fbo.stencil||gl.createRenderbuffer(),1===this.renderer.context.webGLVersion?(stencilAttachment=gl.DEPTH_STENCIL_ATTACHMENT,stencilFormat=gl.DEPTH_STENCIL):framebuffer.depth&&framebuffer.stencil?(stencilAttachment=gl.DEPTH_STENCIL_ATTACHMENT,stencilFormat=gl.DEPTH24_STENCIL8):framebuffer.depth?(stencilAttachment=gl.DEPTH_ATTACHMENT,stencilFormat=gl.DEPTH_COMPONENT24):(stencilAttachment=gl.STENCIL_ATTACHMENT,stencilFormat=gl.STENCIL_INDEX8),gl.bindRenderbuffer(gl.RENDERBUFFER,fbo.stencil),fbo.msaaBuffer?gl.renderbufferStorageMultisample(gl.RENDERBUFFER,fbo.multisample,stencilFormat,framebuffer.width,framebuffer.height):gl.renderbufferStorage(gl.RENDERBUFFER,stencilFormat,framebuffer.width,framebuffer.height),gl.framebufferRenderbuffer(gl.FRAMEBUFFER,stencilAttachment,gl.RENDERBUFFER,fbo.stencil)}}canMultisampleFramebuffer(framebuffer){return 1!==this.renderer.context.webGLVersion&&framebuffer.colorTextures.length<=1&&!framebuffer.depthTexture}detectSamples(samples){const{msaaSamples}=this;let res=MSAA_QUALITY.NONE;if(samples<=1||null===msaaSamples)return res;for(let i=0;i=0&&this.managedFramebuffers.splice(index,1),framebuffer.disposeRunner.remove(this),contextLost||(gl.deleteFramebuffer(fbo.framebuffer),fbo.msaaBuffer&&gl.deleteRenderbuffer(fbo.msaaBuffer),fbo.stencil&&gl.deleteRenderbuffer(fbo.stencil)),fbo.blitFramebuffer&&this.disposeFramebuffer(fbo.blitFramebuffer,contextLost)}disposeAll(contextLost){const list=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;inativeVaoExtension.createVertexArrayOES(),gl.bindVertexArray=vao=>nativeVaoExtension.bindVertexArrayOES(vao),gl.deleteVertexArray=vao=>nativeVaoExtension.deleteVertexArrayOES(vao)):(this.hasVao=!1,gl.createVertexArray=()=>null,gl.bindVertexArray=()=>null,gl.deleteVertexArray=()=>null)}if(2!==context.webGLVersion){const instanceExt=gl.getExtension("ANGLE_instanced_arrays");instanceExt?(gl.vertexAttribDivisor=(a,b)=>instanceExt.vertexAttribDivisorANGLE(a,b),gl.drawElementsInstanced=(a,b,c,d,e)=>instanceExt.drawElementsInstancedANGLE(a,b,c,d,e),gl.drawArraysInstanced=(a,b,c,d)=>instanceExt.drawArraysInstancedANGLE(a,b,c,d)):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===context.webGLVersion||!!context.extensions.uint32ElementIndex}bind(geometry,shader){shader=shader||this.renderer.shader.shader;const{gl}=this;let vaos=geometry.glVertexArrayObjects[this.CONTEXT_UID],incRefCount=!1;vaos||(this.managedGeometries[geometry.id]=geometry,geometry.disposeRunner.add(this),geometry.glVertexArrayObjects[this.CONTEXT_UID]=vaos={},incRefCount=!0);const vao=vaos[shader.program.id]||this.initGeometryVao(geometry,shader,incRefCount);this._activeGeometry=geometry,this._activeVao!==vao&&(this._activeVao=vao,this.hasVao?gl.bindVertexArray(vao):this.activateVao(geometry,shader.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const geometry=this._activeGeometry,bufferSystem=this.renderer.buffer;for(let i=0;i"u"?.5:clampMargin,this.isSimple=!1}get texture(){return this._texture}set texture(value){this._texture=value,this._textureID=-1}multiplyUvs(uvs,out){void 0===out&&(out=uvs);const mat=this.mapCoord;for(let i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;nextColorMask!==currColorMask&&this.renderer.gl.colorMask(0!=(1&nextColorMask),0!=(2&nextColorMask),0!=(4&nextColorMask),0!=(8&nextColorMask))}destroy(){this.renderer=null}}MaskSystem.extension={type:ExtensionType.RendererSystem,name:"mask"},extensions.add(MaskSystem);class AbstractMaskSystem{constructor(renderer){this.renderer=renderer,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(maskStack){const{gl}=this.renderer,curStackLen=this.getStackLength();this.maskStack=maskStack;const newStackLen=this.getStackLength();newStackLen!==curStackLen&&(0===newStackLen?gl.disable(this.glConst):(gl.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const ScissorSystem_tempMatrix=new Matrix,rectPool=[],_ScissorSystem=class _ScissorSystem2 extends AbstractMaskSystem{constructor(renderer){super(renderer),this.glConst=settings.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const maskData=this.maskStack[this.maskStack.length-1];return maskData?maskData._scissorCounter:0}calcScissorRect(maskData){if(maskData._scissorRectLocal)return;const prevData=maskData._scissorRect,{maskObject}=maskData,{renderer}=this,renderTextureSystem=renderer.renderTexture,rect=maskObject.getBounds(!0,rectPool.pop()??new Rectangle);this.roundFrameToPixels(rect,renderTextureSystem.current?renderTextureSystem.current.resolution:renderer.resolution,renderTextureSystem.sourceFrame,renderTextureSystem.destinationFrame,renderer.projection.transform),prevData&&rect.fit(prevData),maskData._scissorRectLocal=rect}static isMatrixRotated(matrix){if(!matrix)return!1;const{a,b,c,d}=matrix;return(Math.abs(b)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(d)>1e-4)}testScissor(maskData){const{maskObject}=maskData;if(!maskObject.isFastRect||!maskObject.isFastRect()||_ScissorSystem2.isMatrixRotated(maskObject.worldTransform)||_ScissorSystem2.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(maskData);const rect=maskData._scissorRectLocal;return rect.width>0&&rect.height>0}roundFrameToPixels(frame,resolution,bindingSourceFrame,bindingDestinationFrame,transform){_ScissorSystem2.isMatrixRotated(transform)||((transform=transform?ScissorSystem_tempMatrix.copyFrom(transform):ScissorSystem_tempMatrix.identity()).translate(-bindingSourceFrame.x,-bindingSourceFrame.y).scale(bindingDestinationFrame.width/bindingSourceFrame.width,bindingDestinationFrame.height/bindingSourceFrame.height).translate(bindingDestinationFrame.x,bindingDestinationFrame.y),this.renderer.filter.transformAABB(transform,frame),frame.fit(bindingDestinationFrame),frame.x=Math.round(frame.x*resolution),frame.y=Math.round(frame.y*resolution),frame.width=Math.round(frame.width*resolution),frame.height=Math.round(frame.height*resolution))}push(maskData){maskData._scissorRectLocal||this.calcScissorRect(maskData);const{gl}=this.renderer;maskData._scissorRect||gl.enable(gl.SCISSOR_TEST),maskData._scissorCounter++,maskData._scissorRect=maskData._scissorRectLocal,this._useCurrent()}pop(maskData){const{gl}=this.renderer;maskData&&rectPool.push(maskData._scissorRectLocal),this.getStackLength()>0?this._useCurrent():gl.disable(gl.SCISSOR_TEST)}_useCurrent(){const rect=this.maskStack[this.maskStack.length-1]._scissorRect;let y;y=this.renderer.renderTexture.current?rect.y:this.renderer.height-rect.height-rect.y,this.renderer.gl.scissor(rect.x,y,rect.width,rect.height)}};_ScissorSystem.extension={type:ExtensionType.RendererSystem,name:"scissor"};let ScissorSystem=_ScissorSystem;extensions.add(ScissorSystem);class StencilSystem extends AbstractMaskSystem{constructor(renderer){super(renderer),this.glConst=settings.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const maskData=this.maskStack[this.maskStack.length-1];return maskData?maskData._stencilCounter:0}push(maskData){const maskObject=maskData.maskObject,{gl}=this.renderer,prevMaskCount=maskData._stencilCounter;0===prevMaskCount&&(this.renderer.framebuffer.forceStencil(),gl.clearStencil(0),gl.clear(gl.STENCIL_BUFFER_BIT),gl.enable(gl.STENCIL_TEST)),maskData._stencilCounter++;const colorMask=maskData._colorMask;0!==colorMask&&(maskData._colorMask=0,gl.colorMask(!1,!1,!1,!1)),gl.stencilFunc(gl.EQUAL,prevMaskCount,4294967295),gl.stencilOp(gl.KEEP,gl.KEEP,gl.INCR),maskObject.renderable=!0,maskObject.render(this.renderer),this.renderer.batch.flush(),maskObject.renderable=!1,0!==colorMask&&(maskData._colorMask=colorMask,gl.colorMask(0!=(1&colorMask),0!=(2&colorMask),0!=(4&colorMask),0!=(8&colorMask))),this._useCurrent()}pop(maskObject){const gl=this.renderer.gl;if(0===this.getStackLength())gl.disable(gl.STENCIL_TEST);else{const maskData=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null,colorMask=maskData?maskData._colorMask:15;0!==colorMask&&(maskData._colorMask=0,gl.colorMask(!1,!1,!1,!1)),gl.stencilOp(gl.KEEP,gl.KEEP,gl.DECR),maskObject.renderable=!0,maskObject.render(this.renderer),this.renderer.batch.flush(),maskObject.renderable=!1,0!==colorMask&&(maskData._colorMask=colorMask,gl.colorMask(0!=(1&colorMask),0!=(2&colorMask),0!=(4&colorMask),0!=(8&colorMask))),this._useCurrent()}}_useCurrent(){const gl=this.renderer.gl;gl.stencilFunc(gl.EQUAL,this.getStackLength(),4294967295),gl.stencilOp(gl.KEEP,gl.KEEP,gl.KEEP)}}StencilSystem.extension={type:ExtensionType.RendererSystem,name:"stencil"},extensions.add(StencilSystem);class PluginSystem{constructor(renderer){this.renderer=renderer,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get:()=>(deprecation("7.0.0","renderer.plugins.extract has moved to renderer.extract"),renderer.extract)},prepare:{enumerable:!1,get:()=>(deprecation("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),renderer.prepare)},interaction:{enumerable:!1,get:()=>(deprecation("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),renderer.events)}})}init(){const staticMap=this.rendererPlugins;for(const o in staticMap)this.plugins[o]=new staticMap[o](this.renderer)}destroy(){for(const o in this.plugins)this.plugins[o].destroy(),this.plugins[o]=null}}PluginSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"_plugin"},extensions.add(PluginSystem);class ProjectionSystem{constructor(renderer){this.renderer=renderer,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Matrix,this.transform=null}update(destinationFrame,sourceFrame,resolution,root){this.destinationFrame=destinationFrame||this.destinationFrame||this.defaultFrame,this.sourceFrame=sourceFrame||this.sourceFrame||destinationFrame,this.calculateProjection(this.destinationFrame,this.sourceFrame,resolution,root),this.transform&&this.projectionMatrix.append(this.transform);const renderer=this.renderer;renderer.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,renderer.globalUniforms.update(),renderer.shader.shader&&renderer.shader.syncUniformGroup(renderer.shader.shader.uniforms.globals)}calculateProjection(_destinationFrame,sourceFrame,_resolution,root){const pm=this.projectionMatrix,sign=root?-1:1;pm.identity(),pm.a=1/sourceFrame.width*2,pm.d=sign*(1/sourceFrame.height*2),pm.tx=-1-sourceFrame.x*pm.a,pm.ty=-sign-sourceFrame.y*pm.d}setTransform(_matrix){}destroy(){this.renderer=null}}ProjectionSystem.extension={type:ExtensionType.RendererSystem,name:"projection"},extensions.add(ProjectionSystem);const tempTransform=new Transform,tempRect=new Rectangle;class GenerateTextureSystem{constructor(renderer){this.renderer=renderer,this._tempMatrix=new Matrix}generateTexture(displayObject,options){const{region:manualRegion,...textureOptions}=options||{},region=manualRegion?.copyTo(tempRect)||displayObject.getLocalBounds(tempRect,!0),resolution=textureOptions.resolution||this.renderer.resolution;region.width=Math.max(region.width,1/resolution),region.height=Math.max(region.height,1/resolution),textureOptions.width=region.width,textureOptions.height=region.height,textureOptions.resolution=resolution,textureOptions.multisample??(textureOptions.multisample=this.renderer.multisample);const renderTexture=RenderTexture.create(textureOptions);this._tempMatrix.tx=-region.x,this._tempMatrix.ty=-region.y;const transform=displayObject.transform;return displayObject.transform=tempTransform,this.renderer.render(displayObject,{renderTexture,transform:this._tempMatrix,skipUpdateTransform:!!displayObject.parent,blit:!0}),displayObject.transform=transform,renderTexture}destroy(){}}GenerateTextureSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"textureGenerator"},extensions.add(GenerateTextureSystem);const RenderTextureSystem_tempRect=new Rectangle,tempRect2=new Rectangle;class RenderTextureSystem{constructor(renderer){this.renderer=renderer,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Rectangle,this.destinationFrame=new Rectangle,this.viewportFrame=new Rectangle}contextChange(){const attributes=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(attributes&&attributes.alpha&&attributes.premultipliedAlpha)}bind(renderTexture=null,sourceFrame,destinationFrame){const renderer=this.renderer;let baseTexture,framebuffer,resolution;this.current=renderTexture,renderTexture?(baseTexture=renderTexture.baseTexture,resolution=baseTexture.resolution,sourceFrame||(RenderTextureSystem_tempRect.width=renderTexture.frame.width,RenderTextureSystem_tempRect.height=renderTexture.frame.height,sourceFrame=RenderTextureSystem_tempRect),destinationFrame||(tempRect2.x=renderTexture.frame.x,tempRect2.y=renderTexture.frame.y,tempRect2.width=sourceFrame.width,tempRect2.height=sourceFrame.height,destinationFrame=tempRect2),framebuffer=baseTexture.framebuffer):(resolution=renderer.resolution,sourceFrame||(RenderTextureSystem_tempRect.width=renderer._view.screen.width,RenderTextureSystem_tempRect.height=renderer._view.screen.height,sourceFrame=RenderTextureSystem_tempRect),destinationFrame||((destinationFrame=RenderTextureSystem_tempRect).width=sourceFrame.width,destinationFrame.height=sourceFrame.height));const viewportFrame=this.viewportFrame;viewportFrame.x=destinationFrame.x*resolution,viewportFrame.y=destinationFrame.y*resolution,viewportFrame.width=destinationFrame.width*resolution,viewportFrame.height=destinationFrame.height*resolution,renderTexture||(viewportFrame.y=renderer.view.height-(viewportFrame.y+viewportFrame.height)),viewportFrame.ceil(),this.renderer.framebuffer.bind(framebuffer,viewportFrame),this.renderer.projection.update(destinationFrame,sourceFrame,resolution,!framebuffer),renderTexture?this.renderer.mask.setMaskStack(baseTexture.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(sourceFrame),this.destinationFrame.copyFrom(destinationFrame)}clear(clearColor,mask){const fallbackColor=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,color=Color.shared.setValue(clearColor||fallbackColor);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&color.premultiply(color.alpha);const destinationFrame=this.destinationFrame,baseFrame=this.current?this.current.baseTexture:this.renderer._view.screen,clearMask=destinationFrame.width!==baseFrame.width||destinationFrame.height!==baseFrame.height;if(clearMask){let{x,y,width,height}=this.viewportFrame;x=Math.round(x),y=Math.round(y),width=Math.round(width),height=Math.round(height),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(x,y,width,height)}this.renderer.framebuffer.clear(color.red,color.green,color.blue,color.alpha,mask),clearMask&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}RenderTextureSystem.extension={type:ExtensionType.RendererSystem,name:"renderTexture"},extensions.add(RenderTextureSystem);class GLProgram{constructor(program,uniformData){this.program=program,this.uniformData=uniformData,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function compileShader(gl,type,src){const shader=gl.createShader(type);return gl.shaderSource(shader,src),gl.compileShader(shader),shader}function booleanArray(size){const array=new Array(size);for(let i=0;i`${index}: ${line}`)),shaderLog=gl.getShaderInfoLog(shader),splitShader=shaderLog.split("\n"),dedupe={},lineNumbers=splitShader.map((line=>parseFloat(line.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1")))).filter((n=>!(!n||dedupe[n])&&(dedupe[n]=!0,!0))),logArgs=[""];lineNumbers.forEach((number=>{shaderSrc[number-1]=`%c${shaderSrc[number-1]}%c`,logArgs.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));const fragmentSourceToLog=shaderSrc.join("\n");logArgs[0]=fragmentSourceToLog,console.error(shaderLog),console.groupCollapsed("click to view full shader code"),console.warn(...logArgs),console.groupEnd()}function generateProgram(gl,program){const glVertShader=compileShader(gl,gl.VERTEX_SHADER,program.vertexSrc),glFragShader=compileShader(gl,gl.FRAGMENT_SHADER,program.fragmentSrc),webGLProgram=gl.createProgram();gl.attachShader(webGLProgram,glVertShader),gl.attachShader(webGLProgram,glFragShader);const transformFeedbackVaryings=program.extra?.transformFeedbackVaryings;if(transformFeedbackVaryings&&("function"!=typeof gl.transformFeedbackVaryings?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):gl.transformFeedbackVaryings(webGLProgram,transformFeedbackVaryings.names,"separate"===transformFeedbackVaryings.bufferMode?gl.SEPARATE_ATTRIBS:gl.INTERLEAVED_ATTRIBS)),gl.linkProgram(webGLProgram),gl.getProgramParameter(webGLProgram,gl.LINK_STATUS)||function logProgramError(gl,program,vertexShader,fragmentShader){gl.getProgramParameter(program,gl.LINK_STATUS)||(gl.getShaderParameter(vertexShader,gl.COMPILE_STATUS)||logPrettyShaderError(gl,vertexShader),gl.getShaderParameter(fragmentShader,gl.COMPILE_STATUS)||logPrettyShaderError(gl,fragmentShader),console.error("PixiJS Error: Could not initialize shader."),""!==gl.getProgramInfoLog(program)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",gl.getProgramInfoLog(program)))}(gl,webGLProgram,glVertShader,glFragShader),program.attributeData=function getAttributeData(program,gl){const attributes={},totalAttributes=gl.getProgramParameter(program,gl.ACTIVE_ATTRIBUTES);for(let i=0;ia>b?1:-1));for(let i=0;ia.index-b.index)),usedUniformDatas}(group.uniforms,uniformData),{uboElements,size}=function createUBOElements(uniformData){const uboElements=uniformData.map((data=>({data,offset:0,dataLen:0,dirty:0})));let size=0,chunkSize=0,offset=0;for(let i=0;i1&&(size=Math.max(size,16)*uboElement.data.size),uboElement.dataLen=size,chunkSize%size!=0&&chunkSize<16){const lineUpValue=chunkSize%size%16;chunkSize+=lineUpValue,offset+=lineUpValue}chunkSize+size>16?(offset=16*Math.ceil(offset/16),uboElement.offset=offset,offset+=size,chunkSize=size):(uboElement.offset=offset,chunkSize+=size,offset+=size)}return offset=16*Math.ceil(offset/16),{uboElements,size:offset}}(usedUniformDatas),funcFragments=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "];for(let i=0;i1){const size2=mapSize(uboElement.data.type),rowSize=Math.max(GLSL_TO_STD40_SIZE[uboElement.data.type]/16,1),elementSize=size2/rowSize,remainder=(4-elementSize%4)%4;funcFragments.push(`\n cv = ud.${name}.value;\n v = uv.${name};\n offset = ${uboElement.offset/4};\n\n t = 0;\n\n for(var i=0; i < ${uboElement.data.size*rowSize}; i++)\n {\n for(var j = 0; j < ${elementSize}; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ${remainder};\n }\n\n `)}else{const template=UBO_TO_SINGLE_SETTERS[uboElement.data.type];funcFragments.push(`\n cv = ud.${name}.value;\n v = uv.${name};\n offset = ${uboElement.offset/4};\n ${template};\n `)}}return funcFragments.push("\n renderer.buffer.update(buffer);\n "),{size,syncFunc:new Function("ud","uv","renderer","syncData","buffer",funcFragments.join("\n"))}}let unsafeEval;let ShaderSystem_UID=0;const defaultSyncData={textureCount:0,uboCount:0};class ShaderSystem{constructor(renderer){this.destroyed=!1,this.renderer=renderer,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=ShaderSystem_UID++}systemCheck(){if(!function unsafeEvalSupported(){if("boolean"==typeof unsafeEval)return unsafeEval;try{unsafeEval=!0===new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")}catch{unsafeEval=!1}return unsafeEval}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(gl){this.gl=gl,this.reset()}bind(shader,dontSync){shader.disposeRunner.add(this),shader.uniforms.globals=this.renderer.globalUniforms;const program=shader.program,glProgram=program.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(shader);return this.shader=shader,this.program!==program&&(this.program=program,this.gl.useProgram(glProgram.program)),dontSync||(defaultSyncData.textureCount=0,defaultSyncData.uboCount=0,this.syncUniformGroup(shader.uniformGroup,defaultSyncData)),glProgram}setUniforms(uniforms){const shader=this.shader.program,glProgram=shader.glPrograms[this.renderer.CONTEXT_UID];shader.syncUniforms(glProgram.uniformData,uniforms,this.renderer)}syncUniformGroup(group,syncData){const glProgram=this.getGlProgram();(!group.static||group.dirtyId!==glProgram.uniformDirtyGroups[group.id])&&(glProgram.uniformDirtyGroups[group.id]=group.dirtyId,this.syncUniforms(group,glProgram,syncData))}syncUniforms(group,glProgram,syncData){(group.syncUniforms[this.shader.program.id]||this.createSyncGroups(group))(glProgram.uniformData,group.uniforms,this.renderer,syncData)}createSyncGroups(group){const id=this.getSignature(group,this.shader.program.uniformData,"u");return this.cache[id]||(this.cache[id]=function generateUniformsSync(group,uniformData){const funcFragments=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(const i in group.uniforms){const data=uniformData[i];if(!data){!0===group.uniforms[i]?.group&&(group.uniforms[i].ubo?funcFragments.push(`\n renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');\n `):funcFragments.push(`\n renderer.shader.syncUniformGroup(uv.${i}, syncData);\n `));continue}const uniform=group.uniforms[i];let parsed=!1;for(let j=0;j>=1,i++;this.stateId=state.data}for(let i=0;iconfig.systems[key])),orderByPriority=[...priority,...Object.keys(config.systems).filter((key=>!priority.includes(key)))];for(const i of orderByPriority)this.addSystem(config.systems[i],i)}addRunners(...runnerIds){runnerIds.forEach((runnerId=>{this.runners[runnerId]=new Runner_Runner(runnerId)}))}addSystem(ClassRef,name){const system=new ClassRef(this);if(this[name])throw new Error(`Whoops! The name "${name}" is already in use`);this[name]=system,this._systemsHash[name]=system;for(const i in this.runners)this.runners[i].add(system);return this}emitWithCustomOptions(runner,options){const systemHashKeys=Object.keys(this._systemsHash);runner.items.forEach((system=>{const systemName=systemHashKeys.find((systemId=>this._systemsHash[systemId]===system));system[runner.name](options[systemName])}))}destroy(){Object.values(this.runners).forEach((runner=>{runner.destroy()})),this._systemsHash={}}}const _TextureGCSystem=class _TextureGCSystem2{constructor(renderer){this.renderer=renderer,this.count=0,this.checkCount=0,this.maxIdle=_TextureGCSystem2.defaultMaxIdle,this.checkCountMax=_TextureGCSystem2.defaultCheckCountMax,this.mode=_TextureGCSystem2.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const tm=this.renderer.texture,managedTextures=tm.managedTextures;let wasRemoved=!1;for(let i=0;ithis.maxIdle&&(tm.destroyTexture(texture,!0),managedTextures[i]=null,wasRemoved=!0)}if(wasRemoved){let j=0;for(let i=0;i=0;i--)this.unload(displayObject.children[i])}destroy(){this.renderer=null}};_TextureGCSystem.defaultMode=GC_MODES.AUTO,_TextureGCSystem.defaultMaxIdle=3600,_TextureGCSystem.defaultCheckCountMax=600,_TextureGCSystem.extension={type:ExtensionType.RendererSystem,name:"textureGC"};let TextureGCSystem=_TextureGCSystem;extensions.add(TextureGCSystem);class GLTexture{constructor(texture){this.texture=texture,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=TYPES.UNSIGNED_BYTE,this.internalFormat=FORMATS.RGBA,this.samplerType=0}}class TextureSystem{constructor(renderer){this.renderer=renderer,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new BaseTexture,this.hasIntegerTextures=!1}contextChange(){const gl=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function mapTypeAndFormatToInternalFormat(gl){let table;return table="WebGL2RenderingContext"in globalThis&&gl instanceof globalThis.WebGL2RenderingContext?{[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:gl.RGBA8,[FORMATS.RGB]:gl.RGB8,[FORMATS.RG]:gl.RG8,[FORMATS.RED]:gl.R8,[FORMATS.RGBA_INTEGER]:gl.RGBA8UI,[FORMATS.RGB_INTEGER]:gl.RGB8UI,[FORMATS.RG_INTEGER]:gl.RG8UI,[FORMATS.RED_INTEGER]:gl.R8UI,[FORMATS.ALPHA]:gl.ALPHA,[FORMATS.LUMINANCE]:gl.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:gl.LUMINANCE_ALPHA},[TYPES.BYTE]:{[FORMATS.RGBA]:gl.RGBA8_SNORM,[FORMATS.RGB]:gl.RGB8_SNORM,[FORMATS.RG]:gl.RG8_SNORM,[FORMATS.RED]:gl.R8_SNORM,[FORMATS.RGBA_INTEGER]:gl.RGBA8I,[FORMATS.RGB_INTEGER]:gl.RGB8I,[FORMATS.RG_INTEGER]:gl.RG8I,[FORMATS.RED_INTEGER]:gl.R8I},[TYPES.UNSIGNED_SHORT]:{[FORMATS.RGBA_INTEGER]:gl.RGBA16UI,[FORMATS.RGB_INTEGER]:gl.RGB16UI,[FORMATS.RG_INTEGER]:gl.RG16UI,[FORMATS.RED_INTEGER]:gl.R16UI,[FORMATS.DEPTH_COMPONENT]:gl.DEPTH_COMPONENT16},[TYPES.SHORT]:{[FORMATS.RGBA_INTEGER]:gl.RGBA16I,[FORMATS.RGB_INTEGER]:gl.RGB16I,[FORMATS.RG_INTEGER]:gl.RG16I,[FORMATS.RED_INTEGER]:gl.R16I},[TYPES.UNSIGNED_INT]:{[FORMATS.RGBA_INTEGER]:gl.RGBA32UI,[FORMATS.RGB_INTEGER]:gl.RGB32UI,[FORMATS.RG_INTEGER]:gl.RG32UI,[FORMATS.RED_INTEGER]:gl.R32UI,[FORMATS.DEPTH_COMPONENT]:gl.DEPTH_COMPONENT24},[TYPES.INT]:{[FORMATS.RGBA_INTEGER]:gl.RGBA32I,[FORMATS.RGB_INTEGER]:gl.RGB32I,[FORMATS.RG_INTEGER]:gl.RG32I,[FORMATS.RED_INTEGER]:gl.R32I},[TYPES.FLOAT]:{[FORMATS.RGBA]:gl.RGBA32F,[FORMATS.RGB]:gl.RGB32F,[FORMATS.RG]:gl.RG32F,[FORMATS.RED]:gl.R32F,[FORMATS.DEPTH_COMPONENT]:gl.DEPTH_COMPONENT32F},[TYPES.HALF_FLOAT]:{[FORMATS.RGBA]:gl.RGBA16F,[FORMATS.RGB]:gl.RGB16F,[FORMATS.RG]:gl.RG16F,[FORMATS.RED]:gl.R16F},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:gl.RGB565},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:gl.RGBA4},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:gl.RGB5_A1},[TYPES.UNSIGNED_INT_2_10_10_10_REV]:{[FORMATS.RGBA]:gl.RGB10_A2,[FORMATS.RGBA_INTEGER]:gl.RGB10_A2UI},[TYPES.UNSIGNED_INT_10F_11F_11F_REV]:{[FORMATS.RGB]:gl.R11F_G11F_B10F},[TYPES.UNSIGNED_INT_5_9_9_9_REV]:{[FORMATS.RGB]:gl.RGB9_E5},[TYPES.UNSIGNED_INT_24_8]:{[FORMATS.DEPTH_STENCIL]:gl.DEPTH24_STENCIL8},[TYPES.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[FORMATS.DEPTH_STENCIL]:gl.DEPTH32F_STENCIL8}}:{[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:gl.RGBA,[FORMATS.RGB]:gl.RGB,[FORMATS.ALPHA]:gl.ALPHA,[FORMATS.LUMINANCE]:gl.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:gl.LUMINANCE_ALPHA},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:gl.RGB},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:gl.RGBA},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:gl.RGBA}},table}(gl),this.samplerTypes=function mapInternalFormatToSamplerType(gl){let table;return table="WebGL2RenderingContext"in globalThis&&gl instanceof globalThis.WebGL2RenderingContext?{[gl.RGB]:SAMPLER_TYPES.FLOAT,[gl.RGBA]:SAMPLER_TYPES.FLOAT,[gl.ALPHA]:SAMPLER_TYPES.FLOAT,[gl.LUMINANCE]:SAMPLER_TYPES.FLOAT,[gl.LUMINANCE_ALPHA]:SAMPLER_TYPES.FLOAT,[gl.R8]:SAMPLER_TYPES.FLOAT,[gl.R8_SNORM]:SAMPLER_TYPES.FLOAT,[gl.RG8]:SAMPLER_TYPES.FLOAT,[gl.RG8_SNORM]:SAMPLER_TYPES.FLOAT,[gl.RGB8]:SAMPLER_TYPES.FLOAT,[gl.RGB8_SNORM]:SAMPLER_TYPES.FLOAT,[gl.RGB565]:SAMPLER_TYPES.FLOAT,[gl.RGBA4]:SAMPLER_TYPES.FLOAT,[gl.RGB5_A1]:SAMPLER_TYPES.FLOAT,[gl.RGBA8]:SAMPLER_TYPES.FLOAT,[gl.RGBA8_SNORM]:SAMPLER_TYPES.FLOAT,[gl.RGB10_A2]:SAMPLER_TYPES.FLOAT,[gl.RGB10_A2UI]:SAMPLER_TYPES.FLOAT,[gl.SRGB8]:SAMPLER_TYPES.FLOAT,[gl.SRGB8_ALPHA8]:SAMPLER_TYPES.FLOAT,[gl.R16F]:SAMPLER_TYPES.FLOAT,[gl.RG16F]:SAMPLER_TYPES.FLOAT,[gl.RGB16F]:SAMPLER_TYPES.FLOAT,[gl.RGBA16F]:SAMPLER_TYPES.FLOAT,[gl.R32F]:SAMPLER_TYPES.FLOAT,[gl.RG32F]:SAMPLER_TYPES.FLOAT,[gl.RGB32F]:SAMPLER_TYPES.FLOAT,[gl.RGBA32F]:SAMPLER_TYPES.FLOAT,[gl.R11F_G11F_B10F]:SAMPLER_TYPES.FLOAT,[gl.RGB9_E5]:SAMPLER_TYPES.FLOAT,[gl.R8I]:SAMPLER_TYPES.INT,[gl.R8UI]:SAMPLER_TYPES.UINT,[gl.R16I]:SAMPLER_TYPES.INT,[gl.R16UI]:SAMPLER_TYPES.UINT,[gl.R32I]:SAMPLER_TYPES.INT,[gl.R32UI]:SAMPLER_TYPES.UINT,[gl.RG8I]:SAMPLER_TYPES.INT,[gl.RG8UI]:SAMPLER_TYPES.UINT,[gl.RG16I]:SAMPLER_TYPES.INT,[gl.RG16UI]:SAMPLER_TYPES.UINT,[gl.RG32I]:SAMPLER_TYPES.INT,[gl.RG32UI]:SAMPLER_TYPES.UINT,[gl.RGB8I]:SAMPLER_TYPES.INT,[gl.RGB8UI]:SAMPLER_TYPES.UINT,[gl.RGB16I]:SAMPLER_TYPES.INT,[gl.RGB16UI]:SAMPLER_TYPES.UINT,[gl.RGB32I]:SAMPLER_TYPES.INT,[gl.RGB32UI]:SAMPLER_TYPES.UINT,[gl.RGBA8I]:SAMPLER_TYPES.INT,[gl.RGBA8UI]:SAMPLER_TYPES.UINT,[gl.RGBA16I]:SAMPLER_TYPES.INT,[gl.RGBA16UI]:SAMPLER_TYPES.UINT,[gl.RGBA32I]:SAMPLER_TYPES.INT,[gl.RGBA32UI]:SAMPLER_TYPES.UINT,[gl.DEPTH_COMPONENT16]:SAMPLER_TYPES.FLOAT,[gl.DEPTH_COMPONENT24]:SAMPLER_TYPES.FLOAT,[gl.DEPTH_COMPONENT32F]:SAMPLER_TYPES.FLOAT,[gl.DEPTH_STENCIL]:SAMPLER_TYPES.FLOAT,[gl.DEPTH24_STENCIL8]:SAMPLER_TYPES.FLOAT,[gl.DEPTH32F_STENCIL8]:SAMPLER_TYPES.FLOAT}:{[gl.RGB]:SAMPLER_TYPES.FLOAT,[gl.RGBA]:SAMPLER_TYPES.FLOAT,[gl.ALPHA]:SAMPLER_TYPES.FLOAT,[gl.LUMINANCE]:SAMPLER_TYPES.FLOAT,[gl.LUMINANCE_ALPHA]:SAMPLER_TYPES.FLOAT,[gl.DEPTH_STENCIL]:SAMPLER_TYPES.FLOAT},table}(gl);const maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=maxTextures;for(let i=0;i=0;--i){const tex=boundTextures[i];tex&&tex._glTextures[CONTEXT_UID].samplerType!==SAMPLER_TYPES.FLOAT&&this.renderer.texture.unbind(tex)}}initTexture(texture){const glTexture=new GLTexture(this.gl.createTexture());return glTexture.dirtyId=-1,texture._glTextures[this.CONTEXT_UID]=glTexture,this.managedTextures.push(texture),texture.on("dispose",this.destroyTexture,this),glTexture}initTextureType(texture,glTexture){glTexture.internalFormat=this.internalFormats[texture.type]?.[texture.format]??texture.format,glTexture.samplerType=this.samplerTypes[glTexture.internalFormat]??SAMPLER_TYPES.FLOAT,2===this.webGLVersion&&texture.type===TYPES.HALF_FLOAT?glTexture.type=this.gl.HALF_FLOAT:glTexture.type=texture.type}updateTexture(texture){const glTexture=texture._glTextures[this.CONTEXT_UID];if(!glTexture)return;const renderer=this.renderer;if(this.initTextureType(texture,glTexture),texture.resource?.upload(renderer,texture,glTexture))glTexture.samplerType!==SAMPLER_TYPES.FLOAT&&(this.hasIntegerTextures=!0);else{const width=texture.realWidth,height=texture.realHeight,gl=renderer.gl;(glTexture.width!==width||glTexture.height!==height||glTexture.dirtyId<0)&&(glTexture.width=width,glTexture.height=height,gl.texImage2D(texture.target,0,glTexture.internalFormat,width,height,0,texture.format,glTexture.type,null))}texture.dirtyStyleId!==glTexture.dirtyStyleId&&this.updateTextureStyle(texture),glTexture.dirtyId=texture.dirtyId}destroyTexture(texture,skipRemove){const{gl}=this;if((texture=texture.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(texture),gl.deleteTexture(texture._glTextures[this.CONTEXT_UID].texture),texture.off("dispose",this.destroyTexture,this),delete texture._glTextures[this.CONTEXT_UID],!skipRemove)){const i=this.managedTextures.indexOf(texture);-1!==i&&removeItems(this.managedTextures,i,1)}}updateTextureStyle(texture){const glTexture=texture._glTextures[this.CONTEXT_UID];glTexture&&(texture.mipmap!==MIPMAP_MODES.POW2&&2===this.webGLVersion||texture.isPowerOfTwo?glTexture.mipmap=texture.mipmap>=1:glTexture.mipmap=!1,2===this.webGLVersion||texture.isPowerOfTwo?glTexture.wrapMode=texture.wrapMode:glTexture.wrapMode=WRAP_MODES.CLAMP,texture.resource?.style(this.renderer,texture,glTexture)||this.setStyle(texture,glTexture),glTexture.dirtyStyleId=texture.dirtyStyleId)}setStyle(texture,glTexture){const gl=this.gl;if(glTexture.mipmap&&texture.mipmap!==MIPMAP_MODES.ON_MANUAL&&gl.generateMipmap(texture.target),gl.texParameteri(texture.target,gl.TEXTURE_WRAP_S,glTexture.wrapMode),gl.texParameteri(texture.target,gl.TEXTURE_WRAP_T,glTexture.wrapMode),glTexture.mipmap){gl.texParameteri(texture.target,gl.TEXTURE_MIN_FILTER,texture.scaleMode===SCALE_MODES.LINEAR?gl.LINEAR_MIPMAP_LINEAR:gl.NEAREST_MIPMAP_NEAREST);const anisotropicExt=this.renderer.context.extensions.anisotropicFiltering;if(anisotropicExt&&texture.anisotropicLevel>0&&texture.scaleMode===SCALE_MODES.LINEAR){const level=Math.min(texture.anisotropicLevel,gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT));gl.texParameterf(texture.target,anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT,level)}}else gl.texParameteri(texture.target,gl.TEXTURE_MIN_FILTER,texture.scaleMode===SCALE_MODES.LINEAR?gl.LINEAR:gl.NEAREST);gl.texParameteri(texture.target,gl.TEXTURE_MAG_FILTER,texture.scaleMode===SCALE_MODES.LINEAR?gl.LINEAR:gl.NEAREST)}destroy(){this.renderer=null}}TextureSystem.extension={type:ExtensionType.RendererSystem,name:"texture"},extensions.add(TextureSystem);class TransformFeedbackSystem{constructor(renderer){this.renderer=renderer}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(transformFeedback){const{gl,CONTEXT_UID}=this,glTransformFeedback=transformFeedback._glTransformFeedbacks[CONTEXT_UID]||this.createGLTransformFeedback(transformFeedback);gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK,glTransformFeedback)}unbind(){const{gl}=this;gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(drawMode,shader){const{gl,renderer}=this;shader&&renderer.shader.bind(shader),gl.beginTransformFeedback(drawMode)}endTransformFeedback(){const{gl}=this;gl.endTransformFeedback()}createGLTransformFeedback(tf){const{gl,renderer,CONTEXT_UID}=this,glTransformFeedback=gl.createTransformFeedback();tf._glTransformFeedbacks[CONTEXT_UID]=glTransformFeedback,gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK,glTransformFeedback);for(let i=0;iBaseTexture.defaultOptions.wrapMode,set(value){deprecation("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),BaseTexture.defaultOptions.wrapMode=value}},SCALE_MODE:{get:()=>BaseTexture.defaultOptions.scaleMode,set(value){deprecation("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),BaseTexture.defaultOptions.scaleMode=value}},MIPMAP_TEXTURES:{get:()=>BaseTexture.defaultOptions.mipmap,set(value){deprecation("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),BaseTexture.defaultOptions.mipmap=value}},ANISOTROPIC_LEVEL:{get:()=>BaseTexture.defaultOptions.anisotropicLevel,set(value){deprecation("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),BaseTexture.defaultOptions.anisotropicLevel=value}},FILTER_RESOLUTION:{get:()=>(deprecation("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Filter.defaultResolution),set(value){Filter.defaultResolution=value}},FILTER_MULTISAMPLE:{get:()=>(deprecation("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Filter.defaultMultisample),set(value){Filter.defaultMultisample=value}},SPRITE_MAX_TEXTURES:{get:()=>BatchRenderer.defaultMaxTextures,set(value){deprecation("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),BatchRenderer.defaultMaxTextures=value}},SPRITE_BATCH_SIZE:{get:()=>BatchRenderer.defaultBatchSize,set(value){deprecation("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),BatchRenderer.defaultBatchSize=value}},CAN_UPLOAD_SAME_BUFFER:{get:()=>BatchRenderer.canUploadSameBuffer,set(value){deprecation("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),BatchRenderer.canUploadSameBuffer=value}},GC_MODE:{get:()=>TextureGCSystem.defaultMode,set(value){deprecation("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),TextureGCSystem.defaultMode=value}},GC_MAX_IDLE:{get:()=>TextureGCSystem.defaultMaxIdle,set(value){deprecation("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),TextureGCSystem.defaultMaxIdle=value}},GC_MAX_CHECK_COUNT:{get:()=>TextureGCSystem.defaultCheckCountMax,set(value){deprecation("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),TextureGCSystem.defaultCheckCountMax=value}},PRECISION_VERTEX:{get:()=>Program.defaultVertexPrecision,set(value){deprecation("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Program.defaultVertexPrecision=value}},PRECISION_FRAGMENT:{get:()=>Program.defaultFragmentPrecision,set(value){deprecation("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Program.defaultFragmentPrecision=value}}});var UPDATE_PRIORITY=(UPDATE_PRIORITY2=>(UPDATE_PRIORITY2[UPDATE_PRIORITY2.INTERACTION=50]="INTERACTION",UPDATE_PRIORITY2[UPDATE_PRIORITY2.HIGH=25]="HIGH",UPDATE_PRIORITY2[UPDATE_PRIORITY2.NORMAL=0]="NORMAL",UPDATE_PRIORITY2[UPDATE_PRIORITY2.LOW=-25]="LOW",UPDATE_PRIORITY2[UPDATE_PRIORITY2.UTILITY=-50]="UTILITY",UPDATE_PRIORITY2))(UPDATE_PRIORITY||{});class TickerListener{constructor(fn,context=null,priority=0,once=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=fn,this.context=context,this.priority=priority,this.once=once}match(fn,context=null){return this.fn===fn&&this.context===context}emit(deltaTime){this.fn&&(this.context?this.fn.call(this.context,deltaTime):this.fn(deltaTime));const redirect=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),redirect}connect(previous){this.previous=previous,previous.next&&(previous.next.previous=this),this.next=previous.next,previous.next=this}destroy(hard=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const redirect=this.next;return this.next=hard?null:redirect,this.previous=null,redirect}}const _Ticker=class _Ticker2{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new TickerListener(null,null,1/0),this.deltaMS=1/_Ticker2.targetFPMS,this.elapsedMS=1/_Ticker2.targetFPMS,this._tick=time=>{this._requestId=null,this.started&&(this.update(time),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(fn,context,priority=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(fn,context,priority))}addOnce(fn,context,priority=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(fn,context,priority,!0))}_addListener(listener){let current=this._head.next,previous=this._head;if(current){for(;current;){if(listener.priority>current.priority){listener.connect(previous);break}previous=current,current=current.next}listener.previous||listener.connect(previous)}else listener.connect(previous);return this._startIfPossible(),this}remove(fn,context){let listener=this._head.next;for(;listener;)listener=listener.match(fn,context)?listener.destroy():listener.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let count=0,current=this._head;for(;current=current.next;)count++;return count}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let listener=this._head.next;for(;listener;)listener=listener.destroy(!0);this._head.destroy(),this._head=null}}update(currentTime=performance.now()){let elapsedMS;if(currentTime>this.lastTime){if(elapsedMS=this.elapsedMS=currentTime-this.lastTime,elapsedMS>this._maxElapsedMS&&(elapsedMS=this._maxElapsedMS),elapsedMS*=this.speed,this._minElapsedMS){const delta=currentTime-this._lastFrame|0;if(deltaTicker.targetFPMS,set(value){deprecation("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Ticker.targetFPMS=value}}});class TickerPlugin{static init(options){options=Object.assign({autoStart:!0,sharedTicker:!1},options),Object.defineProperty(this,"ticker",{set(ticker){this._ticker&&this._ticker.remove(this.render,this),this._ticker=ticker,ticker&&ticker.add(this.render,this,UPDATE_PRIORITY.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=options.sharedTicker?Ticker.shared:new Ticker,options.autoStart&&this.start()}static destroy(){if(this._ticker){const oldTicker=this._ticker;this.ticker=null,oldTicker.destroy()}}}TickerPlugin.extension=ExtensionType.Application,extensions.add(TickerPlugin);const renderers=[];function autoDetectRenderer(options){for(const RendererType of renderers)if(RendererType.test(options))return new RendererType(options);throw new Error("Unable to auto-detect a suitable renderer.")}extensions.handleByList(ExtensionType.Renderer,renderers);const fragments_defaultVertex="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",defaultFilterVertex="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";class MultisampleSystem{constructor(renderer){this.renderer=renderer}contextChange(gl){let samples;if(1===this.renderer.context.webGLVersion){const framebuffer=gl.getParameter(gl.FRAMEBUFFER_BINDING);gl.bindFramebuffer(gl.FRAMEBUFFER,null),samples=gl.getParameter(gl.SAMPLES),gl.bindFramebuffer(gl.FRAMEBUFFER,framebuffer)}else{const framebuffer=gl.getParameter(gl.DRAW_FRAMEBUFFER_BINDING);gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER,null),samples=gl.getParameter(gl.SAMPLES),gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER,framebuffer)}samples>=MSAA_QUALITY.HIGH?this.multisample=MSAA_QUALITY.HIGH:samples>=MSAA_QUALITY.MEDIUM?this.multisample=MSAA_QUALITY.MEDIUM:samples>=MSAA_QUALITY.LOW?this.multisample=MSAA_QUALITY.LOW:this.multisample=MSAA_QUALITY.NONE}destroy(){}}MultisampleSystem.extension={type:ExtensionType.RendererSystem,name:"_multisample"},extensions.add(MultisampleSystem);class GLBuffer{constructor(buffer){this.buffer=buffer||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class BufferSystem{constructor(renderer){this.renderer=renderer,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(buffer){const{gl,CONTEXT_UID}=this,glBuffer=buffer._glBuffers[CONTEXT_UID]||this.createGLBuffer(buffer);gl.bindBuffer(buffer.type,glBuffer.buffer)}unbind(type){const{gl}=this;gl.bindBuffer(type,null)}bindBufferBase(buffer,index){const{gl,CONTEXT_UID}=this;if(this.boundBufferBases[index]!==buffer){const glBuffer=buffer._glBuffers[CONTEXT_UID]||this.createGLBuffer(buffer);this.boundBufferBases[index]=buffer,gl.bindBufferBase(gl.UNIFORM_BUFFER,index,glBuffer.buffer)}}bindBufferRange(buffer,index,offset){const{gl,CONTEXT_UID}=this;offset=offset||0;const glBuffer=buffer._glBuffers[CONTEXT_UID]||this.createGLBuffer(buffer);gl.bindBufferRange(gl.UNIFORM_BUFFER,index||0,glBuffer.buffer,256*offset,256)}update(buffer){const{gl,CONTEXT_UID}=this,glBuffer=buffer._glBuffers[CONTEXT_UID]||this.createGLBuffer(buffer);if(buffer._updateID!==glBuffer.updateID)if(glBuffer.updateID=buffer._updateID,gl.bindBuffer(buffer.type,glBuffer.buffer),glBuffer.byteLength>=buffer.data.byteLength)gl.bufferSubData(buffer.type,0,buffer.data);else{const drawType=buffer.static?gl.STATIC_DRAW:gl.DYNAMIC_DRAW;glBuffer.byteLength=buffer.data.byteLength,gl.bufferData(buffer.type,buffer.data,drawType)}}dispose(buffer,contextLost){if(!this.managedBuffers[buffer.id])return;delete this.managedBuffers[buffer.id];const glBuffer=buffer._glBuffers[this.CONTEXT_UID],gl=this.gl;buffer.disposeRunner.remove(this),glBuffer&&(contextLost||gl.deleteBuffer(glBuffer.buffer),delete buffer._glBuffers[this.CONTEXT_UID])}disposeAll(contextLost){const all=Object.keys(this.managedBuffers);for(let i=0;iitem.resource)).filter((item=>item)).map((item=>item.load()));return this._load=Promise.all(promises).then((()=>{const{realWidth,realHeight}=this.items[0];return this.resize(realWidth,realHeight),this.update(),Promise.resolve(this)})),this._load}}const _CubeResource=class _CubeResource2 extends AbstractMultiResource{constructor(source,options){const{width,height,autoLoad,linkBaseTexture}=options||{};if(source&&source.length!==_CubeResource2.SIDES)throw new Error(`Invalid length. Got ${source.length}, expected 6`);super(6,{width,height});for(let i=0;i<_CubeResource2.SIDES;i++)this.items[i].target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+i;this.linkBaseTexture=!1!==linkBaseTexture,source&&this.initFromArray(source,options),!1!==autoLoad&&this.load()}bind(baseTexture){super.bind(baseTexture),baseTexture.target=TARGETS.TEXTURE_CUBE_MAP}addBaseTextureAt(baseTexture,index,linkBaseTexture){if(void 0===linkBaseTexture&&(linkBaseTexture=this.linkBaseTexture),!this.items[index])throw new Error(`Index ${index} is out of bounds`);if(!this.linkBaseTexture||baseTexture.parentTextureArray||Object.keys(baseTexture._glTextures).length>0){if(!baseTexture.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(baseTexture.resource,index)}else baseTexture.target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+index,baseTexture.parentTextureArray=this.baseTexture,this.items[index]=baseTexture;return baseTexture.valid&&!this.valid&&this.resize(baseTexture.realWidth,baseTexture.realHeight),this.items[index]=baseTexture,this}upload(renderer,_baseTexture,glTexture){const dirty=this.itemDirtyIds;for(let i=0;i<_CubeResource2.SIDES;i++){const side=this.items[i];(dirty[i]{if(null!==this.url)try{const response=await settings.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const imageBlob=await response.blob();if(this.destroyed)return;const imageBitmap=await createImageBitmap(imageBlob,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"});if(this.destroyed)return void imageBitmap.close();this.source=imageBitmap,this.update(),resolve(this)}catch(e){if(this.destroyed)return;reject(e),this.onError.emit(e)}else resolve(this)}))),this._load}upload(renderer,baseTexture,glTexture){return this.source instanceof ImageBitmap?("number"==typeof this.alphaMode&&(baseTexture.alphaMode=this.alphaMode),super.upload(renderer,baseTexture,glTexture)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(source){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&("string"==typeof source||source instanceof ImageBitmap)}static get EMPTY(){return ImageBitmapResource._EMPTY=ImageBitmapResource._EMPTY??settings.ADAPTER.createCanvas(0,0),ImageBitmapResource._EMPTY}}const _SVGResource=class _SVGResource2 extends BaseImageResource{constructor(sourceBase64,options){options=options||{},super(settings.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=sourceBase64,this.scale=options.scale||1,this._overrideWidth=options.width,this._overrideHeight=options.height,this._resolve=null,this._crossorigin=options.crossorigin,this._load=null,!1!==options.autoLoad&&this.load()}load(){return this._load||(this._load=new Promise((resolve=>{if(this._resolve=()=>{this.update(),resolve(this)},_SVGResource2.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}))),this._load}_loadSvg(){const tempImage=new Image;BaseImageResource.crossOrigin(tempImage,this.svg,this._crossorigin),tempImage.src=this.svg,tempImage.onerror=event=>{this._resolve&&(tempImage.onerror=null,this.onError.emit(event))},tempImage.onload=()=>{if(!this._resolve)return;const svgWidth=tempImage.width,svgHeight=tempImage.height;if(!svgWidth||!svgHeight)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let width=svgWidth*this.scale,height=svgHeight*this.scale;(this._overrideWidth||this._overrideHeight)&&(width=this._overrideWidth||this._overrideHeight/svgHeight*svgWidth,height=this._overrideHeight||this._overrideWidth/svgWidth*svgHeight),width=Math.round(width),height=Math.round(height);const canvas=this.source;canvas.width=width,canvas.height=height,canvas._pixiId=`canvas_${uid()}`,canvas.getContext("2d").drawImage(tempImage,0,0,svgWidth,svgHeight,0,0,width,height),this._resolve(),this._resolve=null}}static getSize(svgString){const sizeMatch=_SVGResource2.SVG_SIZE.exec(svgString),size={};return sizeMatch&&(size[sizeMatch[1]]=Math.round(parseFloat(sizeMatch[3])),size[sizeMatch[5]]=Math.round(parseFloat(sizeMatch[7]))),size}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(source,extension){return"svg"===extension||"string"==typeof source&&source.startsWith("data:image/svg+xml")||"string"==typeof source&&_SVGResource2.SVG_XML.test(source)}};_SVGResource.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\