@kolkrabbi/design-editor 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -25
- package/dist/BufferResource-BfLgK37S.js +273 -0
- package/dist/CanvasPool-YNSF8hsR.js +30 -0
- package/dist/CanvasRenderer-Bl0rlqNq.js +2 -0
- package/dist/FederatedEventTarget-BJgROaRQ.js +975 -0
- package/dist/FilterSystem-BUrPNXx-.js +1323 -0
- package/dist/Geometry-C5s5KpWq.js +3805 -0
- package/dist/{OrbitControls-BAhLQ5d8.js → OrbitControls-Cql8Rn2i.js} +10305 -9058
- package/dist/RenderTargetSystem-oFwWv5IW.js +2889 -0
- package/dist/WebGLRenderer-CXxpVIx3.js +2 -0
- package/dist/WebGPURenderer-BwLEUYBa.js +2 -0
- package/dist/browserAll-CAzdTUbR.js +6 -0
- package/dist/canvasUtils-BoNfkAod.js +168 -0
- package/dist/chunk-3b4jIN3o.js +13 -0
- package/dist/design-editor.css +2 -2
- package/dist/design-editor.js +52017 -38760
- package/dist/getTextureBatchBindGroup-CNWhZRbV.js +19 -0
- package/dist/{host-IfZgcJFg.js → host-CVR9RL_W.js} +505 -556
- package/dist/{host-Cidlc8xP.js → host-be1CWhN1.js} +133 -85
- package/dist/init-jApIMi04.js +4 -0
- package/dist/phase-t_DhU5Nm.js +1719 -0
- package/dist/pipeline-CMpuPUaX.js +11995 -0
- package/dist/src-QwKcYKfv.js +4315 -0
- package/dist/webworkerAll-DEZhpG90.js +2 -0
- package/package.json +42 -31
- package/LICENSE +0 -21
- package/dist/favicon/favicon.svg +0 -12
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Black.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-BlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Bold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-BoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Dark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-DarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Fine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-FineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Light.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-LightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Medium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-MediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Bold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-BoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Dark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Fine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-FineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Light.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Medium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Black.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Bold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Dark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-DarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Fine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-FineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Light.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-LightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Medium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-MediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Regular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-RegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegularItalic.ttf +0 -0
- package/dist/fonts/TG/TGGullhamrarVF.ttf +0 -0
- package/dist/fonts/TG/TGMalromurRomanVF.ttf +0 -0
- package/dist/fonts/TG/TGRotVF.ttf +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-MediumItalic.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/meshPalettes-BJODHYrY.js +0 -892
|
@@ -0,0 +1,1323 @@
|
|
|
1
|
+
import { A as e, B as t, C as n, E as r, F as i, H as a, J as o, O as s, T as c, U as l, V as u, _ as d, at as f, c as p, d as m, et as h, f as g, i as _, m as ee, ot as v, t as te, u as ne, v as y, x as b, y as x, z as re } from "./Geometry-C5s5KpWq.js";
|
|
2
|
+
import { r as ie, t as ae } from "./canvasUtils-BoNfkAod.js";
|
|
3
|
+
import { t as oe } from "./CanvasPool-YNSF8hsR.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/assets/loader/parsers/LoaderParser.mjs
|
|
5
|
+
var S = /* @__PURE__ */ ((e) => (e[e.Low = 0] = "Low", e[e.Normal = 1] = "Normal", e[e.High = 2] = "High", e))(S || {});
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/path.mjs
|
|
8
|
+
function C(e) {
|
|
9
|
+
if (typeof e != "string") throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`);
|
|
10
|
+
}
|
|
11
|
+
function w(e) {
|
|
12
|
+
return e.split("?")[0].split("#")[0];
|
|
13
|
+
}
|
|
14
|
+
function se(e) {
|
|
15
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16
|
+
}
|
|
17
|
+
function ce(e, t, n) {
|
|
18
|
+
return e.replace(new RegExp(se(t), "g"), n);
|
|
19
|
+
}
|
|
20
|
+
function le(e, t) {
|
|
21
|
+
let n = "", r = 0, i = -1, a = 0, o = -1;
|
|
22
|
+
for (let s = 0; s <= e.length; ++s) {
|
|
23
|
+
if (s < e.length) o = e.charCodeAt(s);
|
|
24
|
+
else if (o === 47) break;
|
|
25
|
+
else o = 47;
|
|
26
|
+
if (o === 47) {
|
|
27
|
+
if (!(i === s - 1 || a === 1)) if (i !== s - 1 && a === 2) {
|
|
28
|
+
if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
|
|
29
|
+
if (n.length > 2) {
|
|
30
|
+
let e = n.lastIndexOf("/");
|
|
31
|
+
if (e !== n.length - 1) {
|
|
32
|
+
e === -1 ? (n = "", r = 0) : (n = n.slice(0, e), r = n.length - 1 - n.lastIndexOf("/")), i = s, a = 0;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
} else if (n.length === 2 || n.length === 1) {
|
|
36
|
+
n = "", r = 0, i = s, a = 0;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
t && (n.length > 0 ? n += "/.." : n = "..", r = 2);
|
|
41
|
+
} else n.length > 0 ? n += `/${e.slice(i + 1, s)}` : n = e.slice(i + 1, s), r = s - i - 1;
|
|
42
|
+
i = s, a = 0;
|
|
43
|
+
} else o === 46 && a !== -1 ? ++a : a = -1;
|
|
44
|
+
}
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
var T = {
|
|
48
|
+
toPosix(e) {
|
|
49
|
+
return ce(e, "\\", "/");
|
|
50
|
+
},
|
|
51
|
+
isUrl(e) {
|
|
52
|
+
return /^https?:/.test(this.toPosix(e));
|
|
53
|
+
},
|
|
54
|
+
isDataUrl(e) {
|
|
55
|
+
return /^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e);
|
|
56
|
+
},
|
|
57
|
+
isBlobUrl(e) {
|
|
58
|
+
return e.startsWith("blob:");
|
|
59
|
+
},
|
|
60
|
+
hasProtocol(e) {
|
|
61
|
+
return /^[^/:]+:/.test(this.toPosix(e));
|
|
62
|
+
},
|
|
63
|
+
getProtocol(e) {
|
|
64
|
+
C(e), e = this.toPosix(e);
|
|
65
|
+
let t = /^file:\/\/\//.exec(e);
|
|
66
|
+
if (t) return t[0];
|
|
67
|
+
let n = /^[^/:]+:\/{0,2}/.exec(e);
|
|
68
|
+
return n ? n[0] : "";
|
|
69
|
+
},
|
|
70
|
+
toAbsolute(e, t, n) {
|
|
71
|
+
if (C(e), this.isDataUrl(e) || this.isBlobUrl(e)) return e;
|
|
72
|
+
let r = w(this.toPosix(t ?? x.get().getBaseUrl())), i = w(this.toPosix(n ?? this.rootname(r)));
|
|
73
|
+
return e = this.toPosix(e), e.startsWith("/") ? T.join(i, e.slice(1)) : this.isAbsolute(e) ? e : this.join(r, e);
|
|
74
|
+
},
|
|
75
|
+
normalize(e) {
|
|
76
|
+
if (C(e), e.length === 0) return ".";
|
|
77
|
+
if (this.isDataUrl(e) || this.isBlobUrl(e)) return e;
|
|
78
|
+
e = this.toPosix(e);
|
|
79
|
+
let t = "", n = e.startsWith("/");
|
|
80
|
+
this.hasProtocol(e) && (t = this.rootname(e), e = e.slice(t.length));
|
|
81
|
+
let r = e.endsWith("/");
|
|
82
|
+
return e = le(e, !1), e.length > 0 && r && (e += "/"), n ? `/${e}` : t + e;
|
|
83
|
+
},
|
|
84
|
+
isAbsolute(e) {
|
|
85
|
+
return C(e), e = this.toPosix(e), this.hasProtocol(e) ? !0 : e.startsWith("/");
|
|
86
|
+
},
|
|
87
|
+
join(...e) {
|
|
88
|
+
if (e.length === 0) return ".";
|
|
89
|
+
let t;
|
|
90
|
+
for (let n = 0; n < e.length; ++n) {
|
|
91
|
+
let r = e[n];
|
|
92
|
+
if (C(r), r.length > 0) if (t === void 0) t = r;
|
|
93
|
+
else {
|
|
94
|
+
let i = e[n - 1] ?? "";
|
|
95
|
+
this.joinExtensions.includes(this.extname(i).toLowerCase()) ? t += `/../${r}` : t += `/${r}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return t === void 0 ? "." : this.normalize(t);
|
|
99
|
+
},
|
|
100
|
+
dirname(e) {
|
|
101
|
+
if (C(e), e.length === 0) return ".";
|
|
102
|
+
e = this.toPosix(e);
|
|
103
|
+
let t = e.charCodeAt(0), n = t === 47, r = -1, i = !0, a = this.getProtocol(e), o = e;
|
|
104
|
+
e = e.slice(a.length);
|
|
105
|
+
for (let n = e.length - 1; n >= 1; --n) if (t = e.charCodeAt(n), t === 47) {
|
|
106
|
+
if (!i) {
|
|
107
|
+
r = n;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
} else i = !1;
|
|
111
|
+
return r === -1 ? n ? "/" : this.isUrl(o) ? a + e : a : n && r === 1 ? "//" : a + e.slice(0, r);
|
|
112
|
+
},
|
|
113
|
+
rootname(e) {
|
|
114
|
+
C(e), e = this.toPosix(e);
|
|
115
|
+
let t = "";
|
|
116
|
+
if (t = e.startsWith("/") ? "/" : this.getProtocol(e), this.isUrl(e)) {
|
|
117
|
+
let n = e.indexOf("/", t.length);
|
|
118
|
+
t = n === -1 ? e : e.slice(0, n), t.endsWith("/") || (t += "/");
|
|
119
|
+
}
|
|
120
|
+
return t;
|
|
121
|
+
},
|
|
122
|
+
basename(e, t) {
|
|
123
|
+
C(e), t && C(t), e = w(this.toPosix(e));
|
|
124
|
+
let n = 0, r = -1, i = !0, a;
|
|
125
|
+
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
126
|
+
if (t.length === e.length && t === e) return "";
|
|
127
|
+
let o = t.length - 1, s = -1;
|
|
128
|
+
for (a = e.length - 1; a >= 0; --a) {
|
|
129
|
+
let c = e.charCodeAt(a);
|
|
130
|
+
if (c === 47) {
|
|
131
|
+
if (!i) {
|
|
132
|
+
n = a + 1;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
} else s === -1 && (i = !1, s = a + 1), o >= 0 && (c === t.charCodeAt(o) ? --o === -1 && (r = a) : (o = -1, r = s));
|
|
136
|
+
}
|
|
137
|
+
return n === r ? r = s : r === -1 && (r = e.length), e.slice(n, r);
|
|
138
|
+
}
|
|
139
|
+
for (a = e.length - 1; a >= 0; --a) if (e.charCodeAt(a) === 47) {
|
|
140
|
+
if (!i) {
|
|
141
|
+
n = a + 1;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
} else r === -1 && (i = !1, r = a + 1);
|
|
145
|
+
return r === -1 ? "" : e.slice(n, r);
|
|
146
|
+
},
|
|
147
|
+
extname(e) {
|
|
148
|
+
C(e), e = w(this.toPosix(e));
|
|
149
|
+
let t = -1, n = 0, r = -1, i = !0, a = 0;
|
|
150
|
+
for (let o = e.length - 1; o >= 0; --o) {
|
|
151
|
+
let s = e.charCodeAt(o);
|
|
152
|
+
if (s === 47) {
|
|
153
|
+
if (!i) {
|
|
154
|
+
n = o + 1;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
r === -1 && (i = !1, r = o + 1), s === 46 ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1);
|
|
160
|
+
}
|
|
161
|
+
return t === -1 || r === -1 || a === 0 || a === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r);
|
|
162
|
+
},
|
|
163
|
+
parse(e) {
|
|
164
|
+
C(e);
|
|
165
|
+
let t = {
|
|
166
|
+
root: "",
|
|
167
|
+
dir: "",
|
|
168
|
+
base: "",
|
|
169
|
+
ext: "",
|
|
170
|
+
name: ""
|
|
171
|
+
};
|
|
172
|
+
if (e.length === 0) return t;
|
|
173
|
+
e = w(this.toPosix(e));
|
|
174
|
+
let n = e.charCodeAt(0), r = this.isAbsolute(e), i;
|
|
175
|
+
t.root = this.rootname(e), i = r || this.hasProtocol(e) ? 1 : 0;
|
|
176
|
+
let a = -1, o = 0, s = -1, c = !0, l = e.length - 1, u = 0;
|
|
177
|
+
for (; l >= i; --l) {
|
|
178
|
+
if (n = e.charCodeAt(l), n === 47) {
|
|
179
|
+
if (!c) {
|
|
180
|
+
o = l + 1;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
s === -1 && (c = !1, s = l + 1), n === 46 ? a === -1 ? a = l : u !== 1 && (u = 1) : a !== -1 && (u = -1);
|
|
186
|
+
}
|
|
187
|
+
return a === -1 || s === -1 || u === 0 || u === 1 && a === s - 1 && a === o + 1 ? s !== -1 && (o === 0 && r ? t.base = t.name = e.slice(1, s) : t.base = t.name = e.slice(o, s)) : (o === 0 && r ? (t.name = e.slice(1, a), t.base = e.slice(1, s)) : (t.name = e.slice(o, a), t.base = e.slice(o, s)), t.ext = e.slice(a, s)), t.dir = this.dirname(e), t;
|
|
188
|
+
},
|
|
189
|
+
sep: "/",
|
|
190
|
+
delimiter: ":",
|
|
191
|
+
joinExtensions: [".html"]
|
|
192
|
+
}, E = (e, t, n = !1) => (Array.isArray(e) || (e = [e]), t ? e.map((e) => typeof e == "string" || n ? t(e) : e) : e);
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/assets/utils/createStringVariations.mjs
|
|
195
|
+
function D(e, t, n, r, i) {
|
|
196
|
+
let a = t[n];
|
|
197
|
+
for (let o = 0; o < a.length; o++) {
|
|
198
|
+
let s = a[o];
|
|
199
|
+
n < t.length - 1 ? D(e.replace(r[n], s), t, n + 1, r, i) : i.push(e.replace(r[n], s));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function ue(e) {
|
|
203
|
+
let t = e.match(/\{(.*?)\}/g), n = [];
|
|
204
|
+
if (t) {
|
|
205
|
+
let r = [];
|
|
206
|
+
t.forEach((e) => {
|
|
207
|
+
let t = e.substring(1, e.length - 1).split(",");
|
|
208
|
+
r.push(t);
|
|
209
|
+
}), D(e, r, 0, t, n);
|
|
210
|
+
} else n.push(e);
|
|
211
|
+
return n;
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/assets/utils/isSingleItem.mjs
|
|
215
|
+
var O = (e) => !Array.isArray(e), k = class {
|
|
216
|
+
constructor() {
|
|
217
|
+
this._defaultBundleIdentifierOptions = {
|
|
218
|
+
connector: "-",
|
|
219
|
+
createBundleAssetId: (e, t) => `${e}${this._bundleIdConnector}${t}`,
|
|
220
|
+
extractAssetIdFromBundle: (e, t) => t.replace(`${e}${this._bundleIdConnector}`, "")
|
|
221
|
+
}, 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 = {};
|
|
222
|
+
}
|
|
223
|
+
setBundleIdentifier(e) {
|
|
224
|
+
if (this._bundleIdConnector = e.connector ?? this._bundleIdConnector, this._createBundleAssetId = e.createBundleAssetId ?? this._createBundleAssetId, this._extractAssetIdFromBundle = e.extractAssetIdFromBundle ?? this._extractAssetIdFromBundle, this._extractAssetIdFromBundle("foo", this._createBundleAssetId("foo", "bar")) !== "bar") throw Error("[Resolver] GenerateBundleAssetId are not working correctly");
|
|
225
|
+
}
|
|
226
|
+
prefer(...e) {
|
|
227
|
+
e.forEach((e) => {
|
|
228
|
+
this._preferredOrder.push(e), e.priority ||= Object.keys(e.params);
|
|
229
|
+
}), this._resolverHash = {};
|
|
230
|
+
}
|
|
231
|
+
set basePath(e) {
|
|
232
|
+
this._basePath = e;
|
|
233
|
+
}
|
|
234
|
+
get basePath() {
|
|
235
|
+
return this._basePath;
|
|
236
|
+
}
|
|
237
|
+
set rootPath(e) {
|
|
238
|
+
this._rootPath = e;
|
|
239
|
+
}
|
|
240
|
+
get rootPath() {
|
|
241
|
+
return this._rootPath;
|
|
242
|
+
}
|
|
243
|
+
get parsers() {
|
|
244
|
+
return this._parsers;
|
|
245
|
+
}
|
|
246
|
+
reset() {
|
|
247
|
+
this.setBundleIdentifier(this._defaultBundleIdentifierOptions), this._assetMap = {}, this._preferredOrder = [], this._resolverHash = {}, this._rootPath = null, this._basePath = null, this._manifest = null, this._bundles = {}, this._defaultSearchParams = null;
|
|
248
|
+
}
|
|
249
|
+
setDefaultSearchParams(e) {
|
|
250
|
+
if (typeof e == "string") this._defaultSearchParams = e;
|
|
251
|
+
else {
|
|
252
|
+
let t = e;
|
|
253
|
+
this._defaultSearchParams = Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
getAlias(e) {
|
|
257
|
+
let { alias: t, src: n } = e;
|
|
258
|
+
return E(t || n, (e) => typeof e == "string" ? e : Array.isArray(e) ? e.map((e) => e?.src ?? e) : e?.src ? e.src : e, !0);
|
|
259
|
+
}
|
|
260
|
+
removeAlias(e, t) {
|
|
261
|
+
this._assetMap[e] && (t && t !== this._resolverHash[e] || (delete this._resolverHash[e], delete this._assetMap[e]));
|
|
262
|
+
}
|
|
263
|
+
addManifest(e) {
|
|
264
|
+
this._manifest && o("[Resolver] Manifest already exists, this will be overwritten"), this._manifest = e, e.bundles.forEach((e) => {
|
|
265
|
+
this.addBundle(e.name, e.assets);
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
addBundle(e, t) {
|
|
269
|
+
let n = [], r = t;
|
|
270
|
+
Array.isArray(t) || (r = Object.entries(t).map(([e, t]) => typeof t == "string" || Array.isArray(t) ? {
|
|
271
|
+
alias: e,
|
|
272
|
+
src: t
|
|
273
|
+
} : {
|
|
274
|
+
alias: e,
|
|
275
|
+
...t
|
|
276
|
+
})), r.forEach((t) => {
|
|
277
|
+
let r = t.src, i = t.alias, a;
|
|
278
|
+
if (typeof i == "string") {
|
|
279
|
+
let t = this._createBundleAssetId(e, i);
|
|
280
|
+
n.push(t), a = [i, t];
|
|
281
|
+
} else {
|
|
282
|
+
let t = i.map((t) => this._createBundleAssetId(e, t));
|
|
283
|
+
n.push(...t), a = [...i, ...t];
|
|
284
|
+
}
|
|
285
|
+
this.add({
|
|
286
|
+
...t,
|
|
287
|
+
alias: a,
|
|
288
|
+
src: r
|
|
289
|
+
});
|
|
290
|
+
}), this._bundles[e] = n;
|
|
291
|
+
}
|
|
292
|
+
add(e) {
|
|
293
|
+
let t = [];
|
|
294
|
+
Array.isArray(e) ? t.push(...e) : t.push(e);
|
|
295
|
+
let n = (e) => {
|
|
296
|
+
this.hasKey(e) && o(`[Resolver] already has key: ${e} overwriting`);
|
|
297
|
+
};
|
|
298
|
+
E(t).forEach((e) => {
|
|
299
|
+
let { src: t } = e, { data: r, format: i, loadParser: a, parser: o } = e, s = E(t).map((e) => typeof e == "string" ? ue(e) : Array.isArray(e) ? e : [e]), c = this.getAlias(e);
|
|
300
|
+
Array.isArray(c) ? c.forEach(n) : n(c);
|
|
301
|
+
let l = [], u = (e) => ({
|
|
302
|
+
src: e,
|
|
303
|
+
...this._parsers.find((t) => t.test(e))?.parse(e)
|
|
304
|
+
});
|
|
305
|
+
s.forEach((t) => {
|
|
306
|
+
t.forEach((t) => {
|
|
307
|
+
let n = {};
|
|
308
|
+
if (typeof t == "object" ? (r = t.data ?? r, i = t.format ?? i, (t.loadParser || t.parser) && (a = t.loadParser ?? a, o = t.parser ?? o), n = {
|
|
309
|
+
...u(t.src),
|
|
310
|
+
...t
|
|
311
|
+
}) : n = u(t), !c) throw Error(`[Resolver] alias is undefined for this asset: ${n.src}`);
|
|
312
|
+
n = this._buildResolvedAsset(n, {
|
|
313
|
+
aliases: c,
|
|
314
|
+
data: r,
|
|
315
|
+
format: i,
|
|
316
|
+
loadParser: a,
|
|
317
|
+
parser: o,
|
|
318
|
+
progressSize: e.progressSize
|
|
319
|
+
}), l.push(n);
|
|
320
|
+
});
|
|
321
|
+
}), c.forEach((e) => {
|
|
322
|
+
this._assetMap[e] = l;
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
resolveBundle(e) {
|
|
327
|
+
let t = O(e);
|
|
328
|
+
e = E(e);
|
|
329
|
+
let n = {};
|
|
330
|
+
return e.forEach((e) => {
|
|
331
|
+
let t = this._bundles[e];
|
|
332
|
+
if (t) {
|
|
333
|
+
let r = this.resolve(t), i = {};
|
|
334
|
+
for (let t in r) {
|
|
335
|
+
let n = r[t];
|
|
336
|
+
i[this._extractAssetIdFromBundle(e, t)] = n;
|
|
337
|
+
}
|
|
338
|
+
n[e] = i;
|
|
339
|
+
}
|
|
340
|
+
}), t ? n[e[0]] : n;
|
|
341
|
+
}
|
|
342
|
+
resolveUrl(e) {
|
|
343
|
+
let t = this.resolve(e);
|
|
344
|
+
if (typeof e != "string") {
|
|
345
|
+
let e = {};
|
|
346
|
+
for (let n in t) e[n] = t[n].src;
|
|
347
|
+
return e;
|
|
348
|
+
}
|
|
349
|
+
return t.src;
|
|
350
|
+
}
|
|
351
|
+
resolve(e) {
|
|
352
|
+
let t = O(e);
|
|
353
|
+
e = E(e);
|
|
354
|
+
let n = {};
|
|
355
|
+
return e.forEach((e) => {
|
|
356
|
+
if (!this._resolverHash[e]) if (this._assetMap[e]) {
|
|
357
|
+
let t = this._assetMap[e], n = this._getPreferredOrder(t);
|
|
358
|
+
n?.priority.forEach((e) => {
|
|
359
|
+
n.params[e].forEach((n) => {
|
|
360
|
+
let r = t.filter((t) => t[e] ? t[e] === n : !1);
|
|
361
|
+
r.length && (t = r);
|
|
362
|
+
});
|
|
363
|
+
}), this._resolverHash[e] = t[0];
|
|
364
|
+
} else this._resolverHash[e] = this._buildResolvedAsset({
|
|
365
|
+
alias: [e],
|
|
366
|
+
src: e
|
|
367
|
+
}, {});
|
|
368
|
+
n[e] = this._resolverHash[e];
|
|
369
|
+
}), t ? n[e[0]] : n;
|
|
370
|
+
}
|
|
371
|
+
hasKey(e) {
|
|
372
|
+
return !!this._assetMap[e];
|
|
373
|
+
}
|
|
374
|
+
hasBundle(e) {
|
|
375
|
+
return !!this._bundles[e];
|
|
376
|
+
}
|
|
377
|
+
_getPreferredOrder(e) {
|
|
378
|
+
for (let t = 0; t < e.length; t++) {
|
|
379
|
+
let n = e[t], r = this._preferredOrder.find((e) => e.params.format.includes(n.format));
|
|
380
|
+
if (r) return r;
|
|
381
|
+
}
|
|
382
|
+
return this._preferredOrder[0];
|
|
383
|
+
}
|
|
384
|
+
_appendDefaultSearchParams(e) {
|
|
385
|
+
return this._defaultSearchParams ? `${e}${/\?/.test(e) ? "&" : "?"}${this._defaultSearchParams}` : e;
|
|
386
|
+
}
|
|
387
|
+
_buildResolvedAsset(e, t) {
|
|
388
|
+
let { aliases: n, data: r, loadParser: i, parser: a, format: o, progressSize: s } = t;
|
|
389
|
+
return (this._basePath || this._rootPath) && (e.src = T.toAbsolute(e.src, this._basePath, this._rootPath)), e.alias = n ?? e.alias ?? [e.src], e.src = this._appendDefaultSearchParams(e.src), e.data = {
|
|
390
|
+
...r || {},
|
|
391
|
+
...e.data
|
|
392
|
+
}, e.loadParser = i ?? e.loadParser, e.parser = a ?? e.parser, e.format = o ?? e.format ?? A(e.src), s !== void 0 && (e.progressSize = s), e;
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
k.RETINA_PREFIX = /@([0-9\.]+)x/;
|
|
396
|
+
function A(e) {
|
|
397
|
+
return e.split(".").pop().split("?").shift().split("#").shift();
|
|
398
|
+
}
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/assets/utils/copySearchParams.mjs
|
|
401
|
+
var j = (e, t) => {
|
|
402
|
+
let n = t.split("?")[1];
|
|
403
|
+
return n && (e += `?${n}`), e;
|
|
404
|
+
}, M = class t {
|
|
405
|
+
constructor(t, n) {
|
|
406
|
+
this.linkedSheets = [];
|
|
407
|
+
let i = t;
|
|
408
|
+
t?.source instanceof e && (i = {
|
|
409
|
+
texture: t,
|
|
410
|
+
data: n
|
|
411
|
+
});
|
|
412
|
+
let { texture: a, data: o, cachePrefix: s = "" } = i;
|
|
413
|
+
this.cachePrefix = s, this._texture = a instanceof r ? a : null, this.textureSource = a.source, this.textures = {}, this.animations = {}, this.data = o;
|
|
414
|
+
let c = parseFloat(o.meta.scale);
|
|
415
|
+
c ? (this.resolution = c, a.source.resolution = this.resolution) : this.resolution = a.source._resolution, this._frames = this.data.frames, this._frameKeys = Object.keys(this._frames), this._batchIndex = 0, this._callback = null;
|
|
416
|
+
}
|
|
417
|
+
parse() {
|
|
418
|
+
return new Promise((e) => {
|
|
419
|
+
this._callback = e, this._batchIndex = 0, this._frameKeys.length <= t.BATCH_SIZE ? (this._processFrames(0), this._processAnimations(), this._parseComplete()) : this._nextBatch();
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
parseSync() {
|
|
423
|
+
return this._processFrames(0, !0), this._processAnimations(), this.textures;
|
|
424
|
+
}
|
|
425
|
+
_processFrames(e, n = !1) {
|
|
426
|
+
let i = e, a = n ? Infinity : t.BATCH_SIZE;
|
|
427
|
+
for (; i - e < a && i < this._frameKeys.length;) {
|
|
428
|
+
let e = this._frameKeys[i], t = this._frames[e], n = t.frame;
|
|
429
|
+
if (n) {
|
|
430
|
+
let i = null, a = null, o = t.trimmed !== !1 && t.sourceSize ? t.sourceSize : t.frame, s = new l(0, 0, Math.floor(o.w) / this.resolution, Math.floor(o.h) / this.resolution);
|
|
431
|
+
i = t.rotated ? new l(Math.floor(n.x) / this.resolution, Math.floor(n.y) / this.resolution, Math.floor(n.h) / this.resolution, Math.floor(n.w) / this.resolution) : new l(Math.floor(n.x) / this.resolution, Math.floor(n.y) / this.resolution, Math.floor(n.w) / this.resolution, Math.floor(n.h) / this.resolution), t.trimmed !== !1 && t.spriteSourceSize && (a = new l(Math.floor(t.spriteSourceSize.x) / this.resolution, Math.floor(t.spriteSourceSize.y) / this.resolution, Math.floor(n.w) / this.resolution, Math.floor(n.h) / this.resolution)), this.textures[e] = new r({
|
|
432
|
+
source: this.textureSource,
|
|
433
|
+
frame: i,
|
|
434
|
+
orig: s,
|
|
435
|
+
trim: a,
|
|
436
|
+
rotate: t.rotated ? 2 : 0,
|
|
437
|
+
defaultAnchor: t.anchor,
|
|
438
|
+
defaultBorders: t.borders,
|
|
439
|
+
label: e.toString()
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
i++;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
_processAnimations() {
|
|
446
|
+
let e = this.data.animations || {};
|
|
447
|
+
for (let t in e) {
|
|
448
|
+
this.animations[t] = [];
|
|
449
|
+
for (let n = 0; n < e[t].length; n++) {
|
|
450
|
+
let r = e[t][n];
|
|
451
|
+
this.animations[t].push(this.textures[r]);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
_parseComplete() {
|
|
456
|
+
let e = this._callback;
|
|
457
|
+
this._callback = null, this._batchIndex = 0, e.call(this, this.textures);
|
|
458
|
+
}
|
|
459
|
+
_nextBatch() {
|
|
460
|
+
this._processFrames(this._batchIndex * t.BATCH_SIZE), this._batchIndex++, setTimeout(() => {
|
|
461
|
+
this._batchIndex * t.BATCH_SIZE < this._frameKeys.length ? this._nextBatch() : (this._processAnimations(), this._parseComplete());
|
|
462
|
+
}, 0);
|
|
463
|
+
}
|
|
464
|
+
destroy(e = !1) {
|
|
465
|
+
for (let e in this.textures) this.textures[e].destroy();
|
|
466
|
+
this._frames = null, this._frameKeys = null, this.data = null, this.textures = null, e && (this._texture?.destroy(), this.textureSource.destroy()), this._texture = null, this.textureSource = null, this.linkedSheets = [];
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
M.BATCH_SIZE = 1e3;
|
|
470
|
+
var N = M, de = [
|
|
471
|
+
"jpg",
|
|
472
|
+
"png",
|
|
473
|
+
"jpeg",
|
|
474
|
+
"avif",
|
|
475
|
+
"webp",
|
|
476
|
+
"basis",
|
|
477
|
+
"etc2",
|
|
478
|
+
"bc7",
|
|
479
|
+
"bc6h",
|
|
480
|
+
"bc5",
|
|
481
|
+
"bc4",
|
|
482
|
+
"bc3",
|
|
483
|
+
"bc2",
|
|
484
|
+
"bc1",
|
|
485
|
+
"eac",
|
|
486
|
+
"astc"
|
|
487
|
+
];
|
|
488
|
+
function P(e, t, n) {
|
|
489
|
+
let r = {};
|
|
490
|
+
if (e.forEach((e) => {
|
|
491
|
+
r[e] = t;
|
|
492
|
+
}), Object.keys(t.textures).forEach((e) => {
|
|
493
|
+
r[`${t.cachePrefix}${e}`] = t.textures[e];
|
|
494
|
+
}), !n) {
|
|
495
|
+
let n = T.dirname(e[0]);
|
|
496
|
+
t.linkedSheets.forEach((e, i) => {
|
|
497
|
+
let a = P([`${n}/${t.data.meta.related_multi_packs[i]}`], e, !0);
|
|
498
|
+
Object.assign(r, a);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return r;
|
|
502
|
+
}
|
|
503
|
+
var fe = {
|
|
504
|
+
extension: f.Asset,
|
|
505
|
+
cache: {
|
|
506
|
+
test: (e) => e instanceof N,
|
|
507
|
+
getCacheableAssets: (e, t) => P(e, t, !1)
|
|
508
|
+
},
|
|
509
|
+
resolver: {
|
|
510
|
+
extension: {
|
|
511
|
+
type: f.ResolveParser,
|
|
512
|
+
name: "resolveSpritesheet"
|
|
513
|
+
},
|
|
514
|
+
test: (e) => {
|
|
515
|
+
let t = e.split("?")[0].split("."), n = t.pop(), r = t.pop();
|
|
516
|
+
return n === "json" && de.includes(r);
|
|
517
|
+
},
|
|
518
|
+
parse: (e) => {
|
|
519
|
+
let t = e.split(".");
|
|
520
|
+
return {
|
|
521
|
+
resolution: parseFloat(k.RETINA_PREFIX.exec(e)?.[1] ?? "1"),
|
|
522
|
+
format: t[t.length - 2],
|
|
523
|
+
src: e
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
loader: {
|
|
528
|
+
name: "spritesheetLoader",
|
|
529
|
+
id: "spritesheet",
|
|
530
|
+
extension: {
|
|
531
|
+
type: f.LoadParser,
|
|
532
|
+
priority: S.Normal,
|
|
533
|
+
name: "spritesheetLoader"
|
|
534
|
+
},
|
|
535
|
+
async testParse(e, t) {
|
|
536
|
+
return T.extname(t.src).toLowerCase() === ".json" && !!e.frames;
|
|
537
|
+
},
|
|
538
|
+
async parse(e, t, n) {
|
|
539
|
+
let { texture: i, imageFilename: a, textureOptions: o, cachePrefix: s } = t?.data ?? {}, c = T.dirname(t.src);
|
|
540
|
+
c && c.lastIndexOf("/") !== c.length - 1 && (c += "/");
|
|
541
|
+
let l;
|
|
542
|
+
if (i instanceof r) l = i;
|
|
543
|
+
else {
|
|
544
|
+
let r = j(c + (a ?? e.meta.image), t.src);
|
|
545
|
+
l = (await n.load([{
|
|
546
|
+
src: r,
|
|
547
|
+
data: o
|
|
548
|
+
}]))[r];
|
|
549
|
+
}
|
|
550
|
+
let u = new N({
|
|
551
|
+
texture: l.source,
|
|
552
|
+
data: e,
|
|
553
|
+
cachePrefix: s
|
|
554
|
+
});
|
|
555
|
+
await u.parse();
|
|
556
|
+
let d = e?.meta?.related_multi_packs;
|
|
557
|
+
if (Array.isArray(d)) {
|
|
558
|
+
let e = [];
|
|
559
|
+
for (let r of d) {
|
|
560
|
+
if (typeof r != "string") continue;
|
|
561
|
+
let i = c + r;
|
|
562
|
+
t.data?.ignoreMultiPack || (i = j(i, t.src), e.push(n.load({
|
|
563
|
+
src: i,
|
|
564
|
+
data: {
|
|
565
|
+
textureOptions: o,
|
|
566
|
+
ignoreMultiPack: !0
|
|
567
|
+
}
|
|
568
|
+
})));
|
|
569
|
+
}
|
|
570
|
+
let r = await Promise.all(e);
|
|
571
|
+
u.linkedSheets = r, r.forEach((e) => {
|
|
572
|
+
e.linkedSheets = [u].concat(u.linkedSheets.filter((t) => t !== e));
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
return u;
|
|
576
|
+
},
|
|
577
|
+
async unload(e, t, n) {
|
|
578
|
+
await n.unload(e.textureSource._sourceOrigin), e.destroy(!1);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/spritesheet/init.mjs
|
|
584
|
+
v.add(fe);
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/utils/addMaskBounds.mjs
|
|
587
|
+
var pe = new a();
|
|
588
|
+
function F(e, t, n) {
|
|
589
|
+
let r = pe;
|
|
590
|
+
e.measurable = !0, re(e, n, r), t.addBoundsMask(r), e.measurable = !1;
|
|
591
|
+
}
|
|
592
|
+
//#endregion
|
|
593
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/utils/addMaskLocalBounds.mjs
|
|
594
|
+
function I(e, n, r) {
|
|
595
|
+
let a = t.get();
|
|
596
|
+
e.measurable = !0;
|
|
597
|
+
let o = u.get().identity();
|
|
598
|
+
i(e, a, L(e, r, o)), e.measurable = !1, n.addBoundsMask(a), u.return(o), t.return(a);
|
|
599
|
+
}
|
|
600
|
+
function L(e, t, n) {
|
|
601
|
+
return e ? (e !== t && (L(e.parent, t, n), e.updateLocalTransform(), n.append(e.localTransform)), n) : (o("Mask bounds, renderable is not inside the root container"), n);
|
|
602
|
+
}
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/alpha/AlphaMask.mjs
|
|
605
|
+
var R = class {
|
|
606
|
+
constructor(e) {
|
|
607
|
+
this.priority = 0, this.inverse = !1, this.channel = "red", this.pipe = "alphaMask", e?.mask && this.init(e.mask);
|
|
608
|
+
}
|
|
609
|
+
init(e) {
|
|
610
|
+
this.mask = e, this.renderMaskToTexture = !(e instanceof y), this.mask.renderable = this.renderMaskToTexture, this.mask.includeInBuild = !this.renderMaskToTexture, this.mask.measurable = !1;
|
|
611
|
+
}
|
|
612
|
+
reset() {
|
|
613
|
+
this.mask !== null && (this.mask.measurable = !0, this.mask = null);
|
|
614
|
+
}
|
|
615
|
+
addBounds(e, t) {
|
|
616
|
+
this.inverse || F(this.mask, e, t);
|
|
617
|
+
}
|
|
618
|
+
addLocalBounds(e, t) {
|
|
619
|
+
I(this.mask, e, t);
|
|
620
|
+
}
|
|
621
|
+
containsPoint(e, t) {
|
|
622
|
+
let n = this.mask;
|
|
623
|
+
return t(n, e);
|
|
624
|
+
}
|
|
625
|
+
destroy() {
|
|
626
|
+
this.reset();
|
|
627
|
+
}
|
|
628
|
+
static test(e) {
|
|
629
|
+
return e instanceof y;
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
R.extension = f.MaskEffect;
|
|
633
|
+
//#endregion
|
|
634
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/color/ColorMask.mjs
|
|
635
|
+
var z = class {
|
|
636
|
+
constructor(e) {
|
|
637
|
+
this.priority = 0, this.pipe = "colorMask", e?.mask && this.init(e.mask);
|
|
638
|
+
}
|
|
639
|
+
init(e) {
|
|
640
|
+
this.mask = e;
|
|
641
|
+
}
|
|
642
|
+
destroy() {}
|
|
643
|
+
static test(e) {
|
|
644
|
+
return typeof e == "number";
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
z.extension = f.MaskEffect;
|
|
648
|
+
//#endregion
|
|
649
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/stencil/StencilMask.mjs
|
|
650
|
+
var B = class {
|
|
651
|
+
constructor(e) {
|
|
652
|
+
this.priority = 0, this.pipe = "stencilMask", e?.mask && this.init(e.mask);
|
|
653
|
+
}
|
|
654
|
+
init(e) {
|
|
655
|
+
this.mask = e, this.mask.includeInBuild = !1, this.mask.measurable = !1;
|
|
656
|
+
}
|
|
657
|
+
reset() {
|
|
658
|
+
this.mask !== null && (this.mask.measurable = !0, this.mask.includeInBuild = !0, this.mask = null);
|
|
659
|
+
}
|
|
660
|
+
addBounds(e, t) {
|
|
661
|
+
F(this.mask, e, t);
|
|
662
|
+
}
|
|
663
|
+
addLocalBounds(e, t) {
|
|
664
|
+
I(this.mask, e, t);
|
|
665
|
+
}
|
|
666
|
+
containsPoint(e, t) {
|
|
667
|
+
let n = this.mask;
|
|
668
|
+
return t(n, e);
|
|
669
|
+
}
|
|
670
|
+
destroy() {
|
|
671
|
+
this.reset();
|
|
672
|
+
}
|
|
673
|
+
static test(e) {
|
|
674
|
+
return e instanceof n;
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
B.extension = f.MaskEffect;
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/browser/detectVideoAlphaMode.mjs
|
|
680
|
+
var V;
|
|
681
|
+
async function me() {
|
|
682
|
+
return V ??= (async () => {
|
|
683
|
+
let e = x.get().createCanvas(1, 1).getContext("webgl");
|
|
684
|
+
if (!e) return "premultiply-alpha-on-upload";
|
|
685
|
+
let t = await new Promise((e) => {
|
|
686
|
+
let t = document.createElement("video");
|
|
687
|
+
t.onloadeddata = () => e(t), t.onerror = () => e(null), t.autoplay = !1, t.crossOrigin = "anonymous", t.preload = "auto", t.src = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=", t.load();
|
|
688
|
+
});
|
|
689
|
+
if (!t) return "premultiply-alpha-on-upload";
|
|
690
|
+
let n = e.createTexture();
|
|
691
|
+
e.bindTexture(e.TEXTURE_2D, n);
|
|
692
|
+
let r = e.createFramebuffer();
|
|
693
|
+
e.bindFramebuffer(e.FRAMEBUFFER, r), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, n, 0), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.NONE), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t);
|
|
694
|
+
let i = new Uint8Array(4);
|
|
695
|
+
return e.readPixels(0, 0, 1, 1, e.RGBA, e.UNSIGNED_BYTE, i), e.deleteFramebuffer(r), e.deleteTexture(n), e.getExtension("WEBGL_lose_context")?.loseContext(), i[0] <= i[3] ? "premultiplied-alpha" : "premultiply-alpha-on-upload";
|
|
696
|
+
})(), V;
|
|
697
|
+
}
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/VideoSource.mjs
|
|
700
|
+
var H = class t extends e {
|
|
701
|
+
constructor(e) {
|
|
702
|
+
super(e), this.isReady = !1, this.uploadMethodId = "video", e = {
|
|
703
|
+
...t.defaultOptions,
|
|
704
|
+
...e
|
|
705
|
+
}, this._autoUpdate = !0, this._isConnectedToTicker = !1, this._updateFPS = e.updateFPS || 0, this._msToNextUpdate = 0, this.autoPlay = e.autoPlay !== !1, this.alphaMode = e.alphaMode ?? "premultiply-alpha-on-upload", this._videoFrameRequestCallback = this._videoFrameRequestCallback.bind(this), this._videoFrameRequestCallbackHandle = null, this._load = null, this._resolve = null, this._reject = null, this._onCanPlay = this._onCanPlay.bind(this), this._onCanPlayThrough = this._onCanPlayThrough.bind(this), this._onError = this._onError.bind(this), this._onPlayStart = this._onPlayStart.bind(this), this._onPlayStop = this._onPlayStop.bind(this), this._onSeeked = this._onSeeked.bind(this), this._onLoadedMetadata = this._onLoadedMetadata.bind(this), e.autoLoad !== !1 && this.load();
|
|
706
|
+
}
|
|
707
|
+
updateFrame() {
|
|
708
|
+
if (!this.destroyed) {
|
|
709
|
+
if (this._updateFPS) {
|
|
710
|
+
let e = b.shared.elapsedMS * this.resource.playbackRate;
|
|
711
|
+
this._msToNextUpdate = Math.floor(this._msToNextUpdate - e);
|
|
712
|
+
}
|
|
713
|
+
(!this._updateFPS || this._msToNextUpdate <= 0) && (this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0), this.isValid && this.update();
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
_videoFrameRequestCallback() {
|
|
717
|
+
this.updateFrame(), this.destroyed ? this._videoFrameRequestCallbackHandle = null : this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback);
|
|
718
|
+
}
|
|
719
|
+
get isValid() {
|
|
720
|
+
return !!this.resource.videoWidth && !!this.resource.videoHeight;
|
|
721
|
+
}
|
|
722
|
+
async load() {
|
|
723
|
+
if (this._load) return this._load;
|
|
724
|
+
let e = this.resource, t = this.options;
|
|
725
|
+
return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0), e.addEventListener("play", this._onPlayStart), e.addEventListener("pause", this._onPlayStop), e.addEventListener("seeked", this._onSeeked), this._isSourceReady() ? this._mediaReady() : (t.preload || e.addEventListener("canplay", this._onCanPlay), e.addEventListener("canplaythrough", this._onCanPlayThrough), e.addEventListener("error", this._onError, !0)), this.isValid || e.addEventListener("loadedmetadata", this._onLoadedMetadata), this.alphaMode = await me(), this._load = new Promise((n, r) => {
|
|
726
|
+
this.isValid ? n(this) : (this._resolve = n, this._reject = r, t.preloadTimeoutMs !== void 0 && (this._preloadTimeout = setTimeout(() => {
|
|
727
|
+
this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`));
|
|
728
|
+
})), e.load());
|
|
729
|
+
}), this._load;
|
|
730
|
+
}
|
|
731
|
+
_onError(e) {
|
|
732
|
+
this.resource.removeEventListener("error", this._onError, !0), this.emit("error", e), this._reject && (this._reject(e), this._reject = null, this._resolve = null);
|
|
733
|
+
}
|
|
734
|
+
_isSourcePlaying() {
|
|
735
|
+
let e = this.resource;
|
|
736
|
+
return !e.paused && !e.ended;
|
|
737
|
+
}
|
|
738
|
+
_isSourceReady() {
|
|
739
|
+
return this.resource.readyState > 2;
|
|
740
|
+
}
|
|
741
|
+
_onPlayStart() {
|
|
742
|
+
this._configureAutoUpdate();
|
|
743
|
+
}
|
|
744
|
+
_onPlayStop() {
|
|
745
|
+
this._configureAutoUpdate();
|
|
746
|
+
}
|
|
747
|
+
_onSeeked() {
|
|
748
|
+
this._autoUpdate && !this._isSourcePlaying() && (this._msToNextUpdate = 0, this.updateFrame(), this._msToNextUpdate = 0);
|
|
749
|
+
}
|
|
750
|
+
_onLoadedMetadata() {
|
|
751
|
+
this.isValid && this._mediaReady();
|
|
752
|
+
}
|
|
753
|
+
_onCanPlay() {
|
|
754
|
+
this.resource.removeEventListener("canplay", this._onCanPlay), this._mediaReady();
|
|
755
|
+
}
|
|
756
|
+
_onCanPlayThrough() {
|
|
757
|
+
this.resource.removeEventListener("canplaythrough", this._onCanPlayThrough), this._preloadTimeout &&= (clearTimeout(this._preloadTimeout), void 0), this._mediaReady();
|
|
758
|
+
}
|
|
759
|
+
_mediaReady() {
|
|
760
|
+
let e = this.resource;
|
|
761
|
+
this.isValid && (this.isReady = !0, this.resize(e.videoWidth, e.videoHeight)), this._msToNextUpdate = 0, this.updateFrame(), this._msToNextUpdate = 0, this._resolve && this.isValid && (this._resolve(this), this._resolve = null, this._reject = null), this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && this.resource.play();
|
|
762
|
+
}
|
|
763
|
+
destroy() {
|
|
764
|
+
this._configureAutoUpdate();
|
|
765
|
+
let e = this.resource;
|
|
766
|
+
e && (e.removeEventListener("play", this._onPlayStart), e.removeEventListener("pause", this._onPlayStop), e.removeEventListener("seeked", this._onSeeked), e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlayThrough), e.removeEventListener("loadedmetadata", this._onLoadedMetadata), e.removeEventListener("error", this._onError, !0), e.pause(), e.src = "", e.load()), super.destroy();
|
|
767
|
+
}
|
|
768
|
+
get autoUpdate() {
|
|
769
|
+
return this._autoUpdate;
|
|
770
|
+
}
|
|
771
|
+
set autoUpdate(e) {
|
|
772
|
+
e !== this._autoUpdate && (this._autoUpdate = e, this._configureAutoUpdate());
|
|
773
|
+
}
|
|
774
|
+
get updateFPS() {
|
|
775
|
+
return this._updateFPS;
|
|
776
|
+
}
|
|
777
|
+
set updateFPS(e) {
|
|
778
|
+
e !== this._updateFPS && (this._updateFPS = e, this._configureAutoUpdate());
|
|
779
|
+
}
|
|
780
|
+
_configureAutoUpdate() {
|
|
781
|
+
this._autoUpdate && this._isSourcePlaying() ? !this._updateFPS && this.resource.requestVideoFrameCallback ? (this._isConnectedToTicker && (b.shared.remove(this.updateFrame, this), this._isConnectedToTicker = !1, this._msToNextUpdate = 0), this._videoFrameRequestCallbackHandle === null && (this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle), this._videoFrameRequestCallbackHandle = null), this._isConnectedToTicker || (b.shared.add(this.updateFrame, this), this._isConnectedToTicker = !0, this._msToNextUpdate = 0)) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle), this._videoFrameRequestCallbackHandle = null), this._isConnectedToTicker && (b.shared.remove(this.updateFrame, this), this._isConnectedToTicker = !1, this._msToNextUpdate = 0));
|
|
782
|
+
}
|
|
783
|
+
static test(e) {
|
|
784
|
+
return globalThis.HTMLVideoElement && e instanceof HTMLVideoElement;
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
H.extension = f.TextureSource, H.defaultOptions = {
|
|
788
|
+
...e.defaultOptions,
|
|
789
|
+
autoLoad: !0,
|
|
790
|
+
autoPlay: !0,
|
|
791
|
+
updateFPS: 0,
|
|
792
|
+
crossorigin: !0,
|
|
793
|
+
loop: !1,
|
|
794
|
+
muted: !0,
|
|
795
|
+
playsinline: !0,
|
|
796
|
+
preload: !1
|
|
797
|
+
}, H.MIME_TYPES = {
|
|
798
|
+
ogv: "video/ogg",
|
|
799
|
+
mov: "video/quicktime",
|
|
800
|
+
m4v: "video/mp4"
|
|
801
|
+
};
|
|
802
|
+
var he = H, U = new class {
|
|
803
|
+
constructor() {
|
|
804
|
+
this._parsers = [], this._cache = /* @__PURE__ */ new Map(), this._cacheMap = /* @__PURE__ */ new Map();
|
|
805
|
+
}
|
|
806
|
+
reset() {
|
|
807
|
+
this._cacheMap.clear(), this._cache.clear();
|
|
808
|
+
}
|
|
809
|
+
has(e) {
|
|
810
|
+
return this._cache.has(e);
|
|
811
|
+
}
|
|
812
|
+
get(e) {
|
|
813
|
+
let t = this._cache.get(e);
|
|
814
|
+
return t || o(`[Assets] Asset id ${e} was not found in the Cache`), t;
|
|
815
|
+
}
|
|
816
|
+
set(e, t) {
|
|
817
|
+
let n = E(e), r;
|
|
818
|
+
for (let e = 0; e < this.parsers.length; e++) {
|
|
819
|
+
let i = this.parsers[e];
|
|
820
|
+
if (i.test(t)) {
|
|
821
|
+
r = i.getCacheableAssets(n, t);
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
let i = new Map(Object.entries(r || {}));
|
|
826
|
+
r || n.forEach((e) => {
|
|
827
|
+
i.set(e, t);
|
|
828
|
+
});
|
|
829
|
+
let a = [...i.keys()], s = {
|
|
830
|
+
cacheKeys: a,
|
|
831
|
+
keys: n
|
|
832
|
+
};
|
|
833
|
+
n.forEach((e) => {
|
|
834
|
+
this._cacheMap.set(e, s);
|
|
835
|
+
}), a.forEach((e) => {
|
|
836
|
+
let n = r ? r[e] : t;
|
|
837
|
+
this._cache.has(e) && this._cache.get(e) !== n && o("[Cache] already has key:", e), this._cache.set(e, i.get(e));
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
remove(e) {
|
|
841
|
+
if (!this._cacheMap.has(e)) {
|
|
842
|
+
o(`[Assets] Asset id ${e} was not found in the Cache`);
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
let t = this._cacheMap.get(e);
|
|
846
|
+
t.cacheKeys.forEach((e) => {
|
|
847
|
+
this._cache.delete(e);
|
|
848
|
+
}), t.keys.forEach((e) => {
|
|
849
|
+
this._cacheMap.delete(e);
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
get parsers() {
|
|
853
|
+
return this._parsers;
|
|
854
|
+
}
|
|
855
|
+
}(), W = [];
|
|
856
|
+
v.handleByList(f.TextureSource, W);
|
|
857
|
+
function G(e = {}) {
|
|
858
|
+
let t = e && e.resource, n = t ? e.resource : e, r = t ? e : { resource: e };
|
|
859
|
+
for (let e = 0; e < W.length; e++) {
|
|
860
|
+
let t = W[e];
|
|
861
|
+
if (t.test(n)) return new t(r);
|
|
862
|
+
}
|
|
863
|
+
throw Error(`Could not find a source type for resource: ${r.resource}`);
|
|
864
|
+
}
|
|
865
|
+
function ge(e = {}, t = !1) {
|
|
866
|
+
let n = e && e.resource, i = n ? e.resource : e, a = n ? e : { resource: e };
|
|
867
|
+
if (!t && U.has(i)) return U.get(i);
|
|
868
|
+
let o = new r({ source: G(a) });
|
|
869
|
+
return o.on("destroy", () => {
|
|
870
|
+
U.has(i) && U.remove(i);
|
|
871
|
+
}), t || U.set(i, o), o;
|
|
872
|
+
}
|
|
873
|
+
function _e(t, n = !1) {
|
|
874
|
+
return typeof t == "string" ? U.get(t) : t instanceof e ? new r({ source: t }) : ge(t, n);
|
|
875
|
+
}
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/init.mjs
|
|
878
|
+
r.from = _e, e.from = G, v.add(R, z, B, he, ie, d, s);
|
|
879
|
+
//#endregion
|
|
880
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getRenderableBounds.mjs
|
|
881
|
+
var K = new h();
|
|
882
|
+
function q(e, t) {
|
|
883
|
+
t.clear();
|
|
884
|
+
let n = t.matrix;
|
|
885
|
+
for (let n = 0; n < e.length; n++) {
|
|
886
|
+
let r = e[n];
|
|
887
|
+
if (r.globalDisplayStatus < 7) continue;
|
|
888
|
+
let i = r.renderGroup ?? r.parentRenderGroup;
|
|
889
|
+
i?.isCachedAsTexture ? t.matrix = K.copyFrom(i.textureOffsetInverseTransform).append(r.worldTransform) : i?._parentCacheAsTextureRenderGroup ? t.matrix = K.copyFrom(i._parentCacheAsTextureRenderGroup.inverseWorldTransform).append(r.groupTransform) : t.matrix = r.worldTransform, t.addBounds(r.bounds);
|
|
890
|
+
}
|
|
891
|
+
return t.matrix = n, t;
|
|
892
|
+
}
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.mjs
|
|
895
|
+
var ve = new a();
|
|
896
|
+
function ye(e, t, n, r, i = !1) {
|
|
897
|
+
let a = ve;
|
|
898
|
+
a.minX = 0, a.minY = 0, a.maxX = e.width / r | 0, a.maxY = e.height / r | 0;
|
|
899
|
+
let o = c.getOptimalTexture(a.width, a.height, r, !1, i);
|
|
900
|
+
return o.source.uploadMethodId = "image", o.source.resource = e, o.source.alphaMode = "premultiply-alpha-on-upload", o.frame.width = t / r, o.frame.height = n / r, o.source.emit("update", o.source), o.updateUvs(), o;
|
|
901
|
+
}
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/filters/CanvasFilterSystem.mjs
|
|
904
|
+
function J(e) {
|
|
905
|
+
return typeof e.getCanvasFilterString == "function";
|
|
906
|
+
}
|
|
907
|
+
var be = class {
|
|
908
|
+
constructor() {
|
|
909
|
+
this.skip = !1, this.useClip = !1, this.filters = null, this.container = null, this.bounds = new a(), this.cssFilterString = "";
|
|
910
|
+
}
|
|
911
|
+
}, Y = class {
|
|
912
|
+
constructor(e) {
|
|
913
|
+
this._filterStack = [], this._filterStackIndex = 0, this._savedStates = [], this._alphaMultiplier = 1, this._warnedFilterTypes = /* @__PURE__ */ new Set(), this.renderer = e;
|
|
914
|
+
}
|
|
915
|
+
push(e) {
|
|
916
|
+
let t = this._pushFilterFrame(), n = e.filterEffect.filters;
|
|
917
|
+
if (t.skip = !1, t.useClip = !1, t.filters = n, t.container = e.container, t.cssFilterString = "", n.every((e) => !e.enabled)) {
|
|
918
|
+
t.skip = !0;
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
let r = [];
|
|
922
|
+
for (let e of n) {
|
|
923
|
+
if (!e.enabled) continue;
|
|
924
|
+
if (!J(e)) {
|
|
925
|
+
this._warnUnsupportedFilter(e);
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
let t = e.getCanvasFilterString();
|
|
929
|
+
if (t === null) {
|
|
930
|
+
this._warnUnsupportedFilter(e);
|
|
931
|
+
continue;
|
|
932
|
+
}
|
|
933
|
+
t && r.push(t);
|
|
934
|
+
}
|
|
935
|
+
if (r.length === 0) {
|
|
936
|
+
t.skip = !0;
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
t.cssFilterString = r.join(" "), this._calculateFilterArea(e, t.bounds), t.useClip = !!e.filterEffect.filterArea;
|
|
940
|
+
let i = this.renderer.canvasContext.activeContext, a = i.filter || "none";
|
|
941
|
+
if (this._savedStates.push({
|
|
942
|
+
filter: a,
|
|
943
|
+
alphaMultiplier: this._alphaMultiplier
|
|
944
|
+
}), t.useClip && Number.isFinite(t.bounds.width) && Number.isFinite(t.bounds.height) && t.bounds.width > 0 && t.bounds.height > 0) {
|
|
945
|
+
let e = this.renderer.canvasContext.activeResolution || 1;
|
|
946
|
+
i.save(), i.setTransform(1, 0, 0, 1, 0, 0), i.beginPath(), i.rect(t.bounds.x * e, t.bounds.y * e, t.bounds.width * e, t.bounds.height * e), i.clip();
|
|
947
|
+
} else t.useClip = !1;
|
|
948
|
+
t.cssFilterString && (i.filter = a === "none" ? t.cssFilterString : `${a} ${t.cssFilterString}`);
|
|
949
|
+
}
|
|
950
|
+
pop() {
|
|
951
|
+
let e = this._popFilterFrame();
|
|
952
|
+
if (e.skip) return;
|
|
953
|
+
let t = this._savedStates.pop();
|
|
954
|
+
if (!t) return;
|
|
955
|
+
let n = this.renderer.canvasContext.activeContext;
|
|
956
|
+
e.useClip ? n.restore() : n.filter = t.filter, this._alphaMultiplier = t.alphaMultiplier;
|
|
957
|
+
}
|
|
958
|
+
generateFilteredTexture({ texture: e, filters: t }) {
|
|
959
|
+
if (!t?.length || t.every((e) => !e.enabled)) return e;
|
|
960
|
+
let n = [];
|
|
961
|
+
for (let e of t) {
|
|
962
|
+
if (!e.enabled) continue;
|
|
963
|
+
if (!J(e)) {
|
|
964
|
+
this._warnUnsupportedFilter(e);
|
|
965
|
+
continue;
|
|
966
|
+
}
|
|
967
|
+
let t = e.getCanvasFilterString();
|
|
968
|
+
if (t === null) {
|
|
969
|
+
this._warnUnsupportedFilter(e);
|
|
970
|
+
continue;
|
|
971
|
+
}
|
|
972
|
+
t && n.push(t);
|
|
973
|
+
}
|
|
974
|
+
if (n.length === 0) return e;
|
|
975
|
+
let r = ae.getCanvasSource(e);
|
|
976
|
+
if (!r) return e;
|
|
977
|
+
let i = e.frame, a = e.source._resolution ?? e.source.resolution ?? 1, o = i.width, s = i.height, { canvas: c, context: l } = oe.getOptimalCanvasAndContext(o, s, a);
|
|
978
|
+
l.setTransform(1, 0, 0, 1, 0, 0), l.clearRect(0, 0, c.width, c.height), n.length && (l.filter = n.join(" "));
|
|
979
|
+
let u = i.x * a, d = i.y * a, f = o * a, p = s * a;
|
|
980
|
+
return l.drawImage(r, u, d, f, p, 0, 0, f, p), l.filter = "none", l.globalAlpha = 1, ye(c, o, s, a);
|
|
981
|
+
}
|
|
982
|
+
_calculateFilterArea(e, t) {
|
|
983
|
+
if (e.renderables ? q(e.renderables, t) : e.filterEffect.filterArea ? (t.clear(), t.addRect(e.filterEffect.filterArea), t.applyMatrix(e.container.worldTransform)) : e.container.getFastGlobalBounds(!0, t), e.container) {
|
|
984
|
+
let n = (e.container.renderGroup || e.container.parentRenderGroup)?.cacheToLocalTransform;
|
|
985
|
+
n && t.applyMatrix(n);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
_warnUnsupportedFilter(e) {
|
|
989
|
+
let t = e?.constructor?.name || "Filter";
|
|
990
|
+
this._warnedFilterTypes.has(t) || (this._warnedFilterTypes.add(t), console.warn(`CanvasRenderer: filter "${t}" is not supported in Canvas2D and will be skipped.`));
|
|
991
|
+
}
|
|
992
|
+
get alphaMultiplier() {
|
|
993
|
+
return this._alphaMultiplier;
|
|
994
|
+
}
|
|
995
|
+
_pushFilterFrame() {
|
|
996
|
+
let e = this._filterStack[this._filterStackIndex];
|
|
997
|
+
return e ||= this._filterStack[this._filterStackIndex] = new be(), this._filterStackIndex++, e;
|
|
998
|
+
}
|
|
999
|
+
_popFilterFrame() {
|
|
1000
|
+
return this._filterStackIndex <= 0 ? this._filterStack[0] : (this._filterStackIndex--, this._filterStack[this._filterStackIndex]);
|
|
1001
|
+
}
|
|
1002
|
+
destroy() {
|
|
1003
|
+
this._filterStack = null, this._savedStates = null, this._warnedFilterTypes = null, this._alphaMultiplier = 1;
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
Y.extension = {
|
|
1007
|
+
type: [f.CanvasSystem],
|
|
1008
|
+
name: "filter"
|
|
1009
|
+
};
|
|
1010
|
+
//#endregion
|
|
1011
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/filters/FilterPipe.mjs
|
|
1012
|
+
var X = class {
|
|
1013
|
+
constructor(e) {
|
|
1014
|
+
this._renderer = e;
|
|
1015
|
+
}
|
|
1016
|
+
push(e, t, n) {
|
|
1017
|
+
this._renderer.renderPipes.batch.break(n), n.add({
|
|
1018
|
+
renderPipeId: "filter",
|
|
1019
|
+
canBundle: !1,
|
|
1020
|
+
action: "pushFilter",
|
|
1021
|
+
container: t,
|
|
1022
|
+
filterEffect: e
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
pop(e, t, n) {
|
|
1026
|
+
this._renderer.renderPipes.batch.break(n), n.add({
|
|
1027
|
+
renderPipeId: "filter",
|
|
1028
|
+
action: "popFilter",
|
|
1029
|
+
canBundle: !1
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
execute(e) {
|
|
1033
|
+
e.action === "pushFilter" ? this._renderer.filter.push(e) : e.action === "popFilter" && this._renderer.filter.pop();
|
|
1034
|
+
}
|
|
1035
|
+
destroy() {
|
|
1036
|
+
this._renderer = null;
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
X.extension = {
|
|
1040
|
+
type: [
|
|
1041
|
+
f.WebGLPipes,
|
|
1042
|
+
f.WebGPUPipes,
|
|
1043
|
+
f.CanvasPipes
|
|
1044
|
+
],
|
|
1045
|
+
name: "filter"
|
|
1046
|
+
};
|
|
1047
|
+
//#endregion
|
|
1048
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/filters/defaults/defaultFilter.vert.mjs
|
|
1049
|
+
var Z = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", xe = "in vec2 vTextureCoord;\nout vec4 finalColor;\nuniform sampler2D uTexture;\nvoid main() {\n finalColor = texture(uTexture, vTextureCoord);\n}\n", Q = "struct GlobalFilterUniforms {\n uInputSize: vec4<f32>,\n uInputPixel: vec4<f32>,\n uInputClamp: vec4<f32>,\n uOutputFrame: vec4<f32>,\n uGlobalFrame: vec4<f32>,\n uOutputTexture: vec4<f32>,\n};\n\n@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\n@group(0) @binding(2) var uSampler: sampler;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>\n};\n\nfn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\n@vertex\nfn mainVertex(\n @location(0) aPosition: vec2<f32>,\n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n) -> @location(0) vec4<f32> {\n return textureSample(uTexture, uSampler, uv);\n}\n", Se = class extends _ {
|
|
1050
|
+
constructor() {
|
|
1051
|
+
let e = g.from({
|
|
1052
|
+
vertex: {
|
|
1053
|
+
source: Q,
|
|
1054
|
+
entryPoint: "mainVertex"
|
|
1055
|
+
},
|
|
1056
|
+
fragment: {
|
|
1057
|
+
source: Q,
|
|
1058
|
+
entryPoint: "mainFragment"
|
|
1059
|
+
},
|
|
1060
|
+
name: "passthrough-filter"
|
|
1061
|
+
}), t = ee.from({
|
|
1062
|
+
vertex: Z,
|
|
1063
|
+
fragment: xe,
|
|
1064
|
+
name: "passthrough-filter"
|
|
1065
|
+
});
|
|
1066
|
+
super({
|
|
1067
|
+
gpuProgram: e,
|
|
1068
|
+
glProgram: t
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
}, Ce = new te({
|
|
1072
|
+
attributes: { aPosition: {
|
|
1073
|
+
buffer: new Float32Array([
|
|
1074
|
+
0,
|
|
1075
|
+
0,
|
|
1076
|
+
1,
|
|
1077
|
+
0,
|
|
1078
|
+
1,
|
|
1079
|
+
1,
|
|
1080
|
+
0,
|
|
1081
|
+
1
|
|
1082
|
+
]),
|
|
1083
|
+
format: "float32x2",
|
|
1084
|
+
stride: 8,
|
|
1085
|
+
offset: 0
|
|
1086
|
+
} },
|
|
1087
|
+
indexBuffer: new Uint32Array([
|
|
1088
|
+
0,
|
|
1089
|
+
1,
|
|
1090
|
+
2,
|
|
1091
|
+
0,
|
|
1092
|
+
2,
|
|
1093
|
+
3
|
|
1094
|
+
])
|
|
1095
|
+
}), we = class {
|
|
1096
|
+
constructor() {
|
|
1097
|
+
this.skip = !1, this.inputTexture = null, this.backTexture = null, this.filters = null, this.bounds = new a(), this.container = null, this.blendRequired = !1, this.outputRenderSurface = null, this.globalFrame = {
|
|
1098
|
+
x: 0,
|
|
1099
|
+
y: 0,
|
|
1100
|
+
width: 0,
|
|
1101
|
+
height: 0
|
|
1102
|
+
}, this.firstEnabledIndex = -1, this.lastEnabledIndex = -1;
|
|
1103
|
+
}
|
|
1104
|
+
}, $ = class {
|
|
1105
|
+
constructor(e) {
|
|
1106
|
+
this._filterStackIndex = 0, this._filterStack = [], this._filterGlobalUniforms = new p({
|
|
1107
|
+
uInputSize: {
|
|
1108
|
+
value: new Float32Array(4),
|
|
1109
|
+
type: "vec4<f32>"
|
|
1110
|
+
},
|
|
1111
|
+
uInputPixel: {
|
|
1112
|
+
value: new Float32Array(4),
|
|
1113
|
+
type: "vec4<f32>"
|
|
1114
|
+
},
|
|
1115
|
+
uInputClamp: {
|
|
1116
|
+
value: new Float32Array(4),
|
|
1117
|
+
type: "vec4<f32>"
|
|
1118
|
+
},
|
|
1119
|
+
uOutputFrame: {
|
|
1120
|
+
value: new Float32Array(4),
|
|
1121
|
+
type: "vec4<f32>"
|
|
1122
|
+
},
|
|
1123
|
+
uGlobalFrame: {
|
|
1124
|
+
value: new Float32Array(4),
|
|
1125
|
+
type: "vec4<f32>"
|
|
1126
|
+
},
|
|
1127
|
+
uOutputTexture: {
|
|
1128
|
+
value: new Float32Array(4),
|
|
1129
|
+
type: "vec4<f32>"
|
|
1130
|
+
}
|
|
1131
|
+
}), this._globalFilterBindGroup = new m({}), this.renderer = e;
|
|
1132
|
+
}
|
|
1133
|
+
get activeBackTexture() {
|
|
1134
|
+
return this._activeFilterData?.backTexture;
|
|
1135
|
+
}
|
|
1136
|
+
push(e) {
|
|
1137
|
+
let t = this.renderer, n = e.filterEffect.filters, r = this._pushFilterData();
|
|
1138
|
+
r.skip = !1, r.filters = n, r.container = e.container, r.outputRenderSurface = t.renderTarget.renderSurface;
|
|
1139
|
+
let i = t.renderTarget.renderTarget.colorTexture.source, a = i.resolution, o = i.antialias;
|
|
1140
|
+
if (n.every((e) => !e.enabled)) {
|
|
1141
|
+
r.skip = !0;
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
let s = r.bounds;
|
|
1145
|
+
if (this._calculateFilterArea(e, s), this._calculateFilterBounds(r, t.renderTarget.rootViewPort, o, a, 1), r.skip) return;
|
|
1146
|
+
let c = this._getPreviousFilterData(), l = this._findFilterResolution(a), u = 0, d = 0;
|
|
1147
|
+
c && (u = c.bounds.minX, d = c.bounds.minY), this._calculateGlobalFrame(r, u, d, l, i.width, i.height), this._setupFilterTextures(r, s, t, c);
|
|
1148
|
+
}
|
|
1149
|
+
generateFilteredTexture({ texture: e, filters: t }) {
|
|
1150
|
+
let n = this._pushFilterData();
|
|
1151
|
+
this._activeFilterData = n, n.skip = !1, n.filters = t;
|
|
1152
|
+
let i = e.source, a = i.resolution, o = i.antialias;
|
|
1153
|
+
if (t.every((e) => !e.enabled)) return n.skip = !0, e;
|
|
1154
|
+
let s = n.bounds;
|
|
1155
|
+
if (s.addRect(e.frame), this._calculateFilterBounds(n, s.rectangle, o, a, 0), n.skip) return e;
|
|
1156
|
+
let l = a;
|
|
1157
|
+
this._calculateGlobalFrame(n, 0, 0, l, i.width, i.height), n.outputRenderSurface = c.getOptimalTexture(s.width, s.height, n.resolution, n.antialias), n.backTexture = r.EMPTY, n.inputTexture = e, this.renderer.renderTarget.finishRenderPass(), this._applyFiltersToTexture(n, !0);
|
|
1158
|
+
let u = n.outputRenderSurface;
|
|
1159
|
+
return u.source.alphaMode = "premultiplied-alpha", u;
|
|
1160
|
+
}
|
|
1161
|
+
pop() {
|
|
1162
|
+
let e = this.renderer, t = this._popFilterData();
|
|
1163
|
+
t.skip || (e.globalUniforms.pop(), e.renderTarget.finishRenderPass(), this._activeFilterData = t, this._applyFiltersToTexture(t, !1), t.blendRequired && c.returnTexture(t.backTexture), c.returnTexture(t.inputTexture));
|
|
1164
|
+
}
|
|
1165
|
+
getBackTexture(e, t, n) {
|
|
1166
|
+
let r = e.colorTexture.source._resolution, i = c.getOptimalTexture(t.width, t.height, r, !1), a = t.minX, o = t.minY;
|
|
1167
|
+
n && (a -= n.minX, o -= n.minY), a = Math.floor(a * r), o = Math.floor(o * r);
|
|
1168
|
+
let s = Math.ceil(t.width * r), l = Math.ceil(t.height * r);
|
|
1169
|
+
return this.renderer.renderTarget.copyToTexture(e, i, {
|
|
1170
|
+
x: a,
|
|
1171
|
+
y: o
|
|
1172
|
+
}, {
|
|
1173
|
+
width: s,
|
|
1174
|
+
height: l
|
|
1175
|
+
}, {
|
|
1176
|
+
x: 0,
|
|
1177
|
+
y: 0
|
|
1178
|
+
}), i;
|
|
1179
|
+
}
|
|
1180
|
+
applyFilter(e, t, n, r) {
|
|
1181
|
+
let i = this.renderer, a = this._activeFilterData, o = a.outputRenderSurface === n, s = i.renderTarget.rootRenderTarget.colorTexture.source._resolution, c = this._findFilterResolution(s), l = 0, u = 0;
|
|
1182
|
+
if (o) {
|
|
1183
|
+
let e = this._findPreviousFilterOffset();
|
|
1184
|
+
l = e.x, u = e.y;
|
|
1185
|
+
}
|
|
1186
|
+
this._updateFilterUniforms(t, n, a, l, u, c, o, r);
|
|
1187
|
+
let d = e.enabled ? e : this._getPassthroughFilter();
|
|
1188
|
+
this._setupBindGroupsAndRender(d, t, i);
|
|
1189
|
+
}
|
|
1190
|
+
calculateSpriteMatrix(e, t) {
|
|
1191
|
+
let n = this._activeFilterData, r = e.set(n.inputTexture._source.width, 0, 0, n.inputTexture._source.height, n.bounds.minX, n.bounds.minY), i = t.worldTransform.copyTo(h.shared), a = t.renderGroup || t.parentRenderGroup;
|
|
1192
|
+
return a && a.cacheToLocalTransform && i.prepend(a.cacheToLocalTransform), i.invert(), r.prepend(i), r.scale(1 / t.texture.orig.width, 1 / t.texture.orig.height), r.translate(t.anchor.x, t.anchor.y), r;
|
|
1193
|
+
}
|
|
1194
|
+
destroy() {
|
|
1195
|
+
this._passthroughFilter?.destroy(!0), this._passthroughFilter = null;
|
|
1196
|
+
}
|
|
1197
|
+
_getPassthroughFilter() {
|
|
1198
|
+
return this._passthroughFilter ??= new Se(), this._passthroughFilter;
|
|
1199
|
+
}
|
|
1200
|
+
_setupBindGroupsAndRender(e, t, n) {
|
|
1201
|
+
if (n.renderPipes.uniformBatch) {
|
|
1202
|
+
let e = n.renderPipes.uniformBatch.getUboResource(this._filterGlobalUniforms);
|
|
1203
|
+
this._globalFilterBindGroup.setResource(e, 0);
|
|
1204
|
+
} else this._globalFilterBindGroup.setResource(this._filterGlobalUniforms, 0);
|
|
1205
|
+
this._globalFilterBindGroup.setResource(t.source, 1), this._globalFilterBindGroup.setResource(t.source.style, 2), e.groups[0] = this._globalFilterBindGroup, n.encoder.draw({
|
|
1206
|
+
geometry: Ce,
|
|
1207
|
+
shader: e,
|
|
1208
|
+
state: e._state,
|
|
1209
|
+
topology: "triangle-list"
|
|
1210
|
+
}), n.type === ne.WEBGL && n.renderTarget.finishRenderPass();
|
|
1211
|
+
}
|
|
1212
|
+
_setupFilterTextures(e, t, n, i) {
|
|
1213
|
+
if (e.backTexture = r.EMPTY, e.inputTexture = c.getOptimalTexture(t.width, t.height, e.resolution, e.antialias), e.blendRequired) {
|
|
1214
|
+
n.renderTarget.finishRenderPass();
|
|
1215
|
+
let r = n.renderTarget.getRenderTarget(e.outputRenderSurface);
|
|
1216
|
+
e.backTexture = this.getBackTexture(r, t, i?.bounds);
|
|
1217
|
+
}
|
|
1218
|
+
n.renderTarget.bind({
|
|
1219
|
+
target: e.inputTexture,
|
|
1220
|
+
clear: !0
|
|
1221
|
+
}), n.globalUniforms.push({ offset: t });
|
|
1222
|
+
}
|
|
1223
|
+
_calculateGlobalFrame(e, t, n, r, i, a) {
|
|
1224
|
+
let o = e.globalFrame;
|
|
1225
|
+
o.x = t * r, o.y = n * r, o.width = i * r, o.height = a * r;
|
|
1226
|
+
}
|
|
1227
|
+
_updateFilterUniforms(e, t, n, i, a, o, s, c) {
|
|
1228
|
+
let l = this._filterGlobalUniforms.uniforms, u = l.uOutputFrame, d = l.uInputSize, f = l.uInputPixel, p = l.uInputClamp, m = l.uGlobalFrame, h = l.uOutputTexture;
|
|
1229
|
+
s ? (u[0] = n.bounds.minX - i, u[1] = n.bounds.minY - a) : (u[0] = 0, u[1] = 0), u[2] = e.frame.width, u[3] = e.frame.height, d[0] = e.source.width, d[1] = e.source.height, d[2] = 1 / d[0], d[3] = 1 / d[1], f[0] = e.source.pixelWidth, f[1] = e.source.pixelHeight, f[2] = 1 / f[0], f[3] = 1 / f[1], p[0] = .5 * f[2], p[1] = .5 * f[3], p[2] = e.frame.width * d[2] - .5 * f[2], p[3] = e.frame.height * d[3] - .5 * f[3];
|
|
1230
|
+
let g = this.renderer.renderTarget.rootRenderTarget.colorTexture;
|
|
1231
|
+
m[0] = i * o, m[1] = a * o, m[2] = g.source.width * o, m[3] = g.source.height * o, t instanceof r && (t.source.resource = null);
|
|
1232
|
+
let _ = this.renderer.renderTarget.getRenderTarget(t);
|
|
1233
|
+
this.renderer.renderTarget.bind({
|
|
1234
|
+
target: t,
|
|
1235
|
+
clear: !!c
|
|
1236
|
+
}), t instanceof r ? (h[0] = t.frame.width, h[1] = t.frame.height) : (h[0] = _.width, h[1] = _.height), h[2] = _.isRoot ? -1 : 1, this._filterGlobalUniforms.update();
|
|
1237
|
+
}
|
|
1238
|
+
_findFilterResolution(e) {
|
|
1239
|
+
let t = this._filterStackIndex - 1;
|
|
1240
|
+
for (; t > 0 && this._filterStack[t].skip;) --t;
|
|
1241
|
+
return t > 0 && this._filterStack[t].inputTexture ? this._filterStack[t].inputTexture.source._resolution : e;
|
|
1242
|
+
}
|
|
1243
|
+
_findPreviousFilterOffset() {
|
|
1244
|
+
let e = 0, t = 0, n = this._filterStackIndex;
|
|
1245
|
+
for (; n > 0;) {
|
|
1246
|
+
n--;
|
|
1247
|
+
let r = this._filterStack[n];
|
|
1248
|
+
if (!r.skip) {
|
|
1249
|
+
e = r.bounds.minX, t = r.bounds.minY;
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return {
|
|
1254
|
+
x: e,
|
|
1255
|
+
y: t
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
_calculateFilterArea(e, t) {
|
|
1259
|
+
if (e.renderables ? q(e.renderables, t) : e.filterEffect.filterArea ? (t.clear(), t.addRect(e.filterEffect.filterArea), t.applyMatrix(e.container.worldTransform)) : e.container.getFastGlobalBounds(!0, t), e.container) {
|
|
1260
|
+
let n = (e.container.renderGroup || e.container.parentRenderGroup).cacheToLocalTransform;
|
|
1261
|
+
n && t.applyMatrix(n);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
_applyFiltersToTexture(e, t) {
|
|
1265
|
+
let n = e.inputTexture, r = e.bounds, i = e.filters, a = e.firstEnabledIndex, o = e.lastEnabledIndex;
|
|
1266
|
+
if (this._globalFilterBindGroup.setResource(n.source.style, 2), this._globalFilterBindGroup.setResource(e.backTexture.source, 3), a === o) i[a].apply(this, n, e.outputRenderSurface, t);
|
|
1267
|
+
else {
|
|
1268
|
+
let n = e.inputTexture, s = c.getOptimalTexture(r.width, r.height, n.source._resolution, !1), l = s;
|
|
1269
|
+
for (let e = a; e < o; e++) {
|
|
1270
|
+
let t = i[e];
|
|
1271
|
+
if (!t.enabled) continue;
|
|
1272
|
+
t.apply(this, n, l, !0);
|
|
1273
|
+
let r = n;
|
|
1274
|
+
n = l, l = r;
|
|
1275
|
+
}
|
|
1276
|
+
i[o].apply(this, n, e.outputRenderSurface, t), c.returnTexture(s);
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
_calculateFilterBounds(e, t, n, r, i) {
|
|
1280
|
+
let a = this.renderer, s = e.bounds, c = e.filters, l = Infinity, u = 0, d = !0, f = !1, p = !1, m = !0, h = -1, g = -1;
|
|
1281
|
+
for (let e = 0; e < c.length; e++) {
|
|
1282
|
+
let t = c[e];
|
|
1283
|
+
if (t.enabled) {
|
|
1284
|
+
if (h === -1 && (h = e), g = e, l = Math.min(l, t.resolution === "inherit" ? r : t.resolution), u += t.padding, t.antialias === "off" ? d = !1 : t.antialias === "inherit" && (d &&= n), t.clipToViewport || (m = !1), !(t.compatibleRenderers & a.type)) {
|
|
1285
|
+
p = !1;
|
|
1286
|
+
break;
|
|
1287
|
+
}
|
|
1288
|
+
if (t.blendRequired && !(a.backBuffer?.useBackBuffer ?? !0)) {
|
|
1289
|
+
o("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."), p = !1;
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
p = !0, f ||= t.blendRequired;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
if (!p) {
|
|
1296
|
+
e.skip = !0;
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
if (m && s.fitBounds(0, t.width / r, 0, t.height / r), s.scale(l).ceil().scale(1 / l).pad((u | 0) * i), !s.isPositive) {
|
|
1300
|
+
e.skip = !0;
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
e.antialias = d, e.resolution = l, e.blendRequired = f, e.firstEnabledIndex = h, e.lastEnabledIndex = g;
|
|
1304
|
+
}
|
|
1305
|
+
_popFilterData() {
|
|
1306
|
+
return this._filterStackIndex--, this._filterStack[this._filterStackIndex];
|
|
1307
|
+
}
|
|
1308
|
+
_getPreviousFilterData() {
|
|
1309
|
+
let e, t = this._filterStackIndex - 1;
|
|
1310
|
+
for (; t > 0 && (t--, e = this._filterStack[t], e.skip););
|
|
1311
|
+
return e;
|
|
1312
|
+
}
|
|
1313
|
+
_pushFilterData() {
|
|
1314
|
+
let e = this._filterStack[this._filterStackIndex];
|
|
1315
|
+
return e ||= this._filterStack[this._filterStackIndex] = new we(), this._filterStackIndex++, e;
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
$.extension = {
|
|
1319
|
+
type: [f.WebGLSystem, f.WebGPUSystem],
|
|
1320
|
+
name: "filter"
|
|
1321
|
+
};
|
|
1322
|
+
//#endregion
|
|
1323
|
+
export { Y as i, Z as n, X as r, $ as t };
|