@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,2889 @@
|
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, H as a, J as o, K as s, L as c, Q as l, T as u, U as d, W as f, X as p, Y as m, _ as h, at as g, c as _, d as v, et as y, f as b, h as ee, i as te, it as ne, j as re, m as ie, n as ae, o as oe, ot as x, q as se, r as S, rt as C, s as ce, t as le, tt as ue, u as w, v as de, w as fe, x as pe, y as me, z as he } from "./Geometry-C5s5KpWq.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/CustomRenderPipe.mjs
|
|
3
|
+
var ge = class {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
this._renderer = e;
|
|
6
|
+
}
|
|
7
|
+
updateRenderable() {}
|
|
8
|
+
destroyRenderable() {}
|
|
9
|
+
validateRenderable() {
|
|
10
|
+
return !1;
|
|
11
|
+
}
|
|
12
|
+
addRenderable(e, t) {
|
|
13
|
+
this._renderer.renderPipes.batch.break(t), t.add(e);
|
|
14
|
+
}
|
|
15
|
+
execute(e) {
|
|
16
|
+
e.isRenderable && e.render(this._renderer);
|
|
17
|
+
}
|
|
18
|
+
destroy() {
|
|
19
|
+
this._renderer = null;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
ge.extension = {
|
|
23
|
+
type: [
|
|
24
|
+
g.WebGLPipes,
|
|
25
|
+
g.WebGPUPipes,
|
|
26
|
+
g.CanvasPipes
|
|
27
|
+
],
|
|
28
|
+
name: "customRender"
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/sprite/BatchableSprite.mjs
|
|
32
|
+
var _e = class {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.batcherName = "default", this.topology = "triangle-list", this.attributeSize = 4, this.indexSize = 6, this.packAsQuad = !0, this.roundPixels = 0, this._attributeStart = 0, this._batcher = null, this._batch = null;
|
|
35
|
+
}
|
|
36
|
+
get blendMode() {
|
|
37
|
+
return this.renderable.groupBlendMode;
|
|
38
|
+
}
|
|
39
|
+
get color() {
|
|
40
|
+
return this.renderable.groupColorAlpha;
|
|
41
|
+
}
|
|
42
|
+
reset() {
|
|
43
|
+
this.renderable = null, this.texture = null, this._batcher = null, this._batch = null, this.bounds = null;
|
|
44
|
+
}
|
|
45
|
+
destroy() {
|
|
46
|
+
this.reset();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/executeInstructions.mjs
|
|
51
|
+
function ve(e, t) {
|
|
52
|
+
let n = e.instructionSet, r = n.instructions;
|
|
53
|
+
for (let e = 0; e < n.instructionSize; e++) {
|
|
54
|
+
let n = r[e];
|
|
55
|
+
t[n.renderPipeId].execute(n);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/RenderGroupPipe.mjs
|
|
60
|
+
var ye = class {
|
|
61
|
+
constructor(e) {
|
|
62
|
+
this._renderer = e;
|
|
63
|
+
}
|
|
64
|
+
addRenderGroup(e, t) {
|
|
65
|
+
e.isCachedAsTexture ? this._addRenderableCacheAsTexture(e, t) : this._addRenderableDirect(e, t);
|
|
66
|
+
}
|
|
67
|
+
execute(e) {
|
|
68
|
+
e.isRenderable && (e.isCachedAsTexture ? this._executeCacheAsTexture(e) : this._executeDirect(e));
|
|
69
|
+
}
|
|
70
|
+
destroy() {
|
|
71
|
+
this._renderer = null;
|
|
72
|
+
}
|
|
73
|
+
_addRenderableDirect(e, t) {
|
|
74
|
+
this._renderer.renderPipes.batch.break(t), e._batchableRenderGroup &&= (s.return(e._batchableRenderGroup), null), t.add(e);
|
|
75
|
+
}
|
|
76
|
+
_addRenderableCacheAsTexture(e, t) {
|
|
77
|
+
let n = e._batchableRenderGroup ??= s.get(_e);
|
|
78
|
+
n.renderable = e.root, n.transform = e.root.relativeGroupTransform, n.texture = e.texture, n.bounds = e._textureBounds, t.add(e), this._renderer.renderPipes.blendMode.pushBlendMode(e, e.root.groupBlendMode, t), this._renderer.renderPipes.batch.addToBatch(n, t), this._renderer.renderPipes.blendMode.popBlendMode(t);
|
|
79
|
+
}
|
|
80
|
+
_executeCacheAsTexture(e) {
|
|
81
|
+
if (e.textureNeedsUpdate) {
|
|
82
|
+
e.textureNeedsUpdate = !1;
|
|
83
|
+
let t = new y().translate(-e._textureBounds.x, -e._textureBounds.y);
|
|
84
|
+
this._renderer.renderTarget.push({
|
|
85
|
+
target: e.texture,
|
|
86
|
+
clear: !0,
|
|
87
|
+
frame: e.texture.frame
|
|
88
|
+
}), this._renderer.globalUniforms.push({
|
|
89
|
+
worldTransformMatrix: t,
|
|
90
|
+
worldColor: 4294967295,
|
|
91
|
+
offset: {
|
|
92
|
+
x: 0,
|
|
93
|
+
y: 0
|
|
94
|
+
}
|
|
95
|
+
}), ve(e, this._renderer.renderPipes), this._renderer.renderTarget.finishRenderPass(), this._renderer.renderTarget.pop(), this._renderer.globalUniforms.pop();
|
|
96
|
+
}
|
|
97
|
+
e._batchableRenderGroup._batcher.updateElement(e._batchableRenderGroup), e._batchableRenderGroup._batcher.geometry.buffers[0].update();
|
|
98
|
+
}
|
|
99
|
+
_executeDirect(e) {
|
|
100
|
+
this._renderer.globalUniforms.push({
|
|
101
|
+
worldTransformMatrix: e.inverseParentTextureTransform,
|
|
102
|
+
worldColor: e.worldColorAlpha
|
|
103
|
+
}), ve(e, this._renderer.renderPipes), this._renderer.globalUniforms.pop();
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
ye.extension = {
|
|
107
|
+
type: [
|
|
108
|
+
g.WebGLPipes,
|
|
109
|
+
g.WebGPUPipes,
|
|
110
|
+
g.CanvasPipes
|
|
111
|
+
],
|
|
112
|
+
name: "renderGroup"
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region ../../node_modules/.pnpm/earcut@3.2.3/node_modules/earcut/src/earcut.js
|
|
116
|
+
var T = /* @__PURE__ */ new Set(), be = !1;
|
|
117
|
+
function xe(e, t, n = 2) {
|
|
118
|
+
let r = t && t.length, i = r ? t[0] * n : e.length;
|
|
119
|
+
T.size && T.clear();
|
|
120
|
+
let a = Se(e, 0, i, n, !0), o = [];
|
|
121
|
+
if (!a || a.next === a.prev) return o;
|
|
122
|
+
let s = 0, c = 0, l = 0;
|
|
123
|
+
if (r && (a = ke(e, t, a, n)), e.length > 80 * n) {
|
|
124
|
+
s = e[0], c = e[1];
|
|
125
|
+
let t = s, r = c;
|
|
126
|
+
for (let a = n; a < i; a += n) {
|
|
127
|
+
let n = e[a], i = e[a + 1];
|
|
128
|
+
n < s && (s = n), i < c && (c = i), n > t && (t = n), i > r && (r = i);
|
|
129
|
+
}
|
|
130
|
+
l = Math.max(t - s, r - c), l = l === 0 ? 0 : 32767 / l;
|
|
131
|
+
}
|
|
132
|
+
return Ce(a, o, s, c, l), o;
|
|
133
|
+
}
|
|
134
|
+
function Se(e, t, n, r, i) {
|
|
135
|
+
let a = null;
|
|
136
|
+
if (i === $e(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = Ze(i / r | 0, e[i], e[i + 1], a);
|
|
137
|
+
else for (let i = n - r; i >= t; i -= r) a = Ze(i / r | 0, e[i], e[i + 1], a);
|
|
138
|
+
return a && L(a, a.next) && (B(a), a = a.next), a;
|
|
139
|
+
}
|
|
140
|
+
function E(e, t = e) {
|
|
141
|
+
let n = t === e, r = e, i;
|
|
142
|
+
do
|
|
143
|
+
i = !1, r !== r.next && (T.size === 0 || !T.has(r)) && (L(r, r.next) || I(r.prev, r, r.next) === 0) ? ((n || r === t) && (t = r.prev), be = !0, B(r), r = r.prev, i = !0) : (n || r !== t) && (r = r.next, i = !n);
|
|
144
|
+
while (i || r !== t);
|
|
145
|
+
return t;
|
|
146
|
+
}
|
|
147
|
+
function Ce(e, t, n, r, i) {
|
|
148
|
+
i && He(e, n, r, i);
|
|
149
|
+
let a = e, o = !1;
|
|
150
|
+
for (; e.prev !== e.next;) {
|
|
151
|
+
let s = e.prev, c = e.next;
|
|
152
|
+
if (I(s, e, c) < 0 && (i ? Te(e, n, r, i) : we(e))) {
|
|
153
|
+
t.push(s.i, e.i, c.i), B(e), e = c, a = c;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (e = c, e === a) {
|
|
157
|
+
if (be = !1, e = E(e), be) {
|
|
158
|
+
a = e;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (!o) {
|
|
162
|
+
e = Ee(e, t), a = e, o = !0;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
De(e, t, n, r, i);
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function we(e) {
|
|
171
|
+
let t = e.prev, n = e, r = e.next, i = t.x, a = n.x, o = r.x, s = t.y, c = n.y, l = r.y, u = Math.min(i, a, o), d = Math.min(s, c, l), f = Math.max(i, a, o), p = Math.max(s, c, l), m = r.next;
|
|
172
|
+
for (; m !== t;) {
|
|
173
|
+
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && !(i === m.x && s === m.y) && F(i, s, a, c, o, l, m.x, m.y) && I(m.prev, m, m.next) >= 0) return !1;
|
|
174
|
+
m = m.next;
|
|
175
|
+
}
|
|
176
|
+
return !0;
|
|
177
|
+
}
|
|
178
|
+
function Te(e, t, n, r) {
|
|
179
|
+
let i = e.prev, a = e, o = e.next, s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ = We(p, m, t, n, r), v = We(h, g, t, n, r), y = e.prevZ;
|
|
180
|
+
for (; y && y.z >= _;) {
|
|
181
|
+
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== o && !(s === y.x && u === y.y) && F(s, u, c, d, l, f, y.x, y.y) && I(y.prev, y, y.next) >= 0) return !1;
|
|
182
|
+
y = y.prevZ;
|
|
183
|
+
}
|
|
184
|
+
let b = e.nextZ;
|
|
185
|
+
for (; b && b.z <= v;) {
|
|
186
|
+
if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== o && !(s === b.x && u === b.y) && F(s, u, c, d, l, f, b.x, b.y) && I(b.prev, b, b.next) >= 0) return !1;
|
|
187
|
+
b = b.nextZ;
|
|
188
|
+
}
|
|
189
|
+
return !0;
|
|
190
|
+
}
|
|
191
|
+
function Ee(e, t) {
|
|
192
|
+
let n = e, r = !1;
|
|
193
|
+
do {
|
|
194
|
+
let i = n.prev, a = n.next.next;
|
|
195
|
+
qe(i, n, n.next, a, !1) && z(i, a) && z(a, i) && (t.push(i.i, n.i, a.i), B(n), B(n.next), n = e = a, r = !0), n = n.next;
|
|
196
|
+
} while (n !== e);
|
|
197
|
+
return r ? E(n) : n;
|
|
198
|
+
}
|
|
199
|
+
function De(e, t, n, r, i) {
|
|
200
|
+
let a = e;
|
|
201
|
+
do {
|
|
202
|
+
let e = a.next.next;
|
|
203
|
+
for (; e !== a.prev;) {
|
|
204
|
+
if (a.i !== e.i && Ke(a, e)) {
|
|
205
|
+
let o = Xe(a, e);
|
|
206
|
+
a = E(a, a.next), o = E(o, o.next), Ce(a, t, n, r, i), Ce(o, t, n, r, i);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
e = e.next;
|
|
210
|
+
}
|
|
211
|
+
a = a.next;
|
|
212
|
+
} while (a !== e);
|
|
213
|
+
}
|
|
214
|
+
var Oe = !1;
|
|
215
|
+
function ke(e, t, n, r) {
|
|
216
|
+
let i = [];
|
|
217
|
+
for (let n = 0, a = t.length; n < a; n++) {
|
|
218
|
+
let o = Se(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
|
|
219
|
+
o === o.next && T.add(o), i.push(Ge(o));
|
|
220
|
+
}
|
|
221
|
+
i.sort(Ae), Fe(e.length / r, t.length), Ie(n, n), Oe = !0;
|
|
222
|
+
for (let e = 0; e < i.length; e++) n = je(i[e], n);
|
|
223
|
+
return Oe = !1, E(n);
|
|
224
|
+
}
|
|
225
|
+
function Ae(e, t) {
|
|
226
|
+
return e.x - t.x || e.y - t.y || (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x);
|
|
227
|
+
}
|
|
228
|
+
function je(e, t) {
|
|
229
|
+
let n = Be(e, t);
|
|
230
|
+
if (!n) return t;
|
|
231
|
+
let r = Xe(n, e), i = r.next;
|
|
232
|
+
return Ie(n, i.next), E(r, r.next), E(n, n.next);
|
|
233
|
+
}
|
|
234
|
+
var Me = 16, D = new Float64Array(), O = 0, Ne = [], Pe = [];
|
|
235
|
+
function Fe(e, t) {
|
|
236
|
+
let n = Math.ceil((e + 2 * t) / Me) + t + 2;
|
|
237
|
+
D.length < n * 4 && (D = new Float64Array(n * 4)), O = 0;
|
|
238
|
+
}
|
|
239
|
+
function Ie(e, t) {
|
|
240
|
+
let n = e;
|
|
241
|
+
do {
|
|
242
|
+
let e = O++;
|
|
243
|
+
Ne[e] = n;
|
|
244
|
+
let r = Infinity, i = Infinity, a = -Infinity, o = -Infinity, s = 0;
|
|
245
|
+
do {
|
|
246
|
+
let t = n.next;
|
|
247
|
+
n.z = e, n.x < r && (r = n.x), n.x > a && (a = n.x), n.y < i && (i = n.y), n.y > o && (o = n.y), t.x < r && (r = t.x), t.x > a && (a = t.x), t.y < i && (i = t.y), t.y > o && (o = t.y), n = t;
|
|
248
|
+
} while (++s < Me && n !== t);
|
|
249
|
+
Pe[e] = n;
|
|
250
|
+
let c = e * 4;
|
|
251
|
+
D[c] = r, D[c + 1] = i, D[c + 2] = a, D[c + 3] = o;
|
|
252
|
+
} while (n !== t);
|
|
253
|
+
}
|
|
254
|
+
function Le(e, t) {
|
|
255
|
+
let n = e.z * 4;
|
|
256
|
+
t.x < D[n] && (D[n] = t.x), t.y < D[n + 1] && (D[n + 1] = t.y), t.x > D[n + 2] && (D[n + 2] = t.x), t.y > D[n + 3] && (D[n + 3] = t.y);
|
|
257
|
+
}
|
|
258
|
+
function Re(e) {
|
|
259
|
+
let t = Pe[e];
|
|
260
|
+
for (; t.prev.next !== t;) t = t.next;
|
|
261
|
+
return Pe[e] = t, t;
|
|
262
|
+
}
|
|
263
|
+
function ze(e) {
|
|
264
|
+
let t = Ne[e];
|
|
265
|
+
for (; t.prev.next !== t;) t = t.next;
|
|
266
|
+
return Ne[e] = t, t;
|
|
267
|
+
}
|
|
268
|
+
function Be(e, t) {
|
|
269
|
+
let n = t, r = e.x, i = e.y, a = -Infinity, o;
|
|
270
|
+
if (L(e, n)) return n;
|
|
271
|
+
for (let t = 0, s = 0; t < O; t++, s += 4) {
|
|
272
|
+
if (i < D[s + 1] || i > D[s + 3] || D[s] > r || D[s + 2] <= a) continue;
|
|
273
|
+
let c = Re(t);
|
|
274
|
+
n = ze(t);
|
|
275
|
+
do {
|
|
276
|
+
if (n.prev.next === n) {
|
|
277
|
+
if (L(e, n.next)) return n.next;
|
|
278
|
+
if (i <= n.y && i >= n.next.y && n.next.y !== n.y) {
|
|
279
|
+
let e = n.x + (i - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
|
|
280
|
+
if (e <= r && e > a && (a = e, o = n.x < n.next.x ? n : n.next, e === r)) return o;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
n = n.next;
|
|
284
|
+
} while (n !== c);
|
|
285
|
+
}
|
|
286
|
+
if (!o) return null;
|
|
287
|
+
let s = o.x, c = o.y, l = Math.min(i, c), u = Math.max(i, c), d = Infinity;
|
|
288
|
+
for (let t = 0, f = 0; t < O; t++, f += 4) {
|
|
289
|
+
if (D[f + 2] < s || D[f] > r || D[f + 3] < l || D[f + 1] > u) continue;
|
|
290
|
+
let p = Re(t);
|
|
291
|
+
n = ze(t);
|
|
292
|
+
do {
|
|
293
|
+
if (n.prev.next === n && r >= n.x && n.x >= s && r !== n.x && F(i < c ? r : a, i, s, c, i < c ? a : r, i, n.x, n.y)) {
|
|
294
|
+
let t = Math.abs(i - n.y) / (r - n.x);
|
|
295
|
+
(z(n, e) || n.y === i && n.next.y === i && n.next.x > r) && (t < d || t === d && (n.x > o.x || n.x === o.x && Ve(o, n))) && (o = n, d = t);
|
|
296
|
+
}
|
|
297
|
+
n = n.next;
|
|
298
|
+
} while (n !== p);
|
|
299
|
+
}
|
|
300
|
+
return o;
|
|
301
|
+
}
|
|
302
|
+
function Ve(e, t) {
|
|
303
|
+
return I(e.prev, e, t.prev) < 0 && I(t.next, e, e.next) < 0;
|
|
304
|
+
}
|
|
305
|
+
var k = [], A = [], j = new Uint32Array(), M = new Uint32Array(), N = new Uint32Array(256);
|
|
306
|
+
function He(e, t, n, r) {
|
|
307
|
+
let i = e, a = 0;
|
|
308
|
+
do
|
|
309
|
+
i.z = We(i.x, i.y, t, n, r), k[a++] = i, i = i.next;
|
|
310
|
+
while (i !== e);
|
|
311
|
+
Ue(a);
|
|
312
|
+
let o = null;
|
|
313
|
+
for (let e = 0; e < a; e++) {
|
|
314
|
+
let t = k[e];
|
|
315
|
+
t.prevZ = o, o && (o.nextZ = t), o = t;
|
|
316
|
+
}
|
|
317
|
+
o.nextZ = null;
|
|
318
|
+
}
|
|
319
|
+
function Ue(e) {
|
|
320
|
+
if (e <= 32) {
|
|
321
|
+
for (let t = 1; t < e; t++) {
|
|
322
|
+
let e = k[t], n = e.z, r = t - 1;
|
|
323
|
+
for (; r >= 0 && k[r].z > n;) k[r + 1] = k[r], r--;
|
|
324
|
+
k[r + 1] = e;
|
|
325
|
+
}
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
j.length < e && (j = new Uint32Array(e), M = new Uint32Array(e), A = Array(e));
|
|
329
|
+
for (let t = 0; t < e; t++) j[t] = k[t].z;
|
|
330
|
+
P(e, k, j, A, M, 0), P(e, A, M, k, j, 8), P(e, k, j, A, M, 16), P(e, A, M, k, j, 24);
|
|
331
|
+
}
|
|
332
|
+
function P(e, t, n, r, i, a) {
|
|
333
|
+
N.fill(0);
|
|
334
|
+
for (let t = 0; t < e; t++) N[n[t] >>> a & 255]++;
|
|
335
|
+
let o = 0;
|
|
336
|
+
for (let e = 0; e < 256; e++) {
|
|
337
|
+
let t = N[e];
|
|
338
|
+
N[e] = o, o += t;
|
|
339
|
+
}
|
|
340
|
+
for (let o = 0; o < e; o++) {
|
|
341
|
+
let e = n[o], s = N[e >>> a & 255]++;
|
|
342
|
+
r[s] = t[o], i[s] = e;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function We(e, t, n, r, i) {
|
|
346
|
+
return e = (e - n) * i | 0, t = (t - r) * i | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
|
|
347
|
+
}
|
|
348
|
+
function Ge(e) {
|
|
349
|
+
let t = e, n = e;
|
|
350
|
+
do
|
|
351
|
+
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
|
|
352
|
+
while (t !== e);
|
|
353
|
+
return n;
|
|
354
|
+
}
|
|
355
|
+
function F(e, t, n, r, i, a, o, s) {
|
|
356
|
+
return (i - o) * (t - s) >= (e - o) * (a - s) && (e - o) * (r - s) >= (n - o) * (t - s) && (n - o) * (a - s) >= (i - o) * (r - s);
|
|
357
|
+
}
|
|
358
|
+
function Ke(e, t) {
|
|
359
|
+
let n = L(e, t) && I(e.prev, e, e.next) > 0 && I(t.prev, t, t.next) > 0;
|
|
360
|
+
return e.next.i !== t.i && (n || z(e, t) && z(t, e) && (I(e.prev, e, t.prev) !== 0 || I(e, t.prev, t) !== 0)) && !Je(e, t) && (n || Ye(e, t));
|
|
361
|
+
}
|
|
362
|
+
function I(e, t, n) {
|
|
363
|
+
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
|
|
364
|
+
}
|
|
365
|
+
function L(e, t) {
|
|
366
|
+
return e.x === t.x && e.y === t.y;
|
|
367
|
+
}
|
|
368
|
+
function qe(e, t, n, r, i = !0) {
|
|
369
|
+
let a = I(e, t, n), o = I(e, t, r), s = I(n, r, e), c = I(n, r, t);
|
|
370
|
+
return (a > 0 && o < 0 || a < 0 && o > 0) && (s > 0 && c < 0 || s < 0 && c > 0) ? !0 : i ? !!(a === 0 && R(e, n, t) || o === 0 && R(e, r, t) || s === 0 && R(n, e, r) || c === 0 && R(n, t, r)) : !1;
|
|
371
|
+
}
|
|
372
|
+
function R(e, t, n) {
|
|
373
|
+
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
|
|
374
|
+
}
|
|
375
|
+
function Je(e, t) {
|
|
376
|
+
let n = Math.min(e.x, t.x), r = Math.max(e.x, t.x), i = Math.min(e.y, t.y), a = Math.max(e.y, t.y), o = e;
|
|
377
|
+
do {
|
|
378
|
+
let s = o.next;
|
|
379
|
+
if (o.x > r && s.x > r || o.x < n && s.x < n || o.y > a && s.y > a || o.y < i && s.y < i) {
|
|
380
|
+
o = s;
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i && qe(o, s, e, t)) return !0;
|
|
384
|
+
o = s;
|
|
385
|
+
} while (o !== e);
|
|
386
|
+
return !1;
|
|
387
|
+
}
|
|
388
|
+
function z(e, t) {
|
|
389
|
+
return I(e.prev, e, e.next) < 0 ? I(e, t, e.next) >= 0 && I(e, e.prev, t) >= 0 : I(e, t, e.prev) < 0 || I(e, e.next, t) < 0;
|
|
390
|
+
}
|
|
391
|
+
function Ye(e, t) {
|
|
392
|
+
let n = e, r = !1, i = (e.x + t.x) / 2, a = (e.y + t.y) / 2;
|
|
393
|
+
do {
|
|
394
|
+
let e = n.next;
|
|
395
|
+
n.y > a != e.y > a && i < (e.x - n.x) * (a - n.y) / (e.y - n.y) + n.x && (r = !r), n = e;
|
|
396
|
+
} while (n !== e);
|
|
397
|
+
return r;
|
|
398
|
+
}
|
|
399
|
+
function Xe(e, t) {
|
|
400
|
+
let n = Qe(e.i, e.x, e.y), r = Qe(t.i, t.x, t.y), i = e.next, a = t.prev;
|
|
401
|
+
return e.next = t, t.prev = e, n.next = i, i.prev = n, r.next = n, n.prev = r, a.next = r, r.prev = a, r;
|
|
402
|
+
}
|
|
403
|
+
function Ze(e, t, n, r) {
|
|
404
|
+
let i = Qe(e, t, n);
|
|
405
|
+
return r ? (i.next = r.next, i.prev = r, r.next.prev = i, r.next = i) : (i.prev = i, i.next = i), i;
|
|
406
|
+
}
|
|
407
|
+
function B(e) {
|
|
408
|
+
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ), Oe && Le(e.prev, e.next);
|
|
409
|
+
}
|
|
410
|
+
function Qe(e, t, n) {
|
|
411
|
+
return {
|
|
412
|
+
i: e,
|
|
413
|
+
x: t,
|
|
414
|
+
y: n,
|
|
415
|
+
prev: null,
|
|
416
|
+
next: null,
|
|
417
|
+
z: 0,
|
|
418
|
+
prevZ: null,
|
|
419
|
+
nextZ: null
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function $e(e, t, n, r) {
|
|
423
|
+
let i = 0;
|
|
424
|
+
for (let a = t, o = n - r; a < n; a += r) i += (e[o] - e[a]) * (e[a + 1] + e[o + 1]), o = a;
|
|
425
|
+
return i;
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/utils.mjs
|
|
429
|
+
var et = xe.default || xe, tt = class {
|
|
430
|
+
constructor(e) {
|
|
431
|
+
this._renderer = e;
|
|
432
|
+
}
|
|
433
|
+
addRenderable(e, t) {
|
|
434
|
+
let n = this._getGpuSprite(e);
|
|
435
|
+
e.didViewUpdate && this._updateBatchableSprite(e, n), this._renderer.renderPipes.batch.addToBatch(n, t);
|
|
436
|
+
}
|
|
437
|
+
updateRenderable(e) {
|
|
438
|
+
let t = this._getGpuSprite(e);
|
|
439
|
+
e.didViewUpdate && this._updateBatchableSprite(e, t), t._batcher.updateElement(t);
|
|
440
|
+
}
|
|
441
|
+
validateRenderable(e) {
|
|
442
|
+
let t = this._getGpuSprite(e);
|
|
443
|
+
return !t._batcher.checkAndUpdateTexture(t, e._texture);
|
|
444
|
+
}
|
|
445
|
+
_updateBatchableSprite(e, t) {
|
|
446
|
+
t.bounds = e.visualBounds, t.texture = e._texture;
|
|
447
|
+
}
|
|
448
|
+
_getGpuSprite(e) {
|
|
449
|
+
return e._gpuData[this._renderer.uid] || this._initGPUSprite(e);
|
|
450
|
+
}
|
|
451
|
+
_initGPUSprite(e) {
|
|
452
|
+
let t = new _e();
|
|
453
|
+
return t.renderable = e, t.transform = e.groupTransform, t.texture = e._texture, t.bounds = e.visualBounds, t.roundPixels = this._renderer._roundPixels | e._roundPixels, e._gpuData[this._renderer.uid] = t, t;
|
|
454
|
+
}
|
|
455
|
+
destroy() {
|
|
456
|
+
this._renderer = null;
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
tt.extension = {
|
|
460
|
+
type: [
|
|
461
|
+
g.WebGLPipes,
|
|
462
|
+
g.WebGPUPipes,
|
|
463
|
+
g.CanvasPipes
|
|
464
|
+
],
|
|
465
|
+
name: "sprite"
|
|
466
|
+
};
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/ViewableBuffer.mjs
|
|
469
|
+
var nt = class {
|
|
470
|
+
constructor(e) {
|
|
471
|
+
typeof e == "number" ? this.rawBinaryData = new ArrayBuffer(e) : e instanceof Uint8Array ? this.rawBinaryData = e.buffer : this.rawBinaryData = e, this.uint32View = new Uint32Array(this.rawBinaryData), this.float32View = new Float32Array(this.rawBinaryData), this.size = this.rawBinaryData.byteLength;
|
|
472
|
+
}
|
|
473
|
+
get int8View() {
|
|
474
|
+
return this._int8View ||= new Int8Array(this.rawBinaryData), this._int8View;
|
|
475
|
+
}
|
|
476
|
+
get uint8View() {
|
|
477
|
+
return this._uint8View ||= new Uint8Array(this.rawBinaryData), this._uint8View;
|
|
478
|
+
}
|
|
479
|
+
get int16View() {
|
|
480
|
+
return this._int16View ||= new Int16Array(this.rawBinaryData), this._int16View;
|
|
481
|
+
}
|
|
482
|
+
get int32View() {
|
|
483
|
+
return this._int32View ||= new Int32Array(this.rawBinaryData), this._int32View;
|
|
484
|
+
}
|
|
485
|
+
get float64View() {
|
|
486
|
+
return this._float64Array ||= new Float64Array(this.rawBinaryData), this._float64Array;
|
|
487
|
+
}
|
|
488
|
+
get bigUint64View() {
|
|
489
|
+
return this._bigUint64Array ||= new BigUint64Array(this.rawBinaryData), this._bigUint64Array;
|
|
490
|
+
}
|
|
491
|
+
view(e) {
|
|
492
|
+
return this[`${e}View`];
|
|
493
|
+
}
|
|
494
|
+
destroy() {
|
|
495
|
+
this.rawBinaryData = null, this.uint32View = null, this.float32View = null, this.uint16View = null, this._int8View = null, this._uint8View = null, this._int16View = null, this._int32View = null, this._float64Array = null, this._bigUint64Array = null;
|
|
496
|
+
}
|
|
497
|
+
static sizeOf(e) {
|
|
498
|
+
switch (e) {
|
|
499
|
+
case "int8":
|
|
500
|
+
case "uint8": return 1;
|
|
501
|
+
case "int16":
|
|
502
|
+
case "uint16": return 2;
|
|
503
|
+
case "int32":
|
|
504
|
+
case "uint32":
|
|
505
|
+
case "float32": return 4;
|
|
506
|
+
default: throw Error(`${e} isn't a valid view type`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/buffer/utils/fastCopy.mjs
|
|
512
|
+
function rt(e, t, n, r) {
|
|
513
|
+
if (n ??= 0, r ??= Math.min(e.byteLength - n, t.byteLength), !(n & 7) && !(r & 7)) {
|
|
514
|
+
let i = r / 8;
|
|
515
|
+
new Float64Array(t, 0, i).set(new Float64Array(e, n, i));
|
|
516
|
+
} else if (!(n & 3) && !(r & 3)) {
|
|
517
|
+
let i = r / 4;
|
|
518
|
+
new Float32Array(t, 0, i).set(new Float32Array(e, n, i));
|
|
519
|
+
} else new Uint8Array(t).set(new Uint8Array(e, n, r));
|
|
520
|
+
}
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/state/const.mjs
|
|
523
|
+
var it = {
|
|
524
|
+
normal: "normal-npm",
|
|
525
|
+
add: "add-npm",
|
|
526
|
+
screen: "screen-npm"
|
|
527
|
+
}, V = /* @__PURE__ */ ((e) => (e[e.DISABLED = 0] = "DISABLED", e[e.RENDERING_MASK_ADD = 1] = "RENDERING_MASK_ADD", e[e.MASK_ACTIVE = 2] = "MASK_ACTIVE", e[e.INVERSE_MASK_ACTIVE = 3] = "INVERSE_MASK_ACTIVE", e[e.RENDERING_MASK_REMOVE = 4] = "RENDERING_MASK_REMOVE", e[e.NONE = 5] = "NONE", e))(V || {});
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/state/getAdjustedBlendModeBlend.mjs
|
|
530
|
+
function at(e, t) {
|
|
531
|
+
return t.alphaMode === "no-premultiply-alpha" && it[e] || e;
|
|
532
|
+
}
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/batcher/gl/utils/checkMaxIfStatementsInShader.mjs
|
|
535
|
+
var ot = [
|
|
536
|
+
"precision mediump float;",
|
|
537
|
+
"void main(void){",
|
|
538
|
+
"float test = 0.1;",
|
|
539
|
+
"%forloop%",
|
|
540
|
+
"gl_FragColor = vec4(0.0);",
|
|
541
|
+
"}"
|
|
542
|
+
].join("\n");
|
|
543
|
+
function st(e) {
|
|
544
|
+
let t = "";
|
|
545
|
+
for (let n = 0; n < e; ++n) n > 0 && (t += "\nelse "), n < e - 1 && (t += `if(test == ${n}.0){}`);
|
|
546
|
+
return t;
|
|
547
|
+
}
|
|
548
|
+
function ct(e, t) {
|
|
549
|
+
if (e === 0) throw Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");
|
|
550
|
+
let n = t.createShader(t.FRAGMENT_SHADER);
|
|
551
|
+
try {
|
|
552
|
+
for (;;) {
|
|
553
|
+
let r = ot.replace(/%forloop%/gi, st(e));
|
|
554
|
+
if (t.shaderSource(n, r), t.compileShader(n), !t.getShaderParameter(n, t.COMPILE_STATUS)) e = e / 2 | 0;
|
|
555
|
+
else break;
|
|
556
|
+
}
|
|
557
|
+
} finally {
|
|
558
|
+
t.deleteShader(n);
|
|
559
|
+
}
|
|
560
|
+
return e;
|
|
561
|
+
}
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/batcher/gl/utils/maxRecommendedTextures.mjs
|
|
564
|
+
var H = null;
|
|
565
|
+
function lt() {
|
|
566
|
+
if (H) return H;
|
|
567
|
+
let e = ee();
|
|
568
|
+
return H = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), H = ct(H, e), e.getExtension("WEBGL_lose_context")?.loseContext(), H;
|
|
569
|
+
}
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/batcher/shared/BatchTextureArray.mjs
|
|
572
|
+
var ut = class {
|
|
573
|
+
constructor() {
|
|
574
|
+
this.ids = /* @__PURE__ */ Object.create(null), this.textures = [], this.count = 0;
|
|
575
|
+
}
|
|
576
|
+
clear() {
|
|
577
|
+
for (let e = 0; e < this.count; e++) {
|
|
578
|
+
let t = this.textures[e];
|
|
579
|
+
this.textures[e] = null, this.ids[t.uid] = null;
|
|
580
|
+
}
|
|
581
|
+
this.count = 0;
|
|
582
|
+
}
|
|
583
|
+
}, dt = class {
|
|
584
|
+
constructor() {
|
|
585
|
+
this.renderPipeId = "batch", this.action = "startBatch", this.start = 0, this.size = 0, this.textures = new ut(), this.blendMode = "normal", this.topology = "triangle-strip", this.canBundle = !0;
|
|
586
|
+
}
|
|
587
|
+
destroy() {
|
|
588
|
+
this.textures = null, this.gpuBindGroup = null, this.bindGroup = null, this.batcher = null, this.elements = null;
|
|
589
|
+
}
|
|
590
|
+
}, U = [], W = 0;
|
|
591
|
+
se.register({ clear: () => {
|
|
592
|
+
if (U.length > 0) for (let e of U) e && e.destroy();
|
|
593
|
+
U.length = 0, W = 0;
|
|
594
|
+
} });
|
|
595
|
+
function ft() {
|
|
596
|
+
return W > 0 ? U[--W] : new dt();
|
|
597
|
+
}
|
|
598
|
+
function pt(e) {
|
|
599
|
+
e.elements = null, U[W++] = e;
|
|
600
|
+
}
|
|
601
|
+
var G = 0, mt = class e {
|
|
602
|
+
constructor(t) {
|
|
603
|
+
this.uid = l("batcher"), this.dirty = !0, this.batchIndex = 0, this.batches = [], this._elements = [], t = {
|
|
604
|
+
...e.defaultOptions,
|
|
605
|
+
...t
|
|
606
|
+
}, t.maxTextures || (m("v8.8.0", "maxTextures is a required option for Batcher now, please pass it in the options"), t.maxTextures = lt());
|
|
607
|
+
let { maxTextures: n, attributesInitialSize: r, indicesInitialSize: i } = t;
|
|
608
|
+
this.attributeBuffer = new nt(r * 4), this.indexBuffer = new Uint16Array(i), this.maxTextures = n;
|
|
609
|
+
}
|
|
610
|
+
begin() {
|
|
611
|
+
this.elementSize = 0, this.elementStart = 0, this.indexSize = 0, this.attributeSize = 0;
|
|
612
|
+
for (let e = 0; e < this.batchIndex; e++) pt(this.batches[e]);
|
|
613
|
+
this.batchIndex = 0, this._batchIndexStart = 0, this._batchIndexSize = 0, this.dirty = !0;
|
|
614
|
+
}
|
|
615
|
+
add(e) {
|
|
616
|
+
this._elements[this.elementSize++] = e, e._indexStart = this.indexSize, e._attributeStart = this.attributeSize, e._batcher = this, this.indexSize += e.indexSize, this.attributeSize += e.attributeSize * this.vertexSize;
|
|
617
|
+
}
|
|
618
|
+
checkAndUpdateTexture(e, t) {
|
|
619
|
+
let n = e._batch.textures.ids[t._source.uid];
|
|
620
|
+
return !n && n !== 0 ? !1 : (e._textureId = n, e.texture = t, !0);
|
|
621
|
+
}
|
|
622
|
+
updateElement(e) {
|
|
623
|
+
this.dirty = !0;
|
|
624
|
+
let t = this.attributeBuffer;
|
|
625
|
+
e.packAsQuad ? this.packQuadAttributes(e, t.float32View, t.uint32View, e._attributeStart, e._textureId) : this.packAttributes(e, t.float32View, t.uint32View, e._attributeStart, e._textureId);
|
|
626
|
+
}
|
|
627
|
+
break(e) {
|
|
628
|
+
let t = this._elements;
|
|
629
|
+
if (!t[this.elementStart]) return;
|
|
630
|
+
let n = ft(), r = n.textures;
|
|
631
|
+
r.clear();
|
|
632
|
+
let i = t[this.elementStart], a = at(i.blendMode, i.texture._source), o = i.topology;
|
|
633
|
+
this.attributeSize * 4 > this.attributeBuffer.size && this._resizeAttributeBuffer(this.attributeSize * 4), this.indexSize > this.indexBuffer.length && this._resizeIndexBuffer(this.indexSize);
|
|
634
|
+
let s = this.attributeBuffer.float32View, c = this.attributeBuffer.uint32View, l = this.indexBuffer, u = this._batchIndexSize, d = this._batchIndexStart, f = "startBatch", p = [], m = this.maxTextures;
|
|
635
|
+
for (let i = this.elementStart; i < this.elementSize; ++i) {
|
|
636
|
+
let h = t[i];
|
|
637
|
+
t[i] = null;
|
|
638
|
+
let g = h.texture._source, _ = at(h.blendMode, g), v = a !== _ || o !== h.topology;
|
|
639
|
+
if (g._batchTick === G && !v) {
|
|
640
|
+
h._textureId = g._textureBindLocation, u += h.indexSize, h.packAsQuad ? (this.packQuadAttributes(h, s, c, h._attributeStart, h._textureId), this.packQuadIndex(l, h._indexStart, h._attributeStart / this.vertexSize)) : (this.packAttributes(h, s, c, h._attributeStart, h._textureId), this.packIndex(h, l, h._indexStart, h._attributeStart / this.vertexSize)), h._batch = n, p.push(h);
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
g._batchTick = G, (r.count >= m || v) && (this._finishBatch(n, d, u - d, r, a, o, e, f, p), f = "renderBatch", d = u, a = _, o = h.topology, n = ft(), r = n.textures, r.clear(), p = [], ++G), h._textureId = g._textureBindLocation = r.count, r.ids[g.uid] = r.count, r.textures[r.count++] = g, h._batch = n, p.push(h), u += h.indexSize, h.packAsQuad ? (this.packQuadAttributes(h, s, c, h._attributeStart, h._textureId), this.packQuadIndex(l, h._indexStart, h._attributeStart / this.vertexSize)) : (this.packAttributes(h, s, c, h._attributeStart, h._textureId), this.packIndex(h, l, h._indexStart, h._attributeStart / this.vertexSize));
|
|
644
|
+
}
|
|
645
|
+
r.count > 0 && (this._finishBatch(n, d, u - d, r, a, o, e, f, p), d = u, ++G), this.elementStart = this.elementSize, this._batchIndexStart = d, this._batchIndexSize = u;
|
|
646
|
+
}
|
|
647
|
+
_finishBatch(e, t, n, r, i, a, o, s, c) {
|
|
648
|
+
e.gpuBindGroup = null, e.bindGroup = null, e.action = s, e.batcher = this, e.textures = r, e.blendMode = i, e.topology = a, e.start = t, e.size = n, e.elements = c, ++G, this.batches[this.batchIndex++] = e, o.add(e);
|
|
649
|
+
}
|
|
650
|
+
finish(e) {
|
|
651
|
+
this.break(e);
|
|
652
|
+
}
|
|
653
|
+
ensureAttributeBuffer(e) {
|
|
654
|
+
e * 4 <= this.attributeBuffer.size || this._resizeAttributeBuffer(e * 4);
|
|
655
|
+
}
|
|
656
|
+
ensureIndexBuffer(e) {
|
|
657
|
+
e <= this.indexBuffer.length || this._resizeIndexBuffer(e);
|
|
658
|
+
}
|
|
659
|
+
_resizeAttributeBuffer(e) {
|
|
660
|
+
let t = new nt(Math.max(e, this.attributeBuffer.size * 2));
|
|
661
|
+
rt(this.attributeBuffer.rawBinaryData, t.rawBinaryData), this.attributeBuffer = t;
|
|
662
|
+
}
|
|
663
|
+
_resizeIndexBuffer(e) {
|
|
664
|
+
let t = this.indexBuffer, n = Math.max(e, t.length * 1.5);
|
|
665
|
+
n += n % 2;
|
|
666
|
+
let r = n > 65535 ? new Uint32Array(n) : new Uint16Array(n);
|
|
667
|
+
if (r.BYTES_PER_ELEMENT !== t.BYTES_PER_ELEMENT) for (let e = 0; e < t.length; e++) r[e] = t[e];
|
|
668
|
+
else rt(t.buffer, r.buffer);
|
|
669
|
+
this.indexBuffer = r;
|
|
670
|
+
}
|
|
671
|
+
packQuadIndex(e, t, n) {
|
|
672
|
+
e[t] = n + 0, e[t + 1] = n + 1, e[t + 2] = n + 2, e[t + 3] = n + 0, e[t + 4] = n + 2, e[t + 5] = n + 3;
|
|
673
|
+
}
|
|
674
|
+
packIndex(e, t, n, r) {
|
|
675
|
+
let i = e.indices, a = e.indexSize, o = e.indexOffset, s = e.attributeOffset;
|
|
676
|
+
for (let e = 0; e < a; e++) t[n++] = r + i[e + o] - s;
|
|
677
|
+
}
|
|
678
|
+
destroy(e = {}) {
|
|
679
|
+
if (this.batches !== null) {
|
|
680
|
+
for (let e = 0; e < this.batchIndex; e++) pt(this.batches[e]);
|
|
681
|
+
this.batches = null, this.geometry.destroy(!0), this.geometry = null, e.shader && (this.shader?.destroy(), this.shader = null);
|
|
682
|
+
for (let e = 0; e < this._elements.length; e++) this._elements[e] && (this._elements[e]._batch = null);
|
|
683
|
+
this._elements = null, this.indexBuffer = null, this.attributeBuffer.destroy(), this.attributeBuffer = null;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
mt.defaultOptions = {
|
|
688
|
+
maxTextures: null,
|
|
689
|
+
attributesInitialSize: 4,
|
|
690
|
+
indicesInitialSize: 6
|
|
691
|
+
};
|
|
692
|
+
var ht = mt, gt = new Float32Array(1), _t = new Uint32Array(1), vt = class extends le {
|
|
693
|
+
constructor() {
|
|
694
|
+
let e = new ae({
|
|
695
|
+
data: gt,
|
|
696
|
+
label: "attribute-batch-buffer",
|
|
697
|
+
usage: S.VERTEX | S.COPY_DST,
|
|
698
|
+
shrinkToFit: !1
|
|
699
|
+
}), t = new ae({
|
|
700
|
+
data: _t,
|
|
701
|
+
label: "index-batch-buffer",
|
|
702
|
+
usage: S.INDEX | S.COPY_DST,
|
|
703
|
+
shrinkToFit: !1
|
|
704
|
+
});
|
|
705
|
+
super({
|
|
706
|
+
attributes: {
|
|
707
|
+
aPosition: {
|
|
708
|
+
buffer: e,
|
|
709
|
+
format: "float32x2",
|
|
710
|
+
stride: 24,
|
|
711
|
+
offset: 0
|
|
712
|
+
},
|
|
713
|
+
aUV: {
|
|
714
|
+
buffer: e,
|
|
715
|
+
format: "float32x2",
|
|
716
|
+
stride: 24,
|
|
717
|
+
offset: 8
|
|
718
|
+
},
|
|
719
|
+
aColor: {
|
|
720
|
+
buffer: e,
|
|
721
|
+
format: "unorm8x4",
|
|
722
|
+
stride: 24,
|
|
723
|
+
offset: 16
|
|
724
|
+
},
|
|
725
|
+
aTextureIdAndRound: {
|
|
726
|
+
buffer: e,
|
|
727
|
+
format: "uint16x2",
|
|
728
|
+
stride: 24,
|
|
729
|
+
offset: 20
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
indexBuffer: t
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/utils/addBits.mjs
|
|
738
|
+
function yt(e, t, n) {
|
|
739
|
+
if (e) for (let r in e) {
|
|
740
|
+
let i = t[r.toLocaleLowerCase()];
|
|
741
|
+
if (i) {
|
|
742
|
+
let t = e[r];
|
|
743
|
+
r === "header" && (t = t.replace(/@in\s+[^;]+;\s*/g, "").replace(/@out\s+[^;]+;\s*/g, "")), n && i.push(`//----${n}----//`), i.push(t);
|
|
744
|
+
} else o(`${r} placement hook does not exist in shader`);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/utils/compileHooks.mjs
|
|
749
|
+
var bt = /\{\{(.*?)\}\}/g;
|
|
750
|
+
function xt(e) {
|
|
751
|
+
let t = {};
|
|
752
|
+
return (e.match(bt)?.map((e) => e.replace(/[{()}]/g, "")) ?? []).forEach((e) => {
|
|
753
|
+
t[e] = [];
|
|
754
|
+
}), t;
|
|
755
|
+
}
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/utils/compileInputs.mjs
|
|
758
|
+
function St(e, t) {
|
|
759
|
+
let n, r = /@in\s+([^;]+);/g;
|
|
760
|
+
for (; (n = r.exec(e)) !== null;) t.push(n[1]);
|
|
761
|
+
}
|
|
762
|
+
function Ct(e, t, n = !1) {
|
|
763
|
+
let r = [];
|
|
764
|
+
St(t, r), e.forEach((e) => {
|
|
765
|
+
e.header && St(e.header, r);
|
|
766
|
+
});
|
|
767
|
+
let i = r;
|
|
768
|
+
n && i.sort();
|
|
769
|
+
let a = i.map((e, t) => ` @location(${t}) ${e},`).join("\n"), o = t.replace(/@in\s+[^;]+;\s*/g, "");
|
|
770
|
+
return o = o.replace("{{in}}", `
|
|
771
|
+
${a}
|
|
772
|
+
`), o;
|
|
773
|
+
}
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/utils/compileOutputs.mjs
|
|
776
|
+
function wt(e, t) {
|
|
777
|
+
let n, r = /@out\s+([^;]+);/g;
|
|
778
|
+
for (; (n = r.exec(e)) !== null;) t.push(n[1]);
|
|
779
|
+
}
|
|
780
|
+
function Tt(e) {
|
|
781
|
+
let t = /\b(\w+)\s*:/g.exec(e);
|
|
782
|
+
return t ? t[1] : "";
|
|
783
|
+
}
|
|
784
|
+
function Et(e) {
|
|
785
|
+
return e.replace(/@.*?\s+/g, "");
|
|
786
|
+
}
|
|
787
|
+
function Dt(e, t) {
|
|
788
|
+
let n = [];
|
|
789
|
+
wt(t, n), e.forEach((e) => {
|
|
790
|
+
e.header && wt(e.header, n);
|
|
791
|
+
});
|
|
792
|
+
let r = 0, i = n.sort().map((e) => e.indexOf("builtin") > -1 ? e : `@location(${r++}) ${e}`).join(",\n"), a = n.sort().map((e) => ` var ${Et(e)};`).join("\n"), o = `return VSOutput(
|
|
793
|
+
${n.sort().map((e) => ` ${Tt(e)}`).join(",\n")});`, s = t.replace(/@out\s+[^;]+;\s*/g, "");
|
|
794
|
+
return s = s.replace("{{struct}}", `
|
|
795
|
+
${i}
|
|
796
|
+
`), s = s.replace("{{start}}", `
|
|
797
|
+
${a}
|
|
798
|
+
`), s = s.replace("{{return}}", `
|
|
799
|
+
${o}
|
|
800
|
+
`), s;
|
|
801
|
+
}
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/utils/injectBits.mjs
|
|
804
|
+
function Ot(e, t) {
|
|
805
|
+
let n = e;
|
|
806
|
+
for (let e in t) {
|
|
807
|
+
let r = t[e];
|
|
808
|
+
n = r.join("\n").length ? n.replace(`{{${e}}}`, `//-----${e} START-----//
|
|
809
|
+
${r.join("\n")}
|
|
810
|
+
//----${e} FINISH----//`) : n.replace(`{{${e}}}`, "");
|
|
811
|
+
}
|
|
812
|
+
return n;
|
|
813
|
+
}
|
|
814
|
+
//#endregion
|
|
815
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compiler/compileHighShader.mjs
|
|
816
|
+
var K = /* @__PURE__ */ Object.create(null), kt = /* @__PURE__ */ new Map(), At = 0;
|
|
817
|
+
function jt({ template: e, bits: t }) {
|
|
818
|
+
let n = Pt(e, t);
|
|
819
|
+
if (K[n]) return K[n];
|
|
820
|
+
let { vertex: r, fragment: i } = Nt(e, t);
|
|
821
|
+
return K[n] = Ft(r, i, t), K[n];
|
|
822
|
+
}
|
|
823
|
+
function Mt({ template: e, bits: t }) {
|
|
824
|
+
let n = Pt(e, t);
|
|
825
|
+
return K[n] || (K[n] = Ft(e.vertex, e.fragment, t)), K[n];
|
|
826
|
+
}
|
|
827
|
+
function Nt(e, t) {
|
|
828
|
+
let n = t.map((e) => e.vertex).filter((e) => !!e), r = t.map((e) => e.fragment).filter((e) => !!e), i = Ct(n, e.vertex, !0);
|
|
829
|
+
i = Dt(n, i);
|
|
830
|
+
let a = Ct(r, e.fragment, !0);
|
|
831
|
+
return {
|
|
832
|
+
vertex: i,
|
|
833
|
+
fragment: a
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
function Pt(e, t) {
|
|
837
|
+
return t.map((e) => (kt.has(e) || kt.set(e, At++), kt.get(e))).sort((e, t) => e - t).join("-") + e.vertex + e.fragment;
|
|
838
|
+
}
|
|
839
|
+
function Ft(e, t, n) {
|
|
840
|
+
let r = xt(e), i = xt(t);
|
|
841
|
+
return n.forEach((e) => {
|
|
842
|
+
yt(e.vertex, r, e.name), yt(e.fragment, i, e.name);
|
|
843
|
+
}), {
|
|
844
|
+
vertex: Ot(e, r),
|
|
845
|
+
fragment: Ot(t, i)
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/defaultProgramTemplate.mjs
|
|
850
|
+
var It = "\n @in aPosition: vec2<f32>;\n @in aUV: vec2<f32>;\n\n @out @builtin(position) vPosition: vec4<f32>;\n @out vUV : vec2<f32>;\n @out vColor : vec4<f32>;\n\n {{header}}\n\n struct VSOutput {\n {{struct}}\n };\n\n @vertex\n fn main( {{in}} ) -> VSOutput {\n\n var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;\n var modelMatrix = mat3x3<f32>(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n var position = aPosition;\n var uv = aUV;\n\n {{start}}\n\n vColor = vec4<f32>(1., 1., 1., 1.);\n\n {{main}}\n\n vUV = uv;\n\n var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= globalUniforms.uWorldColorAlpha;\n\n {{end}}\n\n {{return}}\n };\n", Lt = "\n @in vUV : vec2<f32>;\n @in vColor : vec4<f32>;\n\n {{header}}\n\n @fragment\n fn main(\n {{in}}\n ) -> @location(0) vec4<f32> {\n\n {{start}}\n\n var outColor:vec4<f32>;\n\n {{main}}\n\n var finalColor:vec4<f32> = outColor * vColor;\n\n {{end}}\n\n return finalColor;\n };\n", Rt = "\n in vec2 aPosition;\n in vec2 aUV;\n\n out vec4 vColor;\n out vec2 vUV;\n\n {{header}}\n\n void main(void){\n\n mat3 worldTransformMatrix = uWorldTransformMatrix;\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n vec2 position = aPosition;\n vec2 uv = aUV;\n\n {{start}}\n\n vColor = vec4(1.);\n\n {{main}}\n\n vUV = uv;\n\n mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= uWorldColorAlpha;\n\n {{end}}\n }\n", zt = "\n\n in vec4 vColor;\n in vec2 vUV;\n\n out vec4 finalColor;\n\n {{header}}\n\n void main(void) {\n\n {{start}}\n\n vec4 outColor;\n\n {{main}}\n\n finalColor = outColor * vColor;\n\n {{end}}\n }\n", Bt = {
|
|
851
|
+
name: "global-uniforms-bit",
|
|
852
|
+
vertex: { header: "\n struct GlobalUniforms {\n uProjectionMatrix:mat3x3<f32>,\n uWorldTransformMatrix:mat3x3<f32>,\n uWorldColorAlpha: vec4<f32>,\n uResolution: vec2<f32>,\n }\n\n @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;\n " }
|
|
853
|
+
}, Vt = {
|
|
854
|
+
name: "global-uniforms-bit",
|
|
855
|
+
vertex: { header: "\n uniform mat3 uProjectionMatrix;\n uniform mat3 uWorldTransformMatrix;\n uniform vec4 uWorldColorAlpha;\n uniform vec2 uResolution;\n " }
|
|
856
|
+
};
|
|
857
|
+
//#endregion
|
|
858
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/compileHighShaderToProgram.mjs
|
|
859
|
+
function Ht({ bits: e, name: t }) {
|
|
860
|
+
let n = jt({
|
|
861
|
+
template: {
|
|
862
|
+
fragment: Lt,
|
|
863
|
+
vertex: It
|
|
864
|
+
},
|
|
865
|
+
bits: [Bt, ...e]
|
|
866
|
+
});
|
|
867
|
+
return b.from({
|
|
868
|
+
name: t,
|
|
869
|
+
vertex: {
|
|
870
|
+
source: n.vertex,
|
|
871
|
+
entryPoint: "main"
|
|
872
|
+
},
|
|
873
|
+
fragment: {
|
|
874
|
+
source: n.fragment,
|
|
875
|
+
entryPoint: "main"
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
function Ut({ bits: e, name: t }) {
|
|
880
|
+
return new ie({
|
|
881
|
+
name: t,
|
|
882
|
+
...Mt({
|
|
883
|
+
template: {
|
|
884
|
+
vertex: Rt,
|
|
885
|
+
fragment: zt
|
|
886
|
+
},
|
|
887
|
+
bits: [Vt, ...e]
|
|
888
|
+
})
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/shader-bits/colorBit.mjs
|
|
893
|
+
var Wt = {
|
|
894
|
+
name: "color-bit",
|
|
895
|
+
vertex: {
|
|
896
|
+
header: "\n @in aColor: vec4<f32>;\n ",
|
|
897
|
+
main: "\n vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);\n "
|
|
898
|
+
}
|
|
899
|
+
}, Gt = {
|
|
900
|
+
name: "color-bit",
|
|
901
|
+
vertex: {
|
|
902
|
+
header: "\n in vec4 aColor;\n ",
|
|
903
|
+
main: "\n vColor *= vec4(aColor.rgb * aColor.a, aColor.a);\n "
|
|
904
|
+
}
|
|
905
|
+
}, Kt = {};
|
|
906
|
+
function qt(e) {
|
|
907
|
+
let t = [];
|
|
908
|
+
if (e === 1) t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"), t.push("@group(1) @binding(1) var textureSampler1: sampler;");
|
|
909
|
+
else {
|
|
910
|
+
let n = 0;
|
|
911
|
+
for (let r = 0; r < e; r++) t.push(`@group(1) @binding(${n++}) var textureSource${r + 1}: texture_2d<f32>;`), t.push(`@group(1) @binding(${n++}) var textureSampler${r + 1}: sampler;`);
|
|
912
|
+
}
|
|
913
|
+
return t.join("\n");
|
|
914
|
+
}
|
|
915
|
+
function Jt(e) {
|
|
916
|
+
let t = [];
|
|
917
|
+
if (e === 1) t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");
|
|
918
|
+
else {
|
|
919
|
+
t.push("switch vTextureId {");
|
|
920
|
+
for (let n = 0; n < e; n++) n === e - 1 ? t.push(" default:{") : t.push(` case ${n}:{`), t.push(` outColor = textureSampleGrad(textureSource${n + 1}, textureSampler${n + 1}, vUV, uvDx, uvDy);`), t.push(" break;}");
|
|
921
|
+
t.push("}");
|
|
922
|
+
}
|
|
923
|
+
return t.join("\n");
|
|
924
|
+
}
|
|
925
|
+
function Yt(e) {
|
|
926
|
+
return Kt[e] || (Kt[e] = {
|
|
927
|
+
name: "texture-batch-bit",
|
|
928
|
+
vertex: {
|
|
929
|
+
header: "\n @in aTextureIdAndRound: vec2<u32>;\n @out @interpolate(flat) vTextureId : u32;\n ",
|
|
930
|
+
main: "\n vTextureId = aTextureIdAndRound.y;\n ",
|
|
931
|
+
end: "\n if(aTextureIdAndRound.x == 1)\n {\n vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n "
|
|
932
|
+
},
|
|
933
|
+
fragment: {
|
|
934
|
+
header: `
|
|
935
|
+
@in @interpolate(flat) vTextureId: u32;
|
|
936
|
+
|
|
937
|
+
${qt(e)}
|
|
938
|
+
`,
|
|
939
|
+
main: `
|
|
940
|
+
var uvDx = dpdx(vUV);
|
|
941
|
+
var uvDy = dpdy(vUV);
|
|
942
|
+
|
|
943
|
+
${Jt(e)}
|
|
944
|
+
`
|
|
945
|
+
}
|
|
946
|
+
}), Kt[e];
|
|
947
|
+
}
|
|
948
|
+
var Xt = {};
|
|
949
|
+
function Zt(e) {
|
|
950
|
+
let t = [];
|
|
951
|
+
for (let n = 0; n < e; n++) n > 0 && t.push("else"), n < e - 1 && t.push(`if(vTextureId < ${n}.5)`), t.push("{"), t.push(` outColor = texture(uTextures[${n}], vUV);`), t.push("}");
|
|
952
|
+
return t.join("\n");
|
|
953
|
+
}
|
|
954
|
+
function Qt(e) {
|
|
955
|
+
return Xt[e] || (Xt[e] = {
|
|
956
|
+
name: "texture-batch-bit",
|
|
957
|
+
vertex: {
|
|
958
|
+
header: "\n in vec2 aTextureIdAndRound;\n out float vTextureId;\n\n ",
|
|
959
|
+
main: "\n vTextureId = aTextureIdAndRound.y;\n ",
|
|
960
|
+
end: "\n if(aTextureIdAndRound.x == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n "
|
|
961
|
+
},
|
|
962
|
+
fragment: {
|
|
963
|
+
header: `
|
|
964
|
+
in float vTextureId;
|
|
965
|
+
|
|
966
|
+
uniform sampler2D uTextures[${e}];
|
|
967
|
+
|
|
968
|
+
`,
|
|
969
|
+
main: `
|
|
970
|
+
|
|
971
|
+
${Zt(e)}
|
|
972
|
+
`
|
|
973
|
+
}
|
|
974
|
+
}), Xt[e];
|
|
975
|
+
}
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/shader-bits/roundPixelsBit.mjs
|
|
978
|
+
var $t = {
|
|
979
|
+
name: "round-pixels-bit",
|
|
980
|
+
vertex: { header: "\n fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>\n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n " }
|
|
981
|
+
}, en = {
|
|
982
|
+
name: "round-pixels-bit",
|
|
983
|
+
vertex: { header: "\n vec2 roundPixels(vec2 position, vec2 targetSize)\n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n " }
|
|
984
|
+
}, tn = {};
|
|
985
|
+
function nn(e) {
|
|
986
|
+
let t = tn[e];
|
|
987
|
+
if (t) return t;
|
|
988
|
+
let n = new Int32Array(e);
|
|
989
|
+
for (let t = 0; t < e; t++) n[t] = t;
|
|
990
|
+
return t = tn[e] = new _({ uTextures: {
|
|
991
|
+
value: n,
|
|
992
|
+
type: "i32",
|
|
993
|
+
size: e
|
|
994
|
+
} }, { isStatic: !0 }), t;
|
|
995
|
+
}
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/batcher/shared/DefaultShader.mjs
|
|
998
|
+
var rn = class extends ce {
|
|
999
|
+
constructor(e) {
|
|
1000
|
+
let t = Ut({
|
|
1001
|
+
name: "batch",
|
|
1002
|
+
bits: [
|
|
1003
|
+
Gt,
|
|
1004
|
+
Qt(e),
|
|
1005
|
+
en
|
|
1006
|
+
]
|
|
1007
|
+
}), n = Ht({
|
|
1008
|
+
name: "batch",
|
|
1009
|
+
bits: [
|
|
1010
|
+
Wt,
|
|
1011
|
+
Yt(e),
|
|
1012
|
+
$t
|
|
1013
|
+
]
|
|
1014
|
+
});
|
|
1015
|
+
super({
|
|
1016
|
+
glProgram: t,
|
|
1017
|
+
gpuProgram: n,
|
|
1018
|
+
resources: { batchSamplers: nn(e) }
|
|
1019
|
+
}), this.maxTextures = e;
|
|
1020
|
+
}
|
|
1021
|
+
}, q = null, an = class e extends ht {
|
|
1022
|
+
constructor(t) {
|
|
1023
|
+
super(t), this.geometry = new vt(), this.name = e.extension.name, this.vertexSize = 6, q ??= new rn(t.maxTextures), this.shader = q;
|
|
1024
|
+
}
|
|
1025
|
+
packAttributes(e, t, n, r, i) {
|
|
1026
|
+
let a = i << 16 | e.roundPixels & 65535, o = e.transform, s = o.a, c = o.b, l = o.c, u = o.d, d = o.tx, f = o.ty, { positions: p, uvs: m } = e, h = e.color, g = e.attributeOffset, _ = g + e.attributeSize;
|
|
1027
|
+
for (let e = g; e < _; e++) {
|
|
1028
|
+
let i = e * 2, o = p[i], g = p[i + 1];
|
|
1029
|
+
t[r++] = s * o + l * g + d, t[r++] = u * g + c * o + f, t[r++] = m[i], t[r++] = m[i + 1], n[r++] = h, n[r++] = a;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
packQuadAttributes(e, t, n, r, i) {
|
|
1033
|
+
let a = e.texture, o = e.transform, s = o.a, c = o.b, l = o.c, u = o.d, d = o.tx, f = o.ty, p = e.bounds, m = p.maxX, h = p.minX, g = p.maxY, _ = p.minY, v = a.uvs, y = e.color, b = i << 16 | e.roundPixels & 65535;
|
|
1034
|
+
t[r + 0] = s * h + l * _ + d, t[r + 1] = u * _ + c * h + f, t[r + 2] = v.x0, t[r + 3] = v.y0, n[r + 4] = y, n[r + 5] = b, t[r + 6] = s * m + l * _ + d, t[r + 7] = u * _ + c * m + f, t[r + 8] = v.x1, t[r + 9] = v.y1, n[r + 10] = y, n[r + 11] = b, t[r + 12] = s * m + l * g + d, t[r + 13] = u * g + c * m + f, t[r + 14] = v.x2, t[r + 15] = v.y2, n[r + 16] = y, n[r + 17] = b, t[r + 18] = s * h + l * g + d, t[r + 19] = u * g + c * h + f, t[r + 20] = v.x3, t[r + 21] = v.y3, n[r + 22] = y, n[r + 23] = b;
|
|
1035
|
+
}
|
|
1036
|
+
_updateMaxTextures(e) {
|
|
1037
|
+
this.shader.maxTextures !== e && (q = new rn(e), this.shader = q);
|
|
1038
|
+
}
|
|
1039
|
+
destroy() {
|
|
1040
|
+
this.shader = null, super.destroy();
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
an.extension = {
|
|
1044
|
+
type: [g.Batcher],
|
|
1045
|
+
name: "default"
|
|
1046
|
+
};
|
|
1047
|
+
var on = an, sn = class e {
|
|
1048
|
+
constructor(e, t) {
|
|
1049
|
+
this.state = oe.for2d(), this._batchersByInstructionSet = /* @__PURE__ */ Object.create(null), this._activeBatches = /* @__PURE__ */ Object.create(null), this.renderer = e, this._adaptor = t, this._adaptor.init?.(this);
|
|
1050
|
+
}
|
|
1051
|
+
static getBatcher(e, t) {
|
|
1052
|
+
return new this._availableBatchers[e]({ maxTextures: t });
|
|
1053
|
+
}
|
|
1054
|
+
buildStart(e) {
|
|
1055
|
+
let t = this._batchersByInstructionSet[e.uid];
|
|
1056
|
+
t || (t = this._batchersByInstructionSet[e.uid] = /* @__PURE__ */ Object.create(null), t.default ||= new on({ maxTextures: this.renderer.limits.maxBatchableTextures })), this._activeBatches = t, this._activeBatch = this._activeBatches.default;
|
|
1057
|
+
for (let e in this._activeBatches) this._activeBatches[e].begin();
|
|
1058
|
+
}
|
|
1059
|
+
addToBatch(t, n) {
|
|
1060
|
+
if (this._activeBatch.name !== t.batcherName) {
|
|
1061
|
+
this._activeBatch.break(n);
|
|
1062
|
+
let r = this._activeBatches[t.batcherName];
|
|
1063
|
+
r || (r = this._activeBatches[t.batcherName] = e.getBatcher(t.batcherName, this.renderer.limits.maxBatchableTextures), r.begin()), this._activeBatch = r;
|
|
1064
|
+
}
|
|
1065
|
+
this._activeBatch.add(t);
|
|
1066
|
+
}
|
|
1067
|
+
break(e) {
|
|
1068
|
+
this._activeBatch.break(e);
|
|
1069
|
+
}
|
|
1070
|
+
buildEnd(e) {
|
|
1071
|
+
this._activeBatch.break(e);
|
|
1072
|
+
let t = this._activeBatches;
|
|
1073
|
+
for (let e in t) {
|
|
1074
|
+
let n = t[e], r = n.geometry;
|
|
1075
|
+
r.indexBuffer.setDataWithSize(n.indexBuffer, n.indexSize, !0), r.buffers[0].setDataWithSize(n.attributeBuffer.float32View, n.attributeSize, !1);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
upload(e) {
|
|
1079
|
+
let t = this._batchersByInstructionSet[e.uid];
|
|
1080
|
+
for (let e in t) {
|
|
1081
|
+
let n = t[e], r = n.geometry;
|
|
1082
|
+
n.dirty && (n.dirty = !1, r.buffers[0].update(n.attributeSize * 4));
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
execute(e) {
|
|
1086
|
+
if (e.action === "startBatch") {
|
|
1087
|
+
let t = e.batcher, n = t.geometry, r = t.shader;
|
|
1088
|
+
this._adaptor.start(this, n, r);
|
|
1089
|
+
}
|
|
1090
|
+
this._adaptor.execute(this, e);
|
|
1091
|
+
}
|
|
1092
|
+
destroy() {
|
|
1093
|
+
this.state = null, this.renderer = null, this._adaptor = null;
|
|
1094
|
+
for (let e in this._activeBatches) this._activeBatches[e].destroy();
|
|
1095
|
+
this._activeBatches = null;
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
sn.extension = {
|
|
1099
|
+
type: [
|
|
1100
|
+
g.WebGLPipes,
|
|
1101
|
+
g.WebGPUPipes,
|
|
1102
|
+
g.CanvasPipes
|
|
1103
|
+
],
|
|
1104
|
+
name: "batch"
|
|
1105
|
+
}, sn._availableBatchers = /* @__PURE__ */ Object.create(null);
|
|
1106
|
+
var cn = sn;
|
|
1107
|
+
x.handleByMap(g.Batcher, cn._availableBatchers), x.add(on);
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/filters/mask/mask.frag.mjs
|
|
1110
|
+
var ln = "in vec2 vMaskCoord;\nin vec2 vTextureCoord;\n\nuniform sampler2D uTexture;\nuniform sampler2D uMaskTexture;\n\nuniform float uAlpha;\nuniform vec4 uMaskClamp;\nuniform float uInverse;\nuniform float uChannel;\n\nout vec4 finalColor;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(uMaskClamp.x, vMaskCoord.x) +\n step(uMaskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, uMaskClamp.z) +\n step(vMaskCoord.y, uMaskClamp.w));\n\n // TODO look into why this is needed\n float npmAlpha = uAlpha;\n vec4 original = texture(uTexture, vTextureCoord);\n vec4 masky = texture(uMaskTexture, vMaskCoord);\n\n float a;\n if (uChannel == 1.0) {\n a = masky.a * npmAlpha * clip;\n } else {\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n a = alphaMul * masky.r * npmAlpha * clip;\n }\n\n if (uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n finalColor = original * a;\n}\n", un = "in vec2 aPosition;\n\nout vec2 vTextureCoord;\nout vec2 vMaskCoord;\n\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\nuniform mat3 uFilterMatrix;\n\nvec4 filterVertexPosition( vec2 aPosition )\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( vec2 aPosition )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvec2 getFilterCoord( vec2 aPosition )\n{\n return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\n} \n\nvoid main(void)\n{\n gl_Position = filterVertexPosition(aPosition);\n vTextureCoord = filterTextureCoord(aPosition);\n vMaskCoord = getFilterCoord(aPosition);\n}\n", dn = "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\nstruct MaskUniforms {\n uFilterMatrix:mat3x3<f32>,\n uMaskClamp:vec4<f32>,\n uAlpha:f32,\n uInverse:f32,\n uChannel: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\n@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;\n@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>,\n @location(1) filterUv : 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\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);\n}\n\nfn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>\n{\n return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\n}\n\nfn getSize() -> vec2<f32>\n{\n return gfu.uGlobalFrame.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 getFilterCoord(aPosition)\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n @location(1) filterUv: vec2<f32>,\n @builtin(position) position: vec4<f32>\n) -> @location(0) vec4<f32> {\n\n var maskClamp = filterUniforms.uMaskClamp;\n var uAlpha = filterUniforms.uAlpha;\n\n var clip = step(3.5,\n step(maskClamp.x, filterUv.x) +\n step(maskClamp.y, filterUv.y) +\n step(filterUv.x, maskClamp.z) +\n step(filterUv.y, maskClamp.w));\n\n var mask = textureSample(uMaskTexture, uSampler, filterUv);\n var source = textureSample(uTexture, uSampler, uv);\n\n var a: f32;\n if (filterUniforms.uChannel == 1.0) {\n a = mask.a * uAlpha * clip;\n } else {\n var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);\n a = alphaMul * mask.r * uAlpha * clip;\n }\n\n if (filterUniforms.uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n return source * a;\n}\n", fn = class extends te {
|
|
1111
|
+
constructor(e) {
|
|
1112
|
+
let { sprite: t, ...r } = e, i = new n(t.texture), a = new _({
|
|
1113
|
+
uFilterMatrix: {
|
|
1114
|
+
value: new y(),
|
|
1115
|
+
type: "mat3x3<f32>"
|
|
1116
|
+
},
|
|
1117
|
+
uMaskClamp: {
|
|
1118
|
+
value: i.uClampFrame,
|
|
1119
|
+
type: "vec4<f32>"
|
|
1120
|
+
},
|
|
1121
|
+
uAlpha: {
|
|
1122
|
+
value: 1,
|
|
1123
|
+
type: "f32"
|
|
1124
|
+
},
|
|
1125
|
+
uInverse: {
|
|
1126
|
+
value: +!!e.inverse,
|
|
1127
|
+
type: "f32"
|
|
1128
|
+
},
|
|
1129
|
+
uChannel: {
|
|
1130
|
+
value: +(e.channel === "alpha"),
|
|
1131
|
+
type: "f32"
|
|
1132
|
+
}
|
|
1133
|
+
}), o = b.from({
|
|
1134
|
+
vertex: {
|
|
1135
|
+
source: dn,
|
|
1136
|
+
entryPoint: "mainVertex"
|
|
1137
|
+
},
|
|
1138
|
+
fragment: {
|
|
1139
|
+
source: dn,
|
|
1140
|
+
entryPoint: "mainFragment"
|
|
1141
|
+
}
|
|
1142
|
+
}), s = ie.from({
|
|
1143
|
+
vertex: un,
|
|
1144
|
+
fragment: ln,
|
|
1145
|
+
name: "mask-filter"
|
|
1146
|
+
});
|
|
1147
|
+
super({
|
|
1148
|
+
...r,
|
|
1149
|
+
gpuProgram: o,
|
|
1150
|
+
glProgram: s,
|
|
1151
|
+
clipToViewport: !1,
|
|
1152
|
+
resources: {
|
|
1153
|
+
filterUniforms: a,
|
|
1154
|
+
uMaskTexture: t.texture.source
|
|
1155
|
+
}
|
|
1156
|
+
}), this.sprite = t, this._textureMatrix = i;
|
|
1157
|
+
}
|
|
1158
|
+
setSprite(e) {
|
|
1159
|
+
this.sprite = e;
|
|
1160
|
+
let t = this._getSafeTexture();
|
|
1161
|
+
this._textureMatrix.texture = t, this.resources.uMaskTexture = t.source;
|
|
1162
|
+
}
|
|
1163
|
+
set inverse(e) {
|
|
1164
|
+
this.resources.filterUniforms.uniforms.uInverse = +!!e;
|
|
1165
|
+
}
|
|
1166
|
+
get inverse() {
|
|
1167
|
+
return this.resources.filterUniforms.uniforms.uInverse === 1;
|
|
1168
|
+
}
|
|
1169
|
+
set channel(e) {
|
|
1170
|
+
this.resources.filterUniforms.uniforms.uChannel = +(e === "alpha");
|
|
1171
|
+
}
|
|
1172
|
+
get channel() {
|
|
1173
|
+
return this.resources.filterUniforms.uniforms.uChannel === 1 ? "alpha" : "red";
|
|
1174
|
+
}
|
|
1175
|
+
apply(e, t, n, r) {
|
|
1176
|
+
let i = this._getSafeTexture();
|
|
1177
|
+
this._textureMatrix.texture = i, e.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix, this.sprite).prepend(this._textureMatrix.mapCoord), this.resources.uMaskTexture = i.source, e.applyFilter(this, t, n, r);
|
|
1178
|
+
}
|
|
1179
|
+
_getSafeTexture() {
|
|
1180
|
+
let e = this.sprite.texture;
|
|
1181
|
+
return e.destroyed || !e.source || e.source.destroyed ? (o("[MaskFilter] The mask texture was destroyed while the mask is still in use. Remove the mask before destroying its texture."), r.EMPTY) : e;
|
|
1182
|
+
}
|
|
1183
|
+
destroy(e = !1) {
|
|
1184
|
+
this._textureMatrix.destroy(), super.destroy(e);
|
|
1185
|
+
}
|
|
1186
|
+
}, pn = new a(), mn = class extends f {
|
|
1187
|
+
constructor() {
|
|
1188
|
+
super(), this._placeholderSprite = new de(r.EMPTY), this.filters = [new fn({
|
|
1189
|
+
sprite: this._placeholderSprite,
|
|
1190
|
+
inverse: !1,
|
|
1191
|
+
resolution: "inherit",
|
|
1192
|
+
antialias: "inherit"
|
|
1193
|
+
})];
|
|
1194
|
+
}
|
|
1195
|
+
get sprite() {
|
|
1196
|
+
return this.filters[0].sprite;
|
|
1197
|
+
}
|
|
1198
|
+
set sprite(e) {
|
|
1199
|
+
this.filters[0].setSprite(e);
|
|
1200
|
+
}
|
|
1201
|
+
get inverse() {
|
|
1202
|
+
return this.filters[0].inverse;
|
|
1203
|
+
}
|
|
1204
|
+
set inverse(e) {
|
|
1205
|
+
this.filters[0].inverse = e;
|
|
1206
|
+
}
|
|
1207
|
+
get channel() {
|
|
1208
|
+
return this.filters[0].channel;
|
|
1209
|
+
}
|
|
1210
|
+
set channel(e) {
|
|
1211
|
+
this.filters[0].channel = e;
|
|
1212
|
+
}
|
|
1213
|
+
reset() {
|
|
1214
|
+
this._placeholderSprite.texture = r.EMPTY, this.sprite = this._placeholderSprite;
|
|
1215
|
+
}
|
|
1216
|
+
}, hn = class {
|
|
1217
|
+
constructor(e) {
|
|
1218
|
+
this._activeMaskStage = [], this._usedEffects = [], this._renderer = e, e.runners.postrender.add(this);
|
|
1219
|
+
}
|
|
1220
|
+
push(e, t, n) {
|
|
1221
|
+
let r = this._renderer;
|
|
1222
|
+
if (r.renderPipes.batch.break(n), n.add({
|
|
1223
|
+
renderPipeId: "alphaMask",
|
|
1224
|
+
action: "pushMaskBegin",
|
|
1225
|
+
mask: e,
|
|
1226
|
+
inverse: t._maskOptions.inverse,
|
|
1227
|
+
canBundle: !1,
|
|
1228
|
+
maskedContainer: t
|
|
1229
|
+
}), e.inverse = t._maskOptions.inverse, e.channel = t._maskOptions.channel ?? "red", e.renderMaskToTexture) {
|
|
1230
|
+
let t = e.mask;
|
|
1231
|
+
t.includeInBuild = !0, t.collectRenderables(n, r, null), t.includeInBuild = !1;
|
|
1232
|
+
}
|
|
1233
|
+
r.renderPipes.batch.break(n), n.add({
|
|
1234
|
+
renderPipeId: "alphaMask",
|
|
1235
|
+
action: "pushMaskEnd",
|
|
1236
|
+
mask: e,
|
|
1237
|
+
maskedContainer: t,
|
|
1238
|
+
inverse: t._maskOptions.inverse,
|
|
1239
|
+
canBundle: !1
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
pop(e, t, n) {
|
|
1243
|
+
this._renderer.renderPipes.batch.break(n), n.add({
|
|
1244
|
+
renderPipeId: "alphaMask",
|
|
1245
|
+
action: "popMaskEnd",
|
|
1246
|
+
mask: e,
|
|
1247
|
+
inverse: t._maskOptions.inverse,
|
|
1248
|
+
canBundle: !1
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
execute(e) {
|
|
1252
|
+
let t = this._renderer, n = e.mask.renderMaskToTexture;
|
|
1253
|
+
if (e.action === "pushMaskBegin") {
|
|
1254
|
+
let r = s.get(mn);
|
|
1255
|
+
if (r.inverse = e.inverse, r.channel = e.mask.channel, n) {
|
|
1256
|
+
e.mask.mask.measurable = !0;
|
|
1257
|
+
let n = he(e.mask.mask, !0, pn);
|
|
1258
|
+
e.mask.mask.measurable = !1, n.ceil();
|
|
1259
|
+
let i = t.renderTarget.renderTarget.colorTexture.source, a = u.getOptimalTexture(n.width, n.height, i._resolution, i.antialias);
|
|
1260
|
+
t.renderTarget.push({
|
|
1261
|
+
target: a,
|
|
1262
|
+
clear: !0
|
|
1263
|
+
}), t.globalUniforms.push({
|
|
1264
|
+
offset: n,
|
|
1265
|
+
worldColor: 4294967295
|
|
1266
|
+
});
|
|
1267
|
+
let o = r.sprite;
|
|
1268
|
+
o.texture = a, o.worldTransform.tx = n.minX, o.worldTransform.ty = n.minY, this._activeMaskStage.push({
|
|
1269
|
+
filterEffect: r,
|
|
1270
|
+
maskedContainer: e.maskedContainer,
|
|
1271
|
+
filterTexture: a
|
|
1272
|
+
});
|
|
1273
|
+
} else r.sprite = e.mask.mask, this._activeMaskStage.push({
|
|
1274
|
+
filterEffect: r,
|
|
1275
|
+
maskedContainer: e.maskedContainer
|
|
1276
|
+
});
|
|
1277
|
+
} else if (e.action === "pushMaskEnd") {
|
|
1278
|
+
let e = this._activeMaskStage[this._activeMaskStage.length - 1];
|
|
1279
|
+
n && (t.type === w.WEBGL && t.renderTarget.finishRenderPass(), t.renderTarget.pop(), t.globalUniforms.pop()), t.filter.push({
|
|
1280
|
+
renderPipeId: "filter",
|
|
1281
|
+
action: "pushFilter",
|
|
1282
|
+
container: e.maskedContainer,
|
|
1283
|
+
filterEffect: e.filterEffect,
|
|
1284
|
+
canBundle: !1
|
|
1285
|
+
});
|
|
1286
|
+
} else if (e.action === "popMaskEnd") {
|
|
1287
|
+
t.filter.pop();
|
|
1288
|
+
let e = this._activeMaskStage.pop();
|
|
1289
|
+
n && u.returnTexture(e.filterTexture), this._usedEffects.push(e.filterEffect);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
postrender() {
|
|
1293
|
+
let e = this._usedEffects;
|
|
1294
|
+
for (let t = 0; t < e.length; t++) s.return(e[t]);
|
|
1295
|
+
e.length = 0;
|
|
1296
|
+
}
|
|
1297
|
+
destroy() {
|
|
1298
|
+
this.postrender(), this._renderer.runners.postrender.remove(this), this._renderer = null, this._activeMaskStage = null, this._usedEffects = null;
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
hn.extension = {
|
|
1302
|
+
type: [
|
|
1303
|
+
g.WebGLPipes,
|
|
1304
|
+
g.WebGPUPipes,
|
|
1305
|
+
g.CanvasPipes
|
|
1306
|
+
],
|
|
1307
|
+
name: "alphaMask"
|
|
1308
|
+
};
|
|
1309
|
+
//#endregion
|
|
1310
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/GCManagedHash.mjs
|
|
1311
|
+
var gn = class {
|
|
1312
|
+
constructor(e) {
|
|
1313
|
+
this.items = /* @__PURE__ */ Object.create(null);
|
|
1314
|
+
let { renderer: t, type: n, onUnload: r, priority: i, name: a } = e;
|
|
1315
|
+
this._renderer = t, t.gc.addResourceHash(this, "items", n, i ?? 0), this._onUnload = r, this.name = a;
|
|
1316
|
+
}
|
|
1317
|
+
add(e) {
|
|
1318
|
+
return this.items[e.uid] ? !1 : (this.items[e.uid] = e, e.once("unload", this.remove, this), e._gcLastUsed = this._renderer.gc.now, !0);
|
|
1319
|
+
}
|
|
1320
|
+
remove(e, ...t) {
|
|
1321
|
+
if (!this.items[e.uid]) return;
|
|
1322
|
+
let n = e._gpuData[this._renderer.uid];
|
|
1323
|
+
n && (this._onUnload?.(e, ...t), n.destroy(), e._gpuData[this._renderer.uid] = null, this.items[e.uid] = null);
|
|
1324
|
+
}
|
|
1325
|
+
removeAll(...e) {
|
|
1326
|
+
Object.values(this.items).forEach((t) => t && this.remove(t, ...e));
|
|
1327
|
+
}
|
|
1328
|
+
destroy(...e) {
|
|
1329
|
+
this.removeAll(...e), this.items = /* @__PURE__ */ Object.create(null), this._renderer = null, this._onUnload = null;
|
|
1330
|
+
}
|
|
1331
|
+
};
|
|
1332
|
+
//#endregion
|
|
1333
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/gpu/colorToUniform.mjs
|
|
1334
|
+
function _n(e, t, n) {
|
|
1335
|
+
let r = (e >> 24 & 255) / 255;
|
|
1336
|
+
t[n++] = (e & 255) / 255 * r, t[n++] = (e >> 8 & 255) / 255 * r, t[n++] = (e >> 16 & 255) / 255 * r, t[n++] = r;
|
|
1337
|
+
}
|
|
1338
|
+
//#endregion
|
|
1339
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/blendModes/BlendModePipe.mjs
|
|
1340
|
+
var J = {};
|
|
1341
|
+
x.handle(g.BlendMode, (e) => {
|
|
1342
|
+
if (!e.name) throw Error("BlendMode extension must have a name property");
|
|
1343
|
+
J[e.name] = e.ref;
|
|
1344
|
+
}, (e) => {
|
|
1345
|
+
delete J[e.name];
|
|
1346
|
+
});
|
|
1347
|
+
var vn = class {
|
|
1348
|
+
constructor(e) {
|
|
1349
|
+
this._blendModeStack = [], this._isAdvanced = !1, this._filterHash = /* @__PURE__ */ Object.create(null), this._renderer = e, this._renderer.runners.prerender.add(this);
|
|
1350
|
+
}
|
|
1351
|
+
prerender() {
|
|
1352
|
+
this._activeBlendMode = "normal", this._isAdvanced = !1;
|
|
1353
|
+
}
|
|
1354
|
+
pushBlendMode(e, t, n) {
|
|
1355
|
+
this._blendModeStack.push(t), this.setBlendMode(e, t, n);
|
|
1356
|
+
}
|
|
1357
|
+
popBlendMode(e) {
|
|
1358
|
+
this._blendModeStack.pop();
|
|
1359
|
+
let t = this._blendModeStack[this._activeBlendMode.length - 1] ?? "normal";
|
|
1360
|
+
this.setBlendMode(null, t, e);
|
|
1361
|
+
}
|
|
1362
|
+
setBlendMode(e, t, n) {
|
|
1363
|
+
let r = e instanceof fe;
|
|
1364
|
+
if (this._activeBlendMode === t) {
|
|
1365
|
+
this._isAdvanced && e && !r && this._renderableList?.push(e);
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
this._isAdvanced && this._endAdvancedBlendMode(n), this._activeBlendMode = t, e && (this._isAdvanced = !!J[t], this._isAdvanced && this._beginAdvancedBlendMode(e, n));
|
|
1369
|
+
}
|
|
1370
|
+
_beginAdvancedBlendMode(e, t) {
|
|
1371
|
+
this._renderer.renderPipes.batch.break(t);
|
|
1372
|
+
let n = this._activeBlendMode;
|
|
1373
|
+
if (!J[n]) {
|
|
1374
|
+
o(`Unable to assign BlendMode: '${n}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
let r = this._ensureFilterEffect(n), i = e instanceof fe, a = {
|
|
1378
|
+
renderPipeId: "filter",
|
|
1379
|
+
action: "pushFilter",
|
|
1380
|
+
filterEffect: r,
|
|
1381
|
+
renderables: i ? null : [e],
|
|
1382
|
+
container: i ? e.root : null,
|
|
1383
|
+
canBundle: !1
|
|
1384
|
+
};
|
|
1385
|
+
this._renderableList = a.renderables, t.add(a);
|
|
1386
|
+
}
|
|
1387
|
+
_ensureFilterEffect(e) {
|
|
1388
|
+
let t = this._filterHash[e];
|
|
1389
|
+
return t || (t = this._filterHash[e] = new f(), t.filters = [new J[e]()]), t;
|
|
1390
|
+
}
|
|
1391
|
+
_endAdvancedBlendMode(e) {
|
|
1392
|
+
this._isAdvanced = !1, this._renderableList = null, this._renderer.renderPipes.batch.break(e), e.add({
|
|
1393
|
+
renderPipeId: "filter",
|
|
1394
|
+
action: "popFilter",
|
|
1395
|
+
canBundle: !1
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
buildStart() {
|
|
1399
|
+
this._isAdvanced = !1;
|
|
1400
|
+
}
|
|
1401
|
+
buildEnd(e) {
|
|
1402
|
+
this._isAdvanced && this._endAdvancedBlendMode(e);
|
|
1403
|
+
}
|
|
1404
|
+
destroy() {
|
|
1405
|
+
this._renderer = null, this._renderableList = null;
|
|
1406
|
+
for (let e in this._filterHash) this._filterHash[e].destroy();
|
|
1407
|
+
this._filterHash = null;
|
|
1408
|
+
}
|
|
1409
|
+
};
|
|
1410
|
+
vn.extension = {
|
|
1411
|
+
type: [
|
|
1412
|
+
g.WebGLPipes,
|
|
1413
|
+
g.WebGPUPipes,
|
|
1414
|
+
g.CanvasPipes
|
|
1415
|
+
],
|
|
1416
|
+
name: "blendMode"
|
|
1417
|
+
};
|
|
1418
|
+
//#endregion
|
|
1419
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/environment/autoDetectEnvironment.mjs
|
|
1420
|
+
var yn = [];
|
|
1421
|
+
x.handleByNamedList(g.Environment, yn);
|
|
1422
|
+
async function bn(e) {
|
|
1423
|
+
if (!e) for (let e = 0; e < yn.length; e++) {
|
|
1424
|
+
let t = yn[e];
|
|
1425
|
+
if (t.value.test()) {
|
|
1426
|
+
await t.value.load();
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
//#endregion
|
|
1432
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/browser/unsafeEvalSupported.mjs
|
|
1433
|
+
var Y;
|
|
1434
|
+
function xn() {
|
|
1435
|
+
if (typeof Y == "boolean") return Y;
|
|
1436
|
+
try {
|
|
1437
|
+
Y = Function("param1", "param2", "param3", "return param1[param2] === param3;")({ a: "b" }, "a", "b") === !0;
|
|
1438
|
+
} catch {
|
|
1439
|
+
Y = !1;
|
|
1440
|
+
}
|
|
1441
|
+
return Y;
|
|
1442
|
+
}
|
|
1443
|
+
//#endregion
|
|
1444
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/const.mjs
|
|
1445
|
+
var X = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.COLOR = 16384] = "COLOR", e[e.STENCIL = 1024] = "STENCIL", e[e.DEPTH = 256] = "DEPTH", e[e.COLOR_DEPTH = 16640] = "COLOR_DEPTH", e[e.COLOR_STENCIL = 17408] = "COLOR_STENCIL", e[e.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL", e[e.ALL = 17664] = "ALL", e))(X || {}), Sn = class {
|
|
1446
|
+
constructor(e) {
|
|
1447
|
+
this.items = [], this._name = e;
|
|
1448
|
+
}
|
|
1449
|
+
emit(e, t, n, r, i, a, o, s) {
|
|
1450
|
+
let { name: c, items: l } = this;
|
|
1451
|
+
for (let u = 0, d = l.length; u < d; u++) l[u][c](e, t, n, r, i, a, o, s);
|
|
1452
|
+
return this;
|
|
1453
|
+
}
|
|
1454
|
+
add(e) {
|
|
1455
|
+
return e[this._name] && (this.remove(e), this.items.push(e)), this;
|
|
1456
|
+
}
|
|
1457
|
+
remove(e) {
|
|
1458
|
+
let t = this.items.indexOf(e);
|
|
1459
|
+
return t !== -1 && this.items.splice(t, 1), this;
|
|
1460
|
+
}
|
|
1461
|
+
contains(e) {
|
|
1462
|
+
return this.items.indexOf(e) !== -1;
|
|
1463
|
+
}
|
|
1464
|
+
removeAll() {
|
|
1465
|
+
return this.items.length = 0, this;
|
|
1466
|
+
}
|
|
1467
|
+
destroy() {
|
|
1468
|
+
this.removeAll(), this.items = null, this._name = null;
|
|
1469
|
+
}
|
|
1470
|
+
get empty() {
|
|
1471
|
+
return this.items.length === 0;
|
|
1472
|
+
}
|
|
1473
|
+
get name() {
|
|
1474
|
+
return this._name;
|
|
1475
|
+
}
|
|
1476
|
+
}, Cn = [
|
|
1477
|
+
"init",
|
|
1478
|
+
"destroy",
|
|
1479
|
+
"contextChange",
|
|
1480
|
+
"resolutionChange",
|
|
1481
|
+
"resetState",
|
|
1482
|
+
"renderEnd",
|
|
1483
|
+
"renderStart",
|
|
1484
|
+
"render",
|
|
1485
|
+
"update",
|
|
1486
|
+
"postrender",
|
|
1487
|
+
"prerender"
|
|
1488
|
+
], wn = class e extends ne {
|
|
1489
|
+
constructor(e) {
|
|
1490
|
+
super(), this.tick = 0, this.uid = l("renderer"), this.runners = /* @__PURE__ */ Object.create(null), this.renderPipes = /* @__PURE__ */ Object.create(null), this._initOptions = {}, this._systemsHash = /* @__PURE__ */ Object.create(null), this.type = e.type, this.name = e.name, this.config = e;
|
|
1491
|
+
let t = [...Cn, ...this.config.runners ?? []];
|
|
1492
|
+
this._addRunners(...t), this._unsafeEvalCheck();
|
|
1493
|
+
}
|
|
1494
|
+
async init(t = {}) {
|
|
1495
|
+
await bn(t.skipExtensionImports === !0 ? !0 : t.manageImports === !1), this._addSystems(this.config.systems), this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);
|
|
1496
|
+
for (let e in this._systemsHash) t = {
|
|
1497
|
+
...this._systemsHash[e].constructor.defaultOptions,
|
|
1498
|
+
...t
|
|
1499
|
+
};
|
|
1500
|
+
t = {
|
|
1501
|
+
...e.defaultOptions,
|
|
1502
|
+
...t
|
|
1503
|
+
}, this._roundPixels = +!!t.roundPixels;
|
|
1504
|
+
for (let e = 0; e < this.runners.init.items.length; e++) await this.runners.init.items[e].init(t);
|
|
1505
|
+
this._initOptions = t;
|
|
1506
|
+
}
|
|
1507
|
+
render(e, n) {
|
|
1508
|
+
this.tick++;
|
|
1509
|
+
let r = e;
|
|
1510
|
+
if (r instanceof t && (r = { container: r }, n && (m(p, "passing a second argument is deprecated, please use render options instead"), r.target = n.renderTexture)), r.target ||= this.view.renderTarget, r.target === this.view.renderTarget && (this._lastObjectRendered = r.container, r.clearColor ??= this.background.colorRgba, r.clear ??= this.background.clearBeforeRender), r.clearColor) {
|
|
1511
|
+
let e = Array.isArray(r.clearColor) && r.clearColor.length === 4;
|
|
1512
|
+
r.clearColor = e ? r.clearColor : C.shared.setValue(r.clearColor).toArray();
|
|
1513
|
+
}
|
|
1514
|
+
r.transform || (r.container.updateLocalTransform(), r.transform = r.container.localTransform), r.container.visible && (r.container.enableRenderGroup(), this.runners.prerender.emit(r), this.runners.renderStart.emit(r), this.runners.render.emit(r), this.runners.renderEnd.emit(r), this.runners.postrender.emit(r));
|
|
1515
|
+
}
|
|
1516
|
+
resize(e, t, n) {
|
|
1517
|
+
let r = this.view.resolution;
|
|
1518
|
+
this.view.resize(e, t, n), this.emit("resize", this.view.screen.width, this.view.screen.height, this.view.resolution), n !== void 0 && n !== r && this.runners.resolutionChange.emit(n);
|
|
1519
|
+
}
|
|
1520
|
+
clear(e = {}) {
|
|
1521
|
+
let t = this;
|
|
1522
|
+
e.target ||= t.renderTarget.renderTarget, e.clearColor ||= this.background.colorRgba, e.clear ??= X.ALL;
|
|
1523
|
+
let { clear: n, clearColor: r, target: i, mipLevel: a, layer: o } = e;
|
|
1524
|
+
C.shared.setValue(r ?? this.background.colorRgba), t.renderTarget.clear(i, n, C.shared.toArray(), a ?? 0, o ?? 0);
|
|
1525
|
+
}
|
|
1526
|
+
get resolution() {
|
|
1527
|
+
return this.view.resolution;
|
|
1528
|
+
}
|
|
1529
|
+
set resolution(e) {
|
|
1530
|
+
this.view.resolution = e, this.runners.resolutionChange.emit(e);
|
|
1531
|
+
}
|
|
1532
|
+
get width() {
|
|
1533
|
+
return this.view.texture.frame.width;
|
|
1534
|
+
}
|
|
1535
|
+
get height() {
|
|
1536
|
+
return this.view.texture.frame.height;
|
|
1537
|
+
}
|
|
1538
|
+
get canvas() {
|
|
1539
|
+
return this.view.canvas;
|
|
1540
|
+
}
|
|
1541
|
+
get lastObjectRendered() {
|
|
1542
|
+
return this._lastObjectRendered;
|
|
1543
|
+
}
|
|
1544
|
+
get renderingToScreen() {
|
|
1545
|
+
return this.renderTarget.renderingToScreen;
|
|
1546
|
+
}
|
|
1547
|
+
get screen() {
|
|
1548
|
+
return this.view.screen;
|
|
1549
|
+
}
|
|
1550
|
+
_addRunners(...e) {
|
|
1551
|
+
e.forEach((e) => {
|
|
1552
|
+
this.runners[e] = new Sn(e);
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
_addSystems(e) {
|
|
1556
|
+
let t;
|
|
1557
|
+
for (t in e) {
|
|
1558
|
+
let n = e[t];
|
|
1559
|
+
this._addSystem(n.value, n.name);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
_addSystem(e, t) {
|
|
1563
|
+
let n = new e(this);
|
|
1564
|
+
if (this[t]) throw Error(`Whoops! The name "${t}" is already in use`);
|
|
1565
|
+
this[t] = n, this._systemsHash[t] = n;
|
|
1566
|
+
for (let e in this.runners) this.runners[e].add(n);
|
|
1567
|
+
return this;
|
|
1568
|
+
}
|
|
1569
|
+
_addPipes(e, t) {
|
|
1570
|
+
let n = t.reduce((e, t) => (e[t.name] = t.value, e), {});
|
|
1571
|
+
e.forEach((e) => {
|
|
1572
|
+
let t = e.value, r = e.name, i = n[r];
|
|
1573
|
+
this.renderPipes[r] = new t(this, i ? new i() : null), this.runners.destroy.add(this.renderPipes[r]);
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
destroy(e = !1) {
|
|
1577
|
+
this.runners.destroy.items.reverse(), this.runners.destroy.emit(e), (e === !0 || typeof e == "object" && e.releaseGlobalResources) && se.release(), Object.values(this.runners).forEach((e) => {
|
|
1578
|
+
e.destroy();
|
|
1579
|
+
}), this._systemsHash = null, this.renderPipes = null, this.removeAllListeners();
|
|
1580
|
+
}
|
|
1581
|
+
generateTexture(e) {
|
|
1582
|
+
return this.textureGenerator.generateTexture(e);
|
|
1583
|
+
}
|
|
1584
|
+
get roundPixels() {
|
|
1585
|
+
return !!this._roundPixels;
|
|
1586
|
+
}
|
|
1587
|
+
_unsafeEvalCheck() {
|
|
1588
|
+
if (!xn()) throw Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.");
|
|
1589
|
+
}
|
|
1590
|
+
resetState() {
|
|
1591
|
+
this.runners.resetState.emit();
|
|
1592
|
+
}
|
|
1593
|
+
};
|
|
1594
|
+
wn.defaultOptions = {
|
|
1595
|
+
resolution: 1,
|
|
1596
|
+
failIfMajorPerformanceCaveat: !1,
|
|
1597
|
+
roundPixels: !1
|
|
1598
|
+
};
|
|
1599
|
+
var Tn = wn;
|
|
1600
|
+
//#endregion
|
|
1601
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/clearList.mjs
|
|
1602
|
+
function En(e, t) {
|
|
1603
|
+
t ||= 0;
|
|
1604
|
+
for (let n = t; n < e.length && e[n]; n++) e[n] = null;
|
|
1605
|
+
}
|
|
1606
|
+
//#endregion
|
|
1607
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/updateRenderGroupTransforms.mjs
|
|
1608
|
+
var Dn = new t(), On = 7;
|
|
1609
|
+
function kn(e, t = !1) {
|
|
1610
|
+
An(e);
|
|
1611
|
+
let n = e.childrenToUpdate, r = e.updateTick++;
|
|
1612
|
+
for (let t in n) {
|
|
1613
|
+
let i = Number(t), a = n[t], o = a.list, s = a.index;
|
|
1614
|
+
for (let t = 0; t < s; t++) {
|
|
1615
|
+
let n = o[t];
|
|
1616
|
+
n.parentRenderGroup === e && n.relativeRenderGroupDepth === i && jn(n, r, 0);
|
|
1617
|
+
}
|
|
1618
|
+
En(o, s), a.index = 0;
|
|
1619
|
+
}
|
|
1620
|
+
if (t) for (let n = 0; n < e.renderGroupChildren.length; n++) kn(e.renderGroupChildren[n], t);
|
|
1621
|
+
}
|
|
1622
|
+
function An(e) {
|
|
1623
|
+
let t = e.root, n;
|
|
1624
|
+
if (e.renderGroupParent) {
|
|
1625
|
+
let r = e.renderGroupParent;
|
|
1626
|
+
e.worldTransform.appendFrom(t.relativeGroupTransform, r.worldTransform), e.worldColor = c(t.groupColor, r.worldColor), n = t.groupAlpha * r.worldAlpha;
|
|
1627
|
+
} else e.worldTransform.copyFrom(t.localTransform), e.worldColor = t.localColor, n = t.localAlpha;
|
|
1628
|
+
n = n < 0 ? 0 : n > 1 ? 1 : n, e.worldAlpha = n, e.worldColorAlpha = e.worldColor + ((n * 255 | 0) << 24);
|
|
1629
|
+
}
|
|
1630
|
+
function jn(e, t, n) {
|
|
1631
|
+
if (t === e.updateTick) return;
|
|
1632
|
+
e.updateTick = t, e.didChange = !1;
|
|
1633
|
+
let r = e.localTransform;
|
|
1634
|
+
e.updateLocalTransform();
|
|
1635
|
+
let i = e.parent;
|
|
1636
|
+
if (i && !i.renderGroup ? (n |= e._updateFlags, e.relativeGroupTransform.appendFrom(r, i.relativeGroupTransform), n & On && Mn(e, i, n)) : (n = e._updateFlags, e.relativeGroupTransform.copyFrom(r), n & On && Mn(e, Dn, n)), !e.renderGroup) {
|
|
1637
|
+
let r = e.children, i = r.length;
|
|
1638
|
+
for (let e = 0; e < i; e++) jn(r[e], t, n);
|
|
1639
|
+
let a = e.parentRenderGroup, o = e;
|
|
1640
|
+
o.renderPipeId && !a.structureDidChange && a.updateRenderable(o);
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
function Mn(e, t, n) {
|
|
1644
|
+
if (n & 1) {
|
|
1645
|
+
e.groupColor = c(e.localColor, t.groupColor);
|
|
1646
|
+
let n = e.localAlpha * t.groupAlpha;
|
|
1647
|
+
n = n < 0 ? 0 : n > 1 ? 1 : n, e.groupAlpha = n, e.groupColorAlpha = e.groupColor + ((n * 255 | 0) << 24);
|
|
1648
|
+
}
|
|
1649
|
+
n & 2 && (e.groupBlendMode = e.localBlendMode === "inherit" ? t.groupBlendMode : e.localBlendMode), n & 4 && (e.globalDisplayStatus = e.localDisplayStatus & t.globalDisplayStatus), e._updateFlags = 0;
|
|
1650
|
+
}
|
|
1651
|
+
//#endregion
|
|
1652
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/validateRenderables.mjs
|
|
1653
|
+
function Nn(e, t) {
|
|
1654
|
+
let { list: n } = e.childrenRenderablesToUpdate, r = !1;
|
|
1655
|
+
for (let i = 0; i < e.childrenRenderablesToUpdate.index; i++) {
|
|
1656
|
+
let e = n[i];
|
|
1657
|
+
if (r = t[e.renderPipeId].validateRenderable(e), r) break;
|
|
1658
|
+
}
|
|
1659
|
+
return e.structureDidChange = r, r;
|
|
1660
|
+
}
|
|
1661
|
+
//#endregion
|
|
1662
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/RenderGroupSystem.mjs
|
|
1663
|
+
var Pn = new y(), Fn = class {
|
|
1664
|
+
constructor(e) {
|
|
1665
|
+
this._renderer = e;
|
|
1666
|
+
}
|
|
1667
|
+
render({ container: e, transform: t }) {
|
|
1668
|
+
let n = e.parent, r = e.renderGroup.renderGroupParent;
|
|
1669
|
+
e.parent = null, e.renderGroup.renderGroupParent = null;
|
|
1670
|
+
let i = this._renderer, a = Pn;
|
|
1671
|
+
t && (a.copyFrom(e.renderGroup.localTransform), e.renderGroup.localTransform.copyFrom(t));
|
|
1672
|
+
let o = i.renderPipes;
|
|
1673
|
+
this._updateCachedRenderGroups(e.renderGroup, null), this._updateRenderGroups(e.renderGroup), i.globalUniforms.start({
|
|
1674
|
+
worldTransformMatrix: t ? e.renderGroup.localTransform : e.renderGroup.worldTransform,
|
|
1675
|
+
worldColor: e.renderGroup.worldColorAlpha
|
|
1676
|
+
}), ve(e.renderGroup, o), o.uniformBatch && o.uniformBatch.renderEnd(), t && e.renderGroup.localTransform.copyFrom(a), e.parent = n, e.renderGroup.renderGroupParent = r;
|
|
1677
|
+
}
|
|
1678
|
+
destroy() {
|
|
1679
|
+
this._renderer = null;
|
|
1680
|
+
}
|
|
1681
|
+
_updateCachedRenderGroups(e, t) {
|
|
1682
|
+
if (e._parentCacheAsTextureRenderGroup = t, e.isCachedAsTexture) {
|
|
1683
|
+
if (!e.textureNeedsUpdate) return;
|
|
1684
|
+
t = e;
|
|
1685
|
+
}
|
|
1686
|
+
for (let n = e.renderGroupChildren.length - 1; n >= 0; n--) this._updateCachedRenderGroups(e.renderGroupChildren[n], t);
|
|
1687
|
+
if (e.invalidateMatrices(), e.isCachedAsTexture) {
|
|
1688
|
+
if (e.textureNeedsUpdate) {
|
|
1689
|
+
let t = e.root.getLocalBounds(), n = this._renderer, r = e.textureOptions.resolution || n.view.resolution, i = e.textureOptions.antialias ?? n.view.antialias, o = e.textureOptions.scaleMode ?? "linear", s = e.texture;
|
|
1690
|
+
t.ceil(), e.texture && u.returnTexture(e.texture, !0);
|
|
1691
|
+
let c = u.getOptimalTexture(t.width, t.height, r, i);
|
|
1692
|
+
c._source.style = new re({ scaleMode: o }), e.texture = c, e._textureBounds ||= new a(), e._textureBounds.copyFrom(t), s !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
|
|
1693
|
+
}
|
|
1694
|
+
} else e.texture &&= (u.returnTexture(e.texture, !0), null);
|
|
1695
|
+
}
|
|
1696
|
+
_updateRenderGroups(e) {
|
|
1697
|
+
let t = this._renderer, n = t.renderPipes;
|
|
1698
|
+
if (e.runOnRender(t), e.instructionSet.renderPipes = n, e.structureDidChange ? En(e.childrenRenderablesToUpdate.list, 0) : Nn(e, n), kn(e), e.structureDidChange ? (e.structureDidChange = !1, this._buildInstructions(e, t)) : this._updateRenderables(e), e.childrenRenderablesToUpdate.index = 0, t.renderPipes.batch.upload(e.instructionSet), !(e.isCachedAsTexture && !e.textureNeedsUpdate)) for (let t = 0; t < e.renderGroupChildren.length; t++) this._updateRenderGroups(e.renderGroupChildren[t]);
|
|
1699
|
+
}
|
|
1700
|
+
_updateRenderables(e) {
|
|
1701
|
+
let { list: t, index: n } = e.childrenRenderablesToUpdate;
|
|
1702
|
+
for (let r = 0; r < n; r++) {
|
|
1703
|
+
let n = t[r];
|
|
1704
|
+
n.didViewUpdate && e.updateRenderable(n);
|
|
1705
|
+
}
|
|
1706
|
+
En(t, n);
|
|
1707
|
+
}
|
|
1708
|
+
_buildInstructions(e, t) {
|
|
1709
|
+
let n = e.root, r = e.instructionSet;
|
|
1710
|
+
r.reset();
|
|
1711
|
+
let i = t.renderPipes ? t : t.batch.renderer, a = i.renderPipes;
|
|
1712
|
+
a.batch.buildStart(r), a.blendMode.buildStart(), a.colorMask.buildStart(), n.sortableChildren && n.sortChildren(), n.collectRenderablesWithEffects(r, i, null), a.batch.buildEnd(r), a.blendMode.buildEnd(r);
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
Fn.extension = {
|
|
1716
|
+
type: [
|
|
1717
|
+
g.WebGLSystem,
|
|
1718
|
+
g.WebGPUSystem,
|
|
1719
|
+
g.CanvasSystem
|
|
1720
|
+
],
|
|
1721
|
+
name: "renderGroup"
|
|
1722
|
+
};
|
|
1723
|
+
//#endregion
|
|
1724
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/const.mjs
|
|
1725
|
+
var Z = "8.20.1", In = class {
|
|
1726
|
+
static init() {
|
|
1727
|
+
globalThis.__PIXI_APP_INIT__?.(this, Z);
|
|
1728
|
+
}
|
|
1729
|
+
static destroy() {}
|
|
1730
|
+
};
|
|
1731
|
+
In.extension = g.Application;
|
|
1732
|
+
var Ln = class {
|
|
1733
|
+
constructor(e) {
|
|
1734
|
+
this._renderer = e;
|
|
1735
|
+
}
|
|
1736
|
+
init() {
|
|
1737
|
+
globalThis.__PIXI_RENDERER_INIT__?.(this._renderer, Z);
|
|
1738
|
+
}
|
|
1739
|
+
destroy() {
|
|
1740
|
+
this._renderer = null;
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
Ln.extension = {
|
|
1744
|
+
type: [g.WebGLSystem, g.WebGPUSystem],
|
|
1745
|
+
name: "initHook",
|
|
1746
|
+
priority: -10
|
|
1747
|
+
};
|
|
1748
|
+
//#endregion
|
|
1749
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/color/ColorMaskPipe.mjs
|
|
1750
|
+
var Rn = class {
|
|
1751
|
+
constructor(e) {
|
|
1752
|
+
this._colorStack = [], this._colorStackIndex = 0, this._currentColor = 0, this._renderer = e;
|
|
1753
|
+
}
|
|
1754
|
+
buildStart() {
|
|
1755
|
+
this._colorStack[0] = 15, this._colorStackIndex = 1, this._currentColor = 15;
|
|
1756
|
+
}
|
|
1757
|
+
push(e, t, n) {
|
|
1758
|
+
this._renderer.renderPipes.batch.break(n);
|
|
1759
|
+
let r = this._colorStack;
|
|
1760
|
+
r[this._colorStackIndex] = r[this._colorStackIndex - 1] & e.mask;
|
|
1761
|
+
let i = this._colorStack[this._colorStackIndex];
|
|
1762
|
+
i !== this._currentColor && (this._currentColor = i, n.add({
|
|
1763
|
+
renderPipeId: "colorMask",
|
|
1764
|
+
colorMask: i,
|
|
1765
|
+
canBundle: !1
|
|
1766
|
+
})), this._colorStackIndex++;
|
|
1767
|
+
}
|
|
1768
|
+
pop(e, t, n) {
|
|
1769
|
+
this._renderer.renderPipes.batch.break(n);
|
|
1770
|
+
let r = this._colorStack;
|
|
1771
|
+
this._colorStackIndex--;
|
|
1772
|
+
let i = r[this._colorStackIndex - 1];
|
|
1773
|
+
i !== this._currentColor && (this._currentColor = i, n.add({
|
|
1774
|
+
renderPipeId: "colorMask",
|
|
1775
|
+
colorMask: i,
|
|
1776
|
+
canBundle: !1
|
|
1777
|
+
}));
|
|
1778
|
+
}
|
|
1779
|
+
execute(e) {
|
|
1780
|
+
this._renderer.colorMask.setMask(e.colorMask);
|
|
1781
|
+
}
|
|
1782
|
+
destroy() {
|
|
1783
|
+
this._renderer = null, this._colorStack = null;
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
Rn.extension = {
|
|
1787
|
+
type: [g.WebGLPipes, g.WebGPUPipes],
|
|
1788
|
+
name: "colorMask"
|
|
1789
|
+
};
|
|
1790
|
+
//#endregion
|
|
1791
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/stencil/StencilMaskPipe.mjs
|
|
1792
|
+
var zn = class {
|
|
1793
|
+
constructor(e) {
|
|
1794
|
+
this._maskStackHash = {}, this._maskHash = /* @__PURE__ */ new WeakMap(), this._renderer = e;
|
|
1795
|
+
}
|
|
1796
|
+
push(e, t, n) {
|
|
1797
|
+
var r;
|
|
1798
|
+
let i = e, a = this._renderer;
|
|
1799
|
+
a.renderPipes.batch.break(n), a.renderPipes.blendMode.setBlendMode(i.mask, "none", n), n.add({
|
|
1800
|
+
renderPipeId: "stencilMask",
|
|
1801
|
+
action: "pushMaskBegin",
|
|
1802
|
+
mask: e,
|
|
1803
|
+
inverse: t._maskOptions.inverse,
|
|
1804
|
+
canBundle: !1
|
|
1805
|
+
});
|
|
1806
|
+
let o = i.mask;
|
|
1807
|
+
o.includeInBuild = !0, this._maskHash.has(i) || this._maskHash.set(i, {
|
|
1808
|
+
instructionsStart: 0,
|
|
1809
|
+
instructionsLength: 0
|
|
1810
|
+
});
|
|
1811
|
+
let s = this._maskHash.get(i);
|
|
1812
|
+
s.instructionsStart = n.instructionSize, o.collectRenderables(n, a, null), o.includeInBuild = !1, a.renderPipes.batch.break(n), n.add({
|
|
1813
|
+
renderPipeId: "stencilMask",
|
|
1814
|
+
action: "pushMaskEnd",
|
|
1815
|
+
mask: e,
|
|
1816
|
+
inverse: t._maskOptions.inverse,
|
|
1817
|
+
canBundle: !1
|
|
1818
|
+
}), s.instructionsLength = n.instructionSize - s.instructionsStart - 1;
|
|
1819
|
+
let c = a.renderTarget.renderTarget.uid;
|
|
1820
|
+
(r = this._maskStackHash)[c] ?? (r[c] = 0);
|
|
1821
|
+
}
|
|
1822
|
+
pop(e, t, n) {
|
|
1823
|
+
let r = e, i = this._renderer;
|
|
1824
|
+
i.renderPipes.batch.break(n), i.renderPipes.blendMode.setBlendMode(r.mask, "none", n), n.add({
|
|
1825
|
+
renderPipeId: "stencilMask",
|
|
1826
|
+
action: "popMaskBegin",
|
|
1827
|
+
inverse: t._maskOptions.inverse,
|
|
1828
|
+
canBundle: !1
|
|
1829
|
+
});
|
|
1830
|
+
let a = this._maskHash.get(e);
|
|
1831
|
+
for (let e = 0; e < a.instructionsLength; e++) n.instructions[n.instructionSize++] = n.instructions[a.instructionsStart++];
|
|
1832
|
+
n.add({
|
|
1833
|
+
renderPipeId: "stencilMask",
|
|
1834
|
+
action: "popMaskEnd",
|
|
1835
|
+
canBundle: !1
|
|
1836
|
+
});
|
|
1837
|
+
}
|
|
1838
|
+
execute(e) {
|
|
1839
|
+
var t;
|
|
1840
|
+
let n = this._renderer, r = n, i = n.renderTarget.renderTarget.uid, a = (t = this._maskStackHash)[i] ?? (t[i] = 0);
|
|
1841
|
+
e.action === "pushMaskBegin" ? (r.renderTarget.ensureDepthStencil(), r.stencil.setStencilMode(V.RENDERING_MASK_ADD, a), a++, r.colorMask.setMask(0)) : e.action === "pushMaskEnd" ? (e.inverse ? r.stencil.setStencilMode(V.INVERSE_MASK_ACTIVE, a) : r.stencil.setStencilMode(V.MASK_ACTIVE, a), r.colorMask.setMask(15)) : e.action === "popMaskBegin" ? (r.colorMask.setMask(0), a === 0 ? (r.renderTarget.clear(null, X.STENCIL), r.stencil.setStencilMode(V.DISABLED, a)) : r.stencil.setStencilMode(V.RENDERING_MASK_REMOVE, a), a--) : e.action === "popMaskEnd" && (e.inverse ? r.stencil.setStencilMode(V.INVERSE_MASK_ACTIVE, a) : r.stencil.setStencilMode(V.MASK_ACTIVE, a), r.colorMask.setMask(15)), this._maskStackHash[i] = a;
|
|
1842
|
+
}
|
|
1843
|
+
destroy() {
|
|
1844
|
+
this._renderer = null, this._maskStackHash = null, this._maskHash = null;
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
zn.extension = {
|
|
1848
|
+
type: [g.WebGLPipes, g.WebGPUPipes],
|
|
1849
|
+
name: "stencilMask"
|
|
1850
|
+
};
|
|
1851
|
+
//#endregion
|
|
1852
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/background/BackgroundSystem.mjs
|
|
1853
|
+
var Bn = class e {
|
|
1854
|
+
constructor() {
|
|
1855
|
+
this.clearBeforeRender = !0, this._backgroundColor = new C(0), this.color = this._backgroundColor, this.alpha = 1;
|
|
1856
|
+
}
|
|
1857
|
+
init(t) {
|
|
1858
|
+
t = {
|
|
1859
|
+
...e.defaultOptions,
|
|
1860
|
+
...t
|
|
1861
|
+
}, this.clearBeforeRender = t.clearBeforeRender, this.color = t.background || t.backgroundColor || this._backgroundColor, this.alpha = t.backgroundAlpha, this._backgroundColor.setAlpha(t.backgroundAlpha);
|
|
1862
|
+
}
|
|
1863
|
+
get color() {
|
|
1864
|
+
return this._backgroundColor;
|
|
1865
|
+
}
|
|
1866
|
+
set color(e) {
|
|
1867
|
+
C.shared.setValue(e).alpha < 1 && this._backgroundColor.alpha === 1 && o("Cannot set a transparent background on an opaque canvas. To enable transparency, set backgroundAlpha < 1 when initializing your Application."), this._backgroundColor.setValue(e);
|
|
1868
|
+
}
|
|
1869
|
+
get alpha() {
|
|
1870
|
+
return this._backgroundColor.alpha;
|
|
1871
|
+
}
|
|
1872
|
+
set alpha(e) {
|
|
1873
|
+
this._backgroundColor.setAlpha(e);
|
|
1874
|
+
}
|
|
1875
|
+
get colorRgba() {
|
|
1876
|
+
return this._backgroundColor.toArray();
|
|
1877
|
+
}
|
|
1878
|
+
destroy() {}
|
|
1879
|
+
};
|
|
1880
|
+
Bn.extension = {
|
|
1881
|
+
type: [
|
|
1882
|
+
g.WebGLSystem,
|
|
1883
|
+
g.WebGPUSystem,
|
|
1884
|
+
g.CanvasSystem
|
|
1885
|
+
],
|
|
1886
|
+
name: "background",
|
|
1887
|
+
priority: 0
|
|
1888
|
+
}, Bn.defaultOptions = {
|
|
1889
|
+
backgroundAlpha: 1,
|
|
1890
|
+
backgroundColor: 0,
|
|
1891
|
+
clearBeforeRender: !0
|
|
1892
|
+
};
|
|
1893
|
+
var Vn = Bn, Hn = {
|
|
1894
|
+
png: "image/png",
|
|
1895
|
+
jpg: "image/jpeg",
|
|
1896
|
+
webp: "image/webp"
|
|
1897
|
+
}, Un = class e {
|
|
1898
|
+
constructor(e) {
|
|
1899
|
+
this._renderer = e;
|
|
1900
|
+
}
|
|
1901
|
+
_normalizeOptions(e, n = {}) {
|
|
1902
|
+
return e instanceof t || e instanceof r ? {
|
|
1903
|
+
target: e,
|
|
1904
|
+
...n
|
|
1905
|
+
} : {
|
|
1906
|
+
...n,
|
|
1907
|
+
...e
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
async image(e) {
|
|
1911
|
+
let t = me.get().createImage();
|
|
1912
|
+
return t.src = await this.base64(e), t;
|
|
1913
|
+
}
|
|
1914
|
+
async base64(t) {
|
|
1915
|
+
t = this._normalizeOptions(t, e.defaultImageOptions);
|
|
1916
|
+
let { format: n, quality: r } = t, i = this.canvas(t);
|
|
1917
|
+
if (i.toBlob !== void 0) return new Promise((e, t) => {
|
|
1918
|
+
i.toBlob((n) => {
|
|
1919
|
+
if (!n) {
|
|
1920
|
+
t(/* @__PURE__ */ Error("ICanvas.toBlob failed!"));
|
|
1921
|
+
return;
|
|
1922
|
+
}
|
|
1923
|
+
let r = new FileReader();
|
|
1924
|
+
r.onload = () => e(r.result), r.onerror = t, r.readAsDataURL(n);
|
|
1925
|
+
}, Hn[n], r);
|
|
1926
|
+
});
|
|
1927
|
+
if (i.toDataURL !== void 0) return i.toDataURL(Hn[n], r);
|
|
1928
|
+
if (i.convertToBlob !== void 0) {
|
|
1929
|
+
let e = await i.convertToBlob({
|
|
1930
|
+
type: Hn[n],
|
|
1931
|
+
quality: r
|
|
1932
|
+
});
|
|
1933
|
+
return new Promise((t, n) => {
|
|
1934
|
+
let r = new FileReader();
|
|
1935
|
+
r.onload = () => t(r.result), r.onerror = n, r.readAsDataURL(e);
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
throw Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented");
|
|
1939
|
+
}
|
|
1940
|
+
canvas(e) {
|
|
1941
|
+
e = this._normalizeOptions(e);
|
|
1942
|
+
let t = e.target, n = this._renderer;
|
|
1943
|
+
if (t instanceof r) return n.texture.generateCanvas(t);
|
|
1944
|
+
let i = n.textureGenerator.generateTexture(e), a = n.texture.generateCanvas(i);
|
|
1945
|
+
return i.destroy(!0), a;
|
|
1946
|
+
}
|
|
1947
|
+
pixels(e) {
|
|
1948
|
+
e = this._normalizeOptions(e);
|
|
1949
|
+
let n = e.target, i = this._renderer, a = n instanceof r ? n : i.textureGenerator.generateTexture(e), o = i.texture.getPixels(a);
|
|
1950
|
+
return n instanceof t && a.destroy(!0), o;
|
|
1951
|
+
}
|
|
1952
|
+
texture(e) {
|
|
1953
|
+
return e = this._normalizeOptions(e), e.target instanceof r ? e.target : this._renderer.textureGenerator.generateTexture(e);
|
|
1954
|
+
}
|
|
1955
|
+
download(e) {
|
|
1956
|
+
e = this._normalizeOptions(e);
|
|
1957
|
+
let t = this.canvas(e), n = document.createElement("a");
|
|
1958
|
+
n.download = e.filename ?? "image.png", n.href = t.toDataURL("image/png"), document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
1959
|
+
}
|
|
1960
|
+
log(e) {
|
|
1961
|
+
let t = e.width ?? 200;
|
|
1962
|
+
e = this._normalizeOptions(e);
|
|
1963
|
+
let n = this.canvas(e), r = n.toDataURL();
|
|
1964
|
+
console.log(`[Pixi Texture] ${n.width}px ${n.height}px`);
|
|
1965
|
+
let i = [
|
|
1966
|
+
"font-size: 1px;",
|
|
1967
|
+
`padding: ${t}px 300px;`,
|
|
1968
|
+
`background: url(${r}) no-repeat;`,
|
|
1969
|
+
"background-size: contain;"
|
|
1970
|
+
].join(" ");
|
|
1971
|
+
console.log("%c ", i);
|
|
1972
|
+
}
|
|
1973
|
+
destroy() {
|
|
1974
|
+
this._renderer = null;
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
Un.extension = {
|
|
1978
|
+
type: [
|
|
1979
|
+
g.WebGLSystem,
|
|
1980
|
+
g.WebGPUSystem,
|
|
1981
|
+
g.CanvasSystem
|
|
1982
|
+
],
|
|
1983
|
+
name: "extract"
|
|
1984
|
+
}, Un.defaultImageOptions = {
|
|
1985
|
+
format: "png",
|
|
1986
|
+
quality: 1
|
|
1987
|
+
};
|
|
1988
|
+
var Wn = Un, Gn = class t extends r {
|
|
1989
|
+
static create(n) {
|
|
1990
|
+
let { dynamic: r, textureOptions: i, ...a } = n;
|
|
1991
|
+
return new t({
|
|
1992
|
+
...i,
|
|
1993
|
+
source: new e(a),
|
|
1994
|
+
dynamic: r ?? !1
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
resize(e, t, n) {
|
|
1998
|
+
return this.source.resize(e, t, n), this;
|
|
1999
|
+
}
|
|
2000
|
+
}, Kn = new d(), qn = new a(), Jn = [
|
|
2001
|
+
0,
|
|
2002
|
+
0,
|
|
2003
|
+
0,
|
|
2004
|
+
0
|
|
2005
|
+
], Yn = class {
|
|
2006
|
+
constructor(e) {
|
|
2007
|
+
this._renderer = e;
|
|
2008
|
+
}
|
|
2009
|
+
generateTexture(e) {
|
|
2010
|
+
e instanceof t && (e = {
|
|
2011
|
+
target: e,
|
|
2012
|
+
frame: void 0,
|
|
2013
|
+
textureSourceOptions: {},
|
|
2014
|
+
resolution: void 0
|
|
2015
|
+
});
|
|
2016
|
+
let n = e.resolution || this._renderer.resolution, r = e.antialias || this._renderer.view.antialias, a = e.target, o = e.clearColor;
|
|
2017
|
+
o = o ? Array.isArray(o) && o.length === 4 ? o : C.shared.setValue(o).toArray() : Jn;
|
|
2018
|
+
let s = e.frame?.copyTo(Kn) || i(a, qn).rectangle, c = e.defaultAnchor && { defaultAnchor: e.defaultAnchor };
|
|
2019
|
+
s.width = Math.max(s.width, 1 / n) | 0, s.height = Math.max(s.height, 1 / n) | 0;
|
|
2020
|
+
let l = Gn.create({
|
|
2021
|
+
...e.textureSourceOptions,
|
|
2022
|
+
width: s.width,
|
|
2023
|
+
height: s.height,
|
|
2024
|
+
resolution: n,
|
|
2025
|
+
antialias: r,
|
|
2026
|
+
textureOptions: c
|
|
2027
|
+
}), u = y.shared.translate(-s.x, -s.y);
|
|
2028
|
+
return this._renderer.render({
|
|
2029
|
+
container: a,
|
|
2030
|
+
transform: u,
|
|
2031
|
+
target: l,
|
|
2032
|
+
clearColor: o
|
|
2033
|
+
}), l.source.updateMipmaps(), l;
|
|
2034
|
+
}
|
|
2035
|
+
destroy() {
|
|
2036
|
+
this._renderer = null;
|
|
2037
|
+
}
|
|
2038
|
+
};
|
|
2039
|
+
Yn.extension = {
|
|
2040
|
+
type: [
|
|
2041
|
+
g.WebGLSystem,
|
|
2042
|
+
g.WebGPUSystem,
|
|
2043
|
+
g.CanvasSystem
|
|
2044
|
+
],
|
|
2045
|
+
name: "textureGenerator"
|
|
2046
|
+
};
|
|
2047
|
+
//#endregion
|
|
2048
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/clean.mjs
|
|
2049
|
+
function Xn(e) {
|
|
2050
|
+
let t = !1;
|
|
2051
|
+
for (let n in e) if (e[n] == null) {
|
|
2052
|
+
t = !0;
|
|
2053
|
+
break;
|
|
2054
|
+
}
|
|
2055
|
+
if (!t) return e;
|
|
2056
|
+
let n = /* @__PURE__ */ Object.create(null);
|
|
2057
|
+
for (let t in e) {
|
|
2058
|
+
let r = e[t];
|
|
2059
|
+
r && (n[t] = r);
|
|
2060
|
+
}
|
|
2061
|
+
return n;
|
|
2062
|
+
}
|
|
2063
|
+
function Zn(e) {
|
|
2064
|
+
let t = 0;
|
|
2065
|
+
for (let n = 0; n < e.length; n++) e[n] == null ? t++ : e[n - t] = e[n];
|
|
2066
|
+
return e.length -= t, e;
|
|
2067
|
+
}
|
|
2068
|
+
//#endregion
|
|
2069
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/GCSystem.mjs
|
|
2070
|
+
var Qn = class e {
|
|
2071
|
+
constructor(e) {
|
|
2072
|
+
this._managedResources = [], this._managedResourceHashes = [], this._managedCollections = [], this._ready = !1, this._renderer = e;
|
|
2073
|
+
}
|
|
2074
|
+
init(t) {
|
|
2075
|
+
t = {
|
|
2076
|
+
...e.defaultOptions,
|
|
2077
|
+
...t
|
|
2078
|
+
}, this.maxUnusedTime = t.gcMaxUnusedTime, this._frequency = t.gcFrequency, this.enabled = t.gcActive, this.now = performance.now();
|
|
2079
|
+
}
|
|
2080
|
+
get enabled() {
|
|
2081
|
+
return !!this._handler;
|
|
2082
|
+
}
|
|
2083
|
+
set enabled(e) {
|
|
2084
|
+
this.enabled !== e && (e ? (this._handler = this._renderer.scheduler.repeat(() => {
|
|
2085
|
+
this._ready = !0;
|
|
2086
|
+
}, this._frequency, !1), this._collectionsHandler = this._renderer.scheduler.repeat(() => {
|
|
2087
|
+
for (let e of this._managedCollections) {
|
|
2088
|
+
let { context: t, collection: n, type: r } = e;
|
|
2089
|
+
r === "hash" ? t[n] = Xn(t[n]) : t[n] = Zn(t[n]);
|
|
2090
|
+
}
|
|
2091
|
+
}, this._frequency)) : (this._renderer.scheduler.cancel(this._handler), this._renderer.scheduler.cancel(this._collectionsHandler), this._handler = 0, this._collectionsHandler = 0));
|
|
2092
|
+
}
|
|
2093
|
+
prerender({ container: e }) {
|
|
2094
|
+
this.now = performance.now(), e.renderGroup.gcTick = this._renderer.tick++, this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick);
|
|
2095
|
+
}
|
|
2096
|
+
postrender() {
|
|
2097
|
+
!this._ready || !this.enabled || (this.run(), this._ready = !1);
|
|
2098
|
+
}
|
|
2099
|
+
_updateInstructionGCTick(e, t) {
|
|
2100
|
+
e.instructionSet.gcTick = t, e.gcTick = t;
|
|
2101
|
+
for (let n of e.renderGroupChildren) this._updateInstructionGCTick(n, t);
|
|
2102
|
+
}
|
|
2103
|
+
addCollection(e, t, n) {
|
|
2104
|
+
this._managedCollections.push({
|
|
2105
|
+
context: e,
|
|
2106
|
+
collection: t,
|
|
2107
|
+
type: n
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
addResource(e, t) {
|
|
2111
|
+
if (e._gcLastUsed !== -1) {
|
|
2112
|
+
e._gcLastUsed = this.now, e._onTouch?.(this.now);
|
|
2113
|
+
return;
|
|
2114
|
+
}
|
|
2115
|
+
e._gcData = {
|
|
2116
|
+
index: this._managedResources.length,
|
|
2117
|
+
type: t
|
|
2118
|
+
}, e._gcLastUsed = this.now, e._onTouch?.(this.now), e.once("unload", this.removeResource, this), this._managedResources.push(e);
|
|
2119
|
+
}
|
|
2120
|
+
removeResource(e) {
|
|
2121
|
+
let t = e._gcData;
|
|
2122
|
+
if (!t) return;
|
|
2123
|
+
let n = t.index, r = this._managedResources.length - 1;
|
|
2124
|
+
if (n !== r) {
|
|
2125
|
+
let e = this._managedResources[r];
|
|
2126
|
+
this._managedResources[n] = e, e._gcData.index = n;
|
|
2127
|
+
}
|
|
2128
|
+
this._managedResources.length--, e._gcData = null, e._gcLastUsed = -1;
|
|
2129
|
+
}
|
|
2130
|
+
addResourceHash(e, t, n, r = 0) {
|
|
2131
|
+
this._managedResourceHashes.push({
|
|
2132
|
+
context: e,
|
|
2133
|
+
hash: t,
|
|
2134
|
+
type: n,
|
|
2135
|
+
priority: r
|
|
2136
|
+
}), this._managedResourceHashes.sort((e, t) => e.priority - t.priority);
|
|
2137
|
+
}
|
|
2138
|
+
run() {
|
|
2139
|
+
let e = performance.now(), t = this._managedResourceHashes;
|
|
2140
|
+
for (let n of t) this.runOnHash(n, e);
|
|
2141
|
+
let n = 0;
|
|
2142
|
+
for (let t = 0; t < this._managedResources.length; t++) {
|
|
2143
|
+
let r = this._managedResources[t];
|
|
2144
|
+
n = this.runOnResource(r, e, n);
|
|
2145
|
+
}
|
|
2146
|
+
this._managedResources.length = n;
|
|
2147
|
+
}
|
|
2148
|
+
updateRenderableGCTick(e, t) {
|
|
2149
|
+
let n = e.renderGroup ?? e.parentRenderGroup, r = n?.instructionSet?.gcTick ?? -1;
|
|
2150
|
+
(n?.gcTick ?? 0) === r && (e._gcLastUsed = t, e._onTouch?.(t));
|
|
2151
|
+
}
|
|
2152
|
+
runOnResource(e, t, n) {
|
|
2153
|
+
let r = e._gcData;
|
|
2154
|
+
return r.type === "renderable" && this.updateRenderableGCTick(e, t), t - e._gcLastUsed < this.maxUnusedTime || !e.autoGarbageCollect ? (this._managedResources[n] = e, r.index = n, n++) : (e.unload(), e._gcData = null, e._gcLastUsed = -1, e.off("unload", this.removeResource, this)), n;
|
|
2155
|
+
}
|
|
2156
|
+
_createHashClone(e, t) {
|
|
2157
|
+
let n = /* @__PURE__ */ Object.create(null);
|
|
2158
|
+
for (let r in e) {
|
|
2159
|
+
if (r === t) break;
|
|
2160
|
+
e[r] !== null && (n[r] = e[r]);
|
|
2161
|
+
}
|
|
2162
|
+
return n;
|
|
2163
|
+
}
|
|
2164
|
+
runOnHash(e, t) {
|
|
2165
|
+
let { context: n, hash: r, type: i } = e, a = n[r], o = null, s = 0;
|
|
2166
|
+
for (let e in a) {
|
|
2167
|
+
let n = a[e];
|
|
2168
|
+
if (n === null) {
|
|
2169
|
+
s++, s === 1e4 && !o && (o = this._createHashClone(a, e));
|
|
2170
|
+
continue;
|
|
2171
|
+
}
|
|
2172
|
+
if (n._gcLastUsed === -1) {
|
|
2173
|
+
n._gcLastUsed = t, n._onTouch?.(t), o && (o[e] = n);
|
|
2174
|
+
continue;
|
|
2175
|
+
}
|
|
2176
|
+
if (i === "renderable" && this.updateRenderableGCTick(n, t), !(t - n._gcLastUsed < this.maxUnusedTime) && n.autoGarbageCollect) {
|
|
2177
|
+
if (i === "renderable") {
|
|
2178
|
+
let e = n, t = e.renderGroup ?? e.parentRenderGroup;
|
|
2179
|
+
t && (t.structureDidChange = !0);
|
|
2180
|
+
}
|
|
2181
|
+
n.unload(), n._gcData = null, n._gcLastUsed = -1, o || (s + 1 === 1e4 ? o = this._createHashClone(a, e) : (a[e] = null, s++));
|
|
2182
|
+
} else o && (o[e] = n);
|
|
2183
|
+
}
|
|
2184
|
+
o && (n[r] = o);
|
|
2185
|
+
}
|
|
2186
|
+
destroy() {
|
|
2187
|
+
this.enabled = !1, this._managedResources.forEach((e) => {
|
|
2188
|
+
e.off("unload", this.removeResource, this);
|
|
2189
|
+
}), this._managedResources.length = 0, this._managedResourceHashes.length = 0, this._managedCollections.length = 0, this._renderer = null;
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
Qn.extension = {
|
|
2193
|
+
type: [
|
|
2194
|
+
g.WebGLSystem,
|
|
2195
|
+
g.WebGPUSystem,
|
|
2196
|
+
g.CanvasSystem
|
|
2197
|
+
],
|
|
2198
|
+
name: "gc",
|
|
2199
|
+
priority: 0
|
|
2200
|
+
}, Qn.defaultOptions = {
|
|
2201
|
+
gcActive: !0,
|
|
2202
|
+
gcMaxUnusedTime: 6e4,
|
|
2203
|
+
gcFrequency: 3e4
|
|
2204
|
+
};
|
|
2205
|
+
var $n = Qn, er = class {
|
|
2206
|
+
constructor(e) {
|
|
2207
|
+
this._stackIndex = 0, this._globalUniformDataStack = [], this._uniformsPool = [], this._activeUniforms = [], this._bindGroupPool = [], this._activeBindGroups = [], this._renderer = e;
|
|
2208
|
+
}
|
|
2209
|
+
reset() {
|
|
2210
|
+
this._stackIndex = 0;
|
|
2211
|
+
for (let e = 0; e < this._activeUniforms.length; e++) this._uniformsPool.push(this._activeUniforms[e]);
|
|
2212
|
+
for (let e = 0; e < this._activeBindGroups.length; e++) this._bindGroupPool.push(this._activeBindGroups[e]);
|
|
2213
|
+
this._activeUniforms.length = 0, this._activeBindGroups.length = 0;
|
|
2214
|
+
}
|
|
2215
|
+
start(e) {
|
|
2216
|
+
this.reset(), this.push(e);
|
|
2217
|
+
}
|
|
2218
|
+
bind({ size: e, projectionMatrix: t, worldTransformMatrix: n, worldColor: r, offset: i }) {
|
|
2219
|
+
let a = this._renderer.renderTarget.renderTarget, o = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
|
|
2220
|
+
projectionData: a,
|
|
2221
|
+
worldTransformMatrix: new y(),
|
|
2222
|
+
worldColor: 4294967295,
|
|
2223
|
+
offset: new ue()
|
|
2224
|
+
}, s = {
|
|
2225
|
+
projectionMatrix: t || this._renderer.renderTarget.projectionMatrix,
|
|
2226
|
+
resolution: e || a.size,
|
|
2227
|
+
worldTransformMatrix: n || o.worldTransformMatrix,
|
|
2228
|
+
worldColor: r || o.worldColor,
|
|
2229
|
+
offset: i || o.offset,
|
|
2230
|
+
bindGroup: null
|
|
2231
|
+
}, c = this._uniformsPool.pop() || this._createUniforms();
|
|
2232
|
+
this._activeUniforms.push(c);
|
|
2233
|
+
let l = c.uniforms;
|
|
2234
|
+
l.uProjectionMatrix = s.projectionMatrix, l.uResolution = s.resolution, l.uWorldTransformMatrix.copyFrom(s.worldTransformMatrix), l.uWorldTransformMatrix.tx -= s.offset.x, l.uWorldTransformMatrix.ty -= s.offset.y, _n(s.worldColor, l.uWorldColorAlpha, 0), c.update();
|
|
2235
|
+
let u;
|
|
2236
|
+
this._renderer.renderPipes.uniformBatch ? u = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(c, !1) : (u = this._bindGroupPool.pop() || new v(), this._activeBindGroups.push(u), u.setResource(c, 0)), s.bindGroup = u, this._currentGlobalUniformData = s;
|
|
2237
|
+
}
|
|
2238
|
+
push(e) {
|
|
2239
|
+
this.bind(e), this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;
|
|
2240
|
+
}
|
|
2241
|
+
pop() {
|
|
2242
|
+
this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1], this._renderer.type === w.WEBGL && this._currentGlobalUniformData.bindGroup.resources[0].update();
|
|
2243
|
+
}
|
|
2244
|
+
get bindGroup() {
|
|
2245
|
+
return this._currentGlobalUniformData.bindGroup;
|
|
2246
|
+
}
|
|
2247
|
+
get globalUniformData() {
|
|
2248
|
+
return this._currentGlobalUniformData;
|
|
2249
|
+
}
|
|
2250
|
+
get uniformGroup() {
|
|
2251
|
+
return this._currentGlobalUniformData.bindGroup.resources[0];
|
|
2252
|
+
}
|
|
2253
|
+
_createUniforms() {
|
|
2254
|
+
return new _({
|
|
2255
|
+
uProjectionMatrix: {
|
|
2256
|
+
value: new y(),
|
|
2257
|
+
type: "mat3x3<f32>"
|
|
2258
|
+
},
|
|
2259
|
+
uWorldTransformMatrix: {
|
|
2260
|
+
value: new y(),
|
|
2261
|
+
type: "mat3x3<f32>"
|
|
2262
|
+
},
|
|
2263
|
+
uWorldColorAlpha: {
|
|
2264
|
+
value: new Float32Array(4),
|
|
2265
|
+
type: "vec4<f32>"
|
|
2266
|
+
},
|
|
2267
|
+
uResolution: {
|
|
2268
|
+
value: [0, 0],
|
|
2269
|
+
type: "vec2<f32>"
|
|
2270
|
+
}
|
|
2271
|
+
}, { isStatic: !0 });
|
|
2272
|
+
}
|
|
2273
|
+
destroy() {
|
|
2274
|
+
this._renderer = null, this._globalUniformDataStack.length = 0, this._uniformsPool.length = 0, this._activeUniforms.length = 0, this._bindGroupPool.length = 0, this._activeBindGroups.length = 0, this._currentGlobalUniformData = null;
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
er.extension = {
|
|
2278
|
+
type: [
|
|
2279
|
+
g.WebGLSystem,
|
|
2280
|
+
g.WebGPUSystem,
|
|
2281
|
+
g.CanvasSystem
|
|
2282
|
+
],
|
|
2283
|
+
name: "globalUniforms"
|
|
2284
|
+
};
|
|
2285
|
+
//#endregion
|
|
2286
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/SchedulerSystem.mjs
|
|
2287
|
+
var tr = 1, nr = class {
|
|
2288
|
+
constructor() {
|
|
2289
|
+
this._tasks = [], this._offset = 0;
|
|
2290
|
+
}
|
|
2291
|
+
init() {
|
|
2292
|
+
pe.system.add(this._update, this);
|
|
2293
|
+
}
|
|
2294
|
+
repeat(e, t, n = !0) {
|
|
2295
|
+
let r = tr++, i = 0;
|
|
2296
|
+
return n && (this._offset += 1e3, i = this._offset), this._tasks.push({
|
|
2297
|
+
func: e,
|
|
2298
|
+
duration: t,
|
|
2299
|
+
start: performance.now(),
|
|
2300
|
+
offset: i,
|
|
2301
|
+
last: performance.now(),
|
|
2302
|
+
repeat: !0,
|
|
2303
|
+
id: r
|
|
2304
|
+
}), r;
|
|
2305
|
+
}
|
|
2306
|
+
cancel(e) {
|
|
2307
|
+
for (let t = 0; t < this._tasks.length; t++) if (this._tasks[t].id === e) {
|
|
2308
|
+
this._tasks.splice(t, 1);
|
|
2309
|
+
return;
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
_update() {
|
|
2313
|
+
let e = performance.now();
|
|
2314
|
+
for (let t = 0; t < this._tasks.length; t++) {
|
|
2315
|
+
let n = this._tasks[t];
|
|
2316
|
+
if (e - n.offset - n.last >= n.duration) {
|
|
2317
|
+
let t = e - n.start;
|
|
2318
|
+
n.func(t), n.last = e;
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
destroy() {
|
|
2323
|
+
pe.system.remove(this._update, this), this._tasks.length = 0;
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
nr.extension = {
|
|
2327
|
+
type: [
|
|
2328
|
+
g.WebGLSystem,
|
|
2329
|
+
g.WebGPUSystem,
|
|
2330
|
+
g.CanvasSystem
|
|
2331
|
+
],
|
|
2332
|
+
name: "scheduler",
|
|
2333
|
+
priority: 0
|
|
2334
|
+
};
|
|
2335
|
+
//#endregion
|
|
2336
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/sayHello.mjs
|
|
2337
|
+
var rr = !1;
|
|
2338
|
+
function ir(e) {
|
|
2339
|
+
if (!rr) {
|
|
2340
|
+
if (me.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
|
|
2341
|
+
let t = [
|
|
2342
|
+
`%c %c %c %c %c PixiJS %c v${Z} (${e}) http://www.pixijs.com/
|
|
2343
|
+
|
|
2344
|
+
`,
|
|
2345
|
+
"background: #E72264; padding:5px 0;",
|
|
2346
|
+
"background: #6CA2EA; padding:5px 0;",
|
|
2347
|
+
"background: #B5D33D; padding:5px 0;",
|
|
2348
|
+
"background: #FED23F; padding:5px 0;",
|
|
2349
|
+
"color: #FFFFFF; background: #E72264; padding:5px 0;",
|
|
2350
|
+
"color: #E72264; background: #FFFFFF; padding:5px 0;"
|
|
2351
|
+
];
|
|
2352
|
+
globalThis.console.log(...t);
|
|
2353
|
+
} else globalThis.console && globalThis.console.log(`PixiJS ${Z} - ${e} - http://www.pixijs.com/`);
|
|
2354
|
+
rr = !0;
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
//#endregion
|
|
2358
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/startup/HelloSystem.mjs
|
|
2359
|
+
var ar = class {
|
|
2360
|
+
constructor(e) {
|
|
2361
|
+
this._renderer = e;
|
|
2362
|
+
}
|
|
2363
|
+
init(e) {
|
|
2364
|
+
if (e.hello) {
|
|
2365
|
+
let e = this._renderer.name;
|
|
2366
|
+
this._renderer.type === w.WEBGL && (e += ` ${this._renderer.context.webGLVersion}`), ir(e);
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
ar.extension = {
|
|
2371
|
+
type: [
|
|
2372
|
+
g.WebGLSystem,
|
|
2373
|
+
g.WebGPUSystem,
|
|
2374
|
+
g.CanvasSystem
|
|
2375
|
+
],
|
|
2376
|
+
name: "hello",
|
|
2377
|
+
priority: -2
|
|
2378
|
+
}, ar.defaultOptions = { hello: !1 };
|
|
2379
|
+
//#endregion
|
|
2380
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/RenderableGCSystem.mjs
|
|
2381
|
+
var or = class e {
|
|
2382
|
+
constructor(e) {
|
|
2383
|
+
this._renderer = e;
|
|
2384
|
+
}
|
|
2385
|
+
init(t) {
|
|
2386
|
+
t = {
|
|
2387
|
+
...e.defaultOptions,
|
|
2388
|
+
...t
|
|
2389
|
+
}, this.maxUnusedTime = t.renderableGCMaxUnusedTime;
|
|
2390
|
+
}
|
|
2391
|
+
get enabled() {
|
|
2392
|
+
return m("8.15.0", "RenderableGCSystem.enabled is deprecated, please use the GCSystem.enabled instead."), this._renderer.gc.enabled;
|
|
2393
|
+
}
|
|
2394
|
+
set enabled(e) {
|
|
2395
|
+
m("8.15.0", "RenderableGCSystem.enabled is deprecated, please use the GCSystem.enabled instead."), this._renderer.gc.enabled = e;
|
|
2396
|
+
}
|
|
2397
|
+
addManagedHash(e, t) {
|
|
2398
|
+
m("8.15.0", "RenderableGCSystem.addManagedHash is deprecated, please use the GCSystem.addCollection instead."), this._renderer.gc.addCollection(e, t, "hash");
|
|
2399
|
+
}
|
|
2400
|
+
addManagedArray(e, t) {
|
|
2401
|
+
m("8.15.0", "RenderableGCSystem.addManagedArray is deprecated, please use the GCSystem.addCollection instead."), this._renderer.gc.addCollection(e, t, "array");
|
|
2402
|
+
}
|
|
2403
|
+
addRenderable(e) {
|
|
2404
|
+
m("8.15.0", "RenderableGCSystem.addRenderable is deprecated, please use the GCSystem instead."), this._renderer.gc.addResource(e, "renderable");
|
|
2405
|
+
}
|
|
2406
|
+
run() {
|
|
2407
|
+
m("8.15.0", "RenderableGCSystem.run is deprecated, please use the GCSystem instead."), this._renderer.gc.run();
|
|
2408
|
+
}
|
|
2409
|
+
destroy() {
|
|
2410
|
+
this._renderer = null;
|
|
2411
|
+
}
|
|
2412
|
+
};
|
|
2413
|
+
or.extension = {
|
|
2414
|
+
type: [
|
|
2415
|
+
g.WebGLSystem,
|
|
2416
|
+
g.WebGPUSystem,
|
|
2417
|
+
g.CanvasSystem
|
|
2418
|
+
],
|
|
2419
|
+
name: "renderableGC",
|
|
2420
|
+
priority: 0
|
|
2421
|
+
}, or.defaultOptions = {
|
|
2422
|
+
renderableGCActive: !0,
|
|
2423
|
+
renderableGCMaxUnusedTime: 6e4,
|
|
2424
|
+
renderableGCFrequency: 3e4
|
|
2425
|
+
};
|
|
2426
|
+
var sr = or, cr = class e {
|
|
2427
|
+
get count() {
|
|
2428
|
+
return this._renderer.tick;
|
|
2429
|
+
}
|
|
2430
|
+
get checkCount() {
|
|
2431
|
+
return this._checkCount;
|
|
2432
|
+
}
|
|
2433
|
+
set checkCount(e) {
|
|
2434
|
+
m("8.15.0", "TextureGCSystem.run is deprecated, please use the GCSystem instead."), this._checkCount = e;
|
|
2435
|
+
}
|
|
2436
|
+
get maxIdle() {
|
|
2437
|
+
return this._renderer.gc.maxUnusedTime / 1e3 * 60;
|
|
2438
|
+
}
|
|
2439
|
+
set maxIdle(e) {
|
|
2440
|
+
m("8.15.0", "TextureGCSystem.run is deprecated, please use the GCSystem instead."), this._renderer.gc.maxUnusedTime = e / 60 * 1e3;
|
|
2441
|
+
}
|
|
2442
|
+
get checkCountMax() {
|
|
2443
|
+
return Math.floor(this._renderer.gc._frequency / 1e3);
|
|
2444
|
+
}
|
|
2445
|
+
set checkCountMax(e) {
|
|
2446
|
+
m("8.15.0", "TextureGCSystem.run is deprecated, please use the GCSystem instead.");
|
|
2447
|
+
}
|
|
2448
|
+
get active() {
|
|
2449
|
+
return this._renderer.gc.enabled;
|
|
2450
|
+
}
|
|
2451
|
+
set active(e) {
|
|
2452
|
+
m("8.15.0", "TextureGCSystem.run is deprecated, please use the GCSystem instead."), this._renderer.gc.enabled = e;
|
|
2453
|
+
}
|
|
2454
|
+
constructor(e) {
|
|
2455
|
+
this._renderer = e, this._checkCount = 0;
|
|
2456
|
+
}
|
|
2457
|
+
init(t) {
|
|
2458
|
+
t.textureGCActive !== e.defaultOptions.textureGCActive && (this.active = t.textureGCActive), t.textureGCMaxIdle !== e.defaultOptions.textureGCMaxIdle && (this.maxIdle = t.textureGCMaxIdle), t.textureGCCheckCountMax !== e.defaultOptions.textureGCCheckCountMax && (this.checkCountMax = t.textureGCCheckCountMax);
|
|
2459
|
+
}
|
|
2460
|
+
run() {
|
|
2461
|
+
m("8.15.0", "TextureGCSystem.run is deprecated, please use the GCSystem instead."), this._renderer.gc.run();
|
|
2462
|
+
}
|
|
2463
|
+
destroy() {
|
|
2464
|
+
this._renderer = null;
|
|
2465
|
+
}
|
|
2466
|
+
};
|
|
2467
|
+
cr.extension = {
|
|
2468
|
+
type: [g.WebGLSystem, g.WebGPUSystem],
|
|
2469
|
+
name: "textureGC"
|
|
2470
|
+
}, cr.defaultOptions = {
|
|
2471
|
+
textureGCActive: !0,
|
|
2472
|
+
textureGCAMaxIdle: null,
|
|
2473
|
+
textureGCMaxIdle: 3600,
|
|
2474
|
+
textureGCCheckCountMax: 600
|
|
2475
|
+
};
|
|
2476
|
+
var lr = cr, ur = class t {
|
|
2477
|
+
constructor(e = {}) {
|
|
2478
|
+
this.uid = l("renderTarget"), this.colorAttachments = [], this.dirtyId = 0, this.isRoot = !1, this._size = new Float32Array(2), this._managedColorTextures = !1, this._depth = !1, this._stencil = !1, this._colorTextures = null;
|
|
2479
|
+
let t = "colorAttachments" in e ? e : this._normalizeOptions(e);
|
|
2480
|
+
if (this.isRoot = t.isRoot ?? !1, this.label = t.label, this.colorAttachments = t.colorAttachments, this.depthStencilAttachment = t.depthStencilAttachment, this.depthStencilAttachment) {
|
|
2481
|
+
let e = this.depthStencilAttachment.texture.format;
|
|
2482
|
+
this._depth ||= e.includes("depth"), this._stencil ||= e.includes("stencil");
|
|
2483
|
+
}
|
|
2484
|
+
if (this.colorAttachments.length === 0 && !this.depthStencilAttachment) throw Error("[RenderTarget] no color textures or depth textures were provided. Provide a depthStencilTexture or set depth/stencil to true when using colorTextures: 0.");
|
|
2485
|
+
if (this.colorAttachments.length > 0) {
|
|
2486
|
+
let e = this.colorTexture;
|
|
2487
|
+
this.resize(e.width, e.height, e._resolution);
|
|
2488
|
+
}
|
|
2489
|
+
this.sizeSource && this.sizeSource.on("resize", this.onSourceResize, this);
|
|
2490
|
+
}
|
|
2491
|
+
_normalizeOptions(n) {
|
|
2492
|
+
let i = {
|
|
2493
|
+
...t.defaultOptions,
|
|
2494
|
+
...n
|
|
2495
|
+
}, a = [], o;
|
|
2496
|
+
if (typeof i.colorTextures == "number") {
|
|
2497
|
+
if (i.colorTextures > 0) {
|
|
2498
|
+
this._managedColorTextures = !0;
|
|
2499
|
+
for (let t = 0; t < i.colorTextures; t++) a.push({
|
|
2500
|
+
texture: new e({
|
|
2501
|
+
width: i.width,
|
|
2502
|
+
height: i.height,
|
|
2503
|
+
resolution: i.resolution,
|
|
2504
|
+
antialias: i.antialias
|
|
2505
|
+
}),
|
|
2506
|
+
loadOp: "clear",
|
|
2507
|
+
storeOp: "store"
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
} else i.colorTextures.forEach((e) => {
|
|
2511
|
+
a.push({
|
|
2512
|
+
texture: e.source,
|
|
2513
|
+
loadOp: "clear",
|
|
2514
|
+
storeOp: "store"
|
|
2515
|
+
});
|
|
2516
|
+
});
|
|
2517
|
+
let s = i.depthStencilTexture === !0;
|
|
2518
|
+
if (this._depth = !!(i.depth || s), this._stencil = !!(i.stencil || s), i.depthStencilTexture instanceof r || i.depthStencilTexture instanceof e) {
|
|
2519
|
+
if (i.isRoot) throw Error("[RenderTarget] cannot attach a depth-stencil texture to the screen — the canvas owns its own depth/stencil buffers. Render to a texture target instead.");
|
|
2520
|
+
o = { texture: i.depthStencilTexture.source };
|
|
2521
|
+
} else (s && !i.isRoot || (i.stencil || i.depth) && a.length === 0) && (o = this._createDepthStencilTexture(i.width, i.height, i.resolution));
|
|
2522
|
+
return {
|
|
2523
|
+
colorAttachments: a,
|
|
2524
|
+
depthStencilAttachment: o,
|
|
2525
|
+
isRoot: i.isRoot,
|
|
2526
|
+
label: i.label
|
|
2527
|
+
};
|
|
2528
|
+
}
|
|
2529
|
+
get size() {
|
|
2530
|
+
let e = this._size;
|
|
2531
|
+
return e[0] = this.pixelWidth, e[1] = this.pixelHeight, e;
|
|
2532
|
+
}
|
|
2533
|
+
get width() {
|
|
2534
|
+
return this.sizeSource.width;
|
|
2535
|
+
}
|
|
2536
|
+
get height() {
|
|
2537
|
+
return this.sizeSource.height;
|
|
2538
|
+
}
|
|
2539
|
+
get pixelWidth() {
|
|
2540
|
+
return this.sizeSource.pixelWidth;
|
|
2541
|
+
}
|
|
2542
|
+
get pixelHeight() {
|
|
2543
|
+
return this.sizeSource.pixelHeight;
|
|
2544
|
+
}
|
|
2545
|
+
get resolution() {
|
|
2546
|
+
return this.sizeSource._resolution;
|
|
2547
|
+
}
|
|
2548
|
+
get colorTextures() {
|
|
2549
|
+
return this._colorTextures ||= this.colorAttachments.map((e) => e.texture), this._colorTextures;
|
|
2550
|
+
}
|
|
2551
|
+
get depthStencilTexture() {
|
|
2552
|
+
return this.depthStencilAttachment?.texture ?? null;
|
|
2553
|
+
}
|
|
2554
|
+
get depth() {
|
|
2555
|
+
return this._depth;
|
|
2556
|
+
}
|
|
2557
|
+
get stencil() {
|
|
2558
|
+
return this._stencil;
|
|
2559
|
+
}
|
|
2560
|
+
get colorTexture() {
|
|
2561
|
+
return this.colorAttachments[0]?.texture;
|
|
2562
|
+
}
|
|
2563
|
+
get sizeSource() {
|
|
2564
|
+
return this.colorAttachments[0]?.texture ?? this.depthStencilAttachment?.texture;
|
|
2565
|
+
}
|
|
2566
|
+
onSourceResize(e) {
|
|
2567
|
+
this.resize(e.width, e.height, e._resolution, !0);
|
|
2568
|
+
}
|
|
2569
|
+
ensureDepthStencilTexture() {
|
|
2570
|
+
this._createDepthStencilTexture(this.sizeSource.width, this.sizeSource.height, this.sizeSource._resolution), this._depth = !0, this._stencil = !0;
|
|
2571
|
+
}
|
|
2572
|
+
resize(e, t, n = this.resolution, r = !1) {
|
|
2573
|
+
if (this.dirtyId++, this.colorAttachments.forEach((i, a) => {
|
|
2574
|
+
r && a === 0 || i.texture.resize(e, t, n);
|
|
2575
|
+
}), this.depthStencilAttachment) {
|
|
2576
|
+
if (r && this.colorAttachments.length === 0) return;
|
|
2577
|
+
this.depthStencilAttachment.texture.resize(e, t, n);
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
destroy() {
|
|
2581
|
+
!this.colorAttachments && !this.depthStencilAttachment || (this.sizeSource.off("resize", this.onSourceResize, this), this._managedColorTextures && this.colorAttachments.forEach((e) => {
|
|
2582
|
+
e.texture.destroy();
|
|
2583
|
+
}), this.depthStencilAttachment && (this.depthStencilAttachment.texture.destroy(), delete this.depthStencilAttachment), this.colorAttachments = null, this._colorTextures = null);
|
|
2584
|
+
}
|
|
2585
|
+
_createDepthStencilTexture(t, n, r) {
|
|
2586
|
+
return this.depthStencilAttachment ??= { texture: new e({
|
|
2587
|
+
width: t,
|
|
2588
|
+
height: n,
|
|
2589
|
+
resolution: r,
|
|
2590
|
+
format: "depth24plus-stencil8",
|
|
2591
|
+
autoGenerateMipmaps: !1,
|
|
2592
|
+
antialias: !1,
|
|
2593
|
+
mipLevelCount: 1
|
|
2594
|
+
}) }, this.depthStencilAttachment;
|
|
2595
|
+
}
|
|
2596
|
+
};
|
|
2597
|
+
ur.defaultOptions = {
|
|
2598
|
+
width: 0,
|
|
2599
|
+
height: 0,
|
|
2600
|
+
resolution: 1,
|
|
2601
|
+
colorTextures: 1,
|
|
2602
|
+
stencil: !1,
|
|
2603
|
+
depth: !1,
|
|
2604
|
+
antialias: !1,
|
|
2605
|
+
isRoot: !1
|
|
2606
|
+
};
|
|
2607
|
+
var Q = ur, $ = /* @__PURE__ */ new Map();
|
|
2608
|
+
se.register($);
|
|
2609
|
+
function dr(e, t) {
|
|
2610
|
+
if (!$.has(e)) {
|
|
2611
|
+
let n = new r({ source: new h({
|
|
2612
|
+
resource: e,
|
|
2613
|
+
...t
|
|
2614
|
+
}) }), i = () => {
|
|
2615
|
+
$.get(e) === n && $.delete(e);
|
|
2616
|
+
};
|
|
2617
|
+
n.once("destroy", i), n.source.once("destroy", i), $.set(e, n);
|
|
2618
|
+
}
|
|
2619
|
+
return $.get(e);
|
|
2620
|
+
}
|
|
2621
|
+
//#endregion
|
|
2622
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/view/ViewSystem.mjs
|
|
2623
|
+
var fr = class e {
|
|
2624
|
+
get autoDensity() {
|
|
2625
|
+
return this.texture.source.autoDensity;
|
|
2626
|
+
}
|
|
2627
|
+
set autoDensity(e) {
|
|
2628
|
+
this.texture.source.autoDensity = e;
|
|
2629
|
+
}
|
|
2630
|
+
get resolution() {
|
|
2631
|
+
return this.texture.source._resolution;
|
|
2632
|
+
}
|
|
2633
|
+
set resolution(e) {
|
|
2634
|
+
this.texture.source.resize(this.texture.source.width, this.texture.source.height, e);
|
|
2635
|
+
}
|
|
2636
|
+
init(t) {
|
|
2637
|
+
t = {
|
|
2638
|
+
...e.defaultOptions,
|
|
2639
|
+
...t
|
|
2640
|
+
}, t.view && (m(p, "ViewSystem.view has been renamed to ViewSystem.canvas"), t.canvas = t.view), this.screen = new d(0, 0, t.width, t.height), this.canvas = t.canvas || me.get().createCanvas(), this.antialias = !!t.antialias, this.texture = dr(this.canvas, t), this.renderTarget = new Q({
|
|
2641
|
+
colorTextures: [this.texture],
|
|
2642
|
+
depth: !!t.depth,
|
|
2643
|
+
isRoot: !0
|
|
2644
|
+
}), this.texture.source.transparent = t.backgroundAlpha < 1, this.resolution = t.resolution;
|
|
2645
|
+
}
|
|
2646
|
+
resize(e, t, n) {
|
|
2647
|
+
this.texture.source.resize(e, t, n), this.screen.width = this.texture.frame.width, this.screen.height = this.texture.frame.height;
|
|
2648
|
+
}
|
|
2649
|
+
destroy(e = !1) {
|
|
2650
|
+
(typeof e == "boolean" ? e : e?.removeView) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas), this.texture.destroy();
|
|
2651
|
+
}
|
|
2652
|
+
};
|
|
2653
|
+
fr.extension = {
|
|
2654
|
+
type: [
|
|
2655
|
+
g.WebGLSystem,
|
|
2656
|
+
g.WebGPUSystem,
|
|
2657
|
+
g.CanvasSystem
|
|
2658
|
+
],
|
|
2659
|
+
name: "view",
|
|
2660
|
+
priority: 0
|
|
2661
|
+
}, fr.defaultOptions = {
|
|
2662
|
+
width: 800,
|
|
2663
|
+
height: 600,
|
|
2664
|
+
autoDensity: !1,
|
|
2665
|
+
antialias: !1
|
|
2666
|
+
};
|
|
2667
|
+
var pr = fr, mr = [
|
|
2668
|
+
Vn,
|
|
2669
|
+
er,
|
|
2670
|
+
ar,
|
|
2671
|
+
pr,
|
|
2672
|
+
Fn,
|
|
2673
|
+
$n,
|
|
2674
|
+
lr,
|
|
2675
|
+
Yn,
|
|
2676
|
+
Wn,
|
|
2677
|
+
Ln,
|
|
2678
|
+
sr,
|
|
2679
|
+
nr
|
|
2680
|
+
], hr = [
|
|
2681
|
+
vn,
|
|
2682
|
+
cn,
|
|
2683
|
+
tt,
|
|
2684
|
+
ye,
|
|
2685
|
+
hn,
|
|
2686
|
+
zn,
|
|
2687
|
+
Rn,
|
|
2688
|
+
ge
|
|
2689
|
+
];
|
|
2690
|
+
//#endregion
|
|
2691
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/calculateProjection.mjs
|
|
2692
|
+
function gr(e, t, n, r, i, a) {
|
|
2693
|
+
let o = a ? 1 : -1;
|
|
2694
|
+
return e.identity(), e.a = 1 / r * 2, e.d = o * (1 / i * 2), e.tx = -1 - t * e.a, e.ty = -o - n * e.d, e;
|
|
2695
|
+
}
|
|
2696
|
+
//#endregion
|
|
2697
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/isRenderingToScreen.mjs
|
|
2698
|
+
function _r(e) {
|
|
2699
|
+
if (e.colorAttachments.length === 0) return !1;
|
|
2700
|
+
let t = e.colorTexture.resource;
|
|
2701
|
+
return globalThis.HTMLCanvasElement && t instanceof HTMLCanvasElement && document.body.contains(t);
|
|
2702
|
+
}
|
|
2703
|
+
//#endregion
|
|
2704
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/renderTarget/RenderTargetSystem.mjs
|
|
2705
|
+
var vr = class {
|
|
2706
|
+
constructor(e) {
|
|
2707
|
+
this.rootViewPort = new d(), this.viewport = new d(), this.onRenderTargetChange = new Sn("onRenderTargetChange"), this.projectionMatrix = new y(), this.defaultClearColor = [
|
|
2708
|
+
0,
|
|
2709
|
+
0,
|
|
2710
|
+
0,
|
|
2711
|
+
0
|
|
2712
|
+
], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._bindState = {
|
|
2713
|
+
target: null,
|
|
2714
|
+
frame: void 0,
|
|
2715
|
+
mipLevel: 0,
|
|
2716
|
+
layer: 0,
|
|
2717
|
+
flipY: !1
|
|
2718
|
+
}, this._bindFrame = new d(), this._renderer = e, e.gc.addCollection(this, "_gpuRenderTargetHash", "hash");
|
|
2719
|
+
}
|
|
2720
|
+
get renderSurface() {
|
|
2721
|
+
return this._bindState.target;
|
|
2722
|
+
}
|
|
2723
|
+
get mipLevel() {
|
|
2724
|
+
return this._bindState.mipLevel;
|
|
2725
|
+
}
|
|
2726
|
+
get layer() {
|
|
2727
|
+
return this._bindState.layer;
|
|
2728
|
+
}
|
|
2729
|
+
finishRenderPass() {
|
|
2730
|
+
this.adaptor.finishRenderPass(this.renderTarget);
|
|
2731
|
+
}
|
|
2732
|
+
renderStart(e) {
|
|
2733
|
+
this._renderTargetStack.length = 0, this.push(e), this.rootViewPort.copyFrom(this.viewport), this.rootRenderTarget = this.renderTarget, this.renderingToScreen = _r(this.rootRenderTarget), this.adaptor.prerender?.(this.rootRenderTarget);
|
|
2734
|
+
}
|
|
2735
|
+
postrender() {
|
|
2736
|
+
this.adaptor.postrender?.(this.rootRenderTarget);
|
|
2737
|
+
}
|
|
2738
|
+
bind(e, t = !0, n, i, a = 0, o = 0, s) {
|
|
2739
|
+
let c;
|
|
2740
|
+
"target" in e ? c = e : (m("8.20.0", "RenderTargetSystem.bind: positional arguments are deprecated, please use an options object instead: bind({ target, clear, clearColor, frame, mipLevel, layer, flipY })"), c = {
|
|
2741
|
+
target: e,
|
|
2742
|
+
clear: t,
|
|
2743
|
+
clearColor: n,
|
|
2744
|
+
frame: i,
|
|
2745
|
+
mipLevel: a,
|
|
2746
|
+
layer: o,
|
|
2747
|
+
flipY: s
|
|
2748
|
+
});
|
|
2749
|
+
let l = c.target;
|
|
2750
|
+
t = c.clear ?? !0, n = c.clearColor, a = (c.mipLevel ?? 0) | 0, o = (c.layer ?? 0) | 0, s = c.flipY, i = c.frame;
|
|
2751
|
+
let u = this.getRenderTarget(l), d = this.renderTarget !== u;
|
|
2752
|
+
this.renderTarget = u;
|
|
2753
|
+
let f = this.getGpuRenderTarget(u);
|
|
2754
|
+
(u.pixelWidth !== f.width || u.pixelHeight !== f.height) && (this.adaptor.resizeGpuRenderTarget(u), f.width = u.pixelWidth, f.height = u.pixelHeight);
|
|
2755
|
+
let p = u.colorAttachments[0]?.texture || u.depthStencilAttachment?.texture, h = this.viewport, g = p.arrayLayerCount || 1;
|
|
2756
|
+
if (o < 0 || o >= g) throw Error(`[RenderTargetSystem] layer ${o} is out of bounds (arrayLayerCount=${g}).`);
|
|
2757
|
+
let _ = this._bindState;
|
|
2758
|
+
_.target = l, _.frame = i ? this._bindFrame.copyFrom(i) : void 0, _.mipLevel = a, _.layer = o, _.flipY = s;
|
|
2759
|
+
let v = Math.max(p.pixelWidth >> a, 1), y = Math.max(p.pixelHeight >> a, 1);
|
|
2760
|
+
if (!i && l instanceof r && (i = l.frame), i) {
|
|
2761
|
+
let e = p._resolution, t = 1 << Math.max(a, 0), n = i.x * e + .5 | 0, r = i.y * e + .5 | 0, o = i.width * e + .5 | 0, s = i.height * e + .5 | 0, c = Math.floor(n / t), l = Math.floor(r / t), u = Math.ceil(o / t), d = Math.ceil(s / t);
|
|
2762
|
+
c < 0 && (u += c, c = 0), l < 0 && (d += l, l = 0), c = Math.min(c, v - 1), l = Math.min(l, y - 1), u = Math.min(u, v - c), d = Math.min(d, y - l), u = Math.max(u, 1), d = Math.max(d, 1), h.x = c, h.y = l, h.width = u, h.height = d;
|
|
2763
|
+
} else h.x = 0, h.y = 0, h.width = v, h.height = y;
|
|
2764
|
+
return u.flipY = s, gr(this.projectionMatrix, 0, 0, h.width / p.resolution, h.height / p.resolution, !u.isRoot != !!u.flipY), this.adaptor.startRenderPass(u, t, n, h, a, o), d && this.onRenderTargetChange.emit(u), u;
|
|
2765
|
+
}
|
|
2766
|
+
getBindState(e) {
|
|
2767
|
+
if (!this.renderTarget) throw Error("[RenderTargetSystem] getBindState is only valid while a render surface is bound");
|
|
2768
|
+
let t = this._bindState;
|
|
2769
|
+
return e ??= {}, e.target = t.target, e.clear = X.NONE, e.clearColor = void 0, t.frame ? e.frame ? e.frame.copyFrom(t.frame) : e.frame = t.frame.clone() : e.frame = void 0, e.mipLevel = t.mipLevel, e.layer = t.layer, e.flipY = !!t.flipY, e;
|
|
2770
|
+
}
|
|
2771
|
+
get frontFaceInverted() {
|
|
2772
|
+
let e = this.renderTarget;
|
|
2773
|
+
if (!e) return !1;
|
|
2774
|
+
let t = this._renderer.type === w.WEBGL && !e.isRoot;
|
|
2775
|
+
return !!e.flipY !== t;
|
|
2776
|
+
}
|
|
2777
|
+
clear(e, t = X.ALL, n, r = this.mipLevel, i = this.layer) {
|
|
2778
|
+
t && (e &&= this.getRenderTarget(e), this.adaptor.clear(e || this.renderTarget, t, n, this.viewport, r, i));
|
|
2779
|
+
}
|
|
2780
|
+
contextChange() {
|
|
2781
|
+
this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null);
|
|
2782
|
+
}
|
|
2783
|
+
push(e, t = X.ALL, n, r, i = 0, a = 0, o) {
|
|
2784
|
+
let s;
|
|
2785
|
+
"target" in e ? s = e : (m("8.20.0", "RenderTargetSystem.push: positional arguments are deprecated, please use an options object instead: push({ target, clear, clearColor, frame, mipLevel, layer, flipY })"), s = {
|
|
2786
|
+
target: e,
|
|
2787
|
+
clear: t,
|
|
2788
|
+
clearColor: n,
|
|
2789
|
+
frame: r,
|
|
2790
|
+
mipLevel: i,
|
|
2791
|
+
layer: a,
|
|
2792
|
+
flipY: o
|
|
2793
|
+
});
|
|
2794
|
+
let c = this.bind(s);
|
|
2795
|
+
return this._renderTargetStack.push({
|
|
2796
|
+
target: s.target,
|
|
2797
|
+
clear: !1,
|
|
2798
|
+
clearColor: void 0,
|
|
2799
|
+
frame: s.frame ? s.frame.clone() : void 0,
|
|
2800
|
+
mipLevel: s.mipLevel,
|
|
2801
|
+
layer: s.layer,
|
|
2802
|
+
flipY: s.flipY
|
|
2803
|
+
}), c;
|
|
2804
|
+
}
|
|
2805
|
+
pop() {
|
|
2806
|
+
this._renderTargetStack.pop();
|
|
2807
|
+
let e = this._renderTargetStack[this._renderTargetStack.length - 1];
|
|
2808
|
+
if (!e) throw Error("[RenderTargetSystem] pop: no previous binding to restore (unbalanced pop)");
|
|
2809
|
+
return this.bind(e);
|
|
2810
|
+
}
|
|
2811
|
+
getRenderTarget(e) {
|
|
2812
|
+
return e.isTexture && (e = e.source), this._renderSurfaceToRenderTargetHash.get(e) ?? this._initRenderTarget(e);
|
|
2813
|
+
}
|
|
2814
|
+
copyToTexture(e, t, n, r, i) {
|
|
2815
|
+
let a = this.getRenderTarget(e);
|
|
2816
|
+
n.x < 0 && (r.width += n.x, i.x -= n.x, n.x = 0), n.y < 0 && (r.height += n.y, i.y -= n.y, n.y = 0);
|
|
2817
|
+
let { pixelWidth: o, pixelHeight: s } = a;
|
|
2818
|
+
return r.width = Math.min(r.width, o - n.x), r.height = Math.min(r.height, s - n.y), this.adaptor.copyToTexture(a, t, n, r, i);
|
|
2819
|
+
}
|
|
2820
|
+
copyDepthTexture(e, t, n, r, i = {
|
|
2821
|
+
x: 0,
|
|
2822
|
+
y: 0
|
|
2823
|
+
}) {
|
|
2824
|
+
let a = this.getRenderTarget(e);
|
|
2825
|
+
if (!a.depthStencilAttachment) {
|
|
2826
|
+
o("[RenderTargetSystem] copyDepthTexture: the source render target has no depth attachment to copy from");
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
let s = t.source;
|
|
2830
|
+
if (!s.format.includes("depth") && !s.format.includes("stencil")) {
|
|
2831
|
+
o(`[RenderTargetSystem] copyDepthTexture: the destination texture must have a depth/stencil format (got '${s.format}')`);
|
|
2832
|
+
return;
|
|
2833
|
+
}
|
|
2834
|
+
let c = n.x, l = n.y, u = i.x, d = i.y, f = r.width, p = r.height;
|
|
2835
|
+
c < 0 && (f += c, u -= c, c = 0), l < 0 && (p += l, d -= l, l = 0), f = Math.min(f, a.pixelWidth - c), p = Math.min(p, a.pixelHeight - l), f = Math.min(f, s.pixelWidth - u), p = Math.min(p, s.pixelHeight - d), !(f <= 0 || p <= 0) && this.adaptor.copyDepthTexture(a, t, {
|
|
2836
|
+
x: c,
|
|
2837
|
+
y: l
|
|
2838
|
+
}, {
|
|
2839
|
+
width: f,
|
|
2840
|
+
height: p
|
|
2841
|
+
}, {
|
|
2842
|
+
x: u,
|
|
2843
|
+
y: d
|
|
2844
|
+
});
|
|
2845
|
+
}
|
|
2846
|
+
ensureDepthStencil() {
|
|
2847
|
+
if (!this.renderTarget.stencil) {
|
|
2848
|
+
if (this.renderTarget.depthStencilTexture) {
|
|
2849
|
+
o(`[RenderTargetSystem] a stencil mask is being used, but the render target's depthStencilTexture format '${this.renderTarget.depthStencilTexture.format}' has no stencil aspect, so masking cannot work here. Use a 'depth24plus-stencil8' texture instead.`);
|
|
2850
|
+
return;
|
|
2851
|
+
}
|
|
2852
|
+
this.renderTarget._depth = !0, this.renderTarget._stencil = !0, this.adaptor.startRenderPass(this.renderTarget, !1, null, this.viewport, 0, this.layer);
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
destroy() {
|
|
2856
|
+
this._renderer = null, this._renderSurfaceToRenderTargetHash.forEach((e, t) => {
|
|
2857
|
+
e !== t && this._releaseRenderTarget(t, e);
|
|
2858
|
+
}), this._renderSurfaceToRenderTargetHash.clear(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null);
|
|
2859
|
+
}
|
|
2860
|
+
_initRenderTarget(t) {
|
|
2861
|
+
let n = null;
|
|
2862
|
+
if (h.test(t) && (t = dr(t).source), t instanceof Q) n = t;
|
|
2863
|
+
else if (t instanceof e) {
|
|
2864
|
+
let e = t.format;
|
|
2865
|
+
n = e.includes("depth") || e.includes("stencil") ? new Q({
|
|
2866
|
+
colorTextures: 0,
|
|
2867
|
+
depthStencilTexture: t
|
|
2868
|
+
}) : new Q({ colorTextures: [t] }), t.source instanceof h && (n.isRoot = !0), t.once("destroy", this._onRenderSurfaceDestroy, this);
|
|
2869
|
+
}
|
|
2870
|
+
return this._renderSurfaceToRenderTargetHash.set(t, n), n;
|
|
2871
|
+
}
|
|
2872
|
+
_onRenderSurfaceDestroy(e) {
|
|
2873
|
+
let t = this._renderSurfaceToRenderTargetHash.get(e);
|
|
2874
|
+
t && this._releaseRenderTarget(e, t);
|
|
2875
|
+
}
|
|
2876
|
+
_releaseRenderTarget(e, t) {
|
|
2877
|
+
t.destroy(), this._renderSurfaceToRenderTargetHash.delete(e), e.off("destroy", this._onRenderSurfaceDestroy, this);
|
|
2878
|
+
let n = this._gpuRenderTargetHash[t.uid];
|
|
2879
|
+
n && (this._gpuRenderTargetHash[t.uid] = null, this.adaptor.destroyGpuRenderTarget(n));
|
|
2880
|
+
}
|
|
2881
|
+
getGpuRenderTarget(e) {
|
|
2882
|
+
return this._gpuRenderTargetHash[e.uid] || (this._gpuRenderTargetHash[e.uid] = this.adaptor.initGpuRenderTarget(e));
|
|
2883
|
+
}
|
|
2884
|
+
resetState() {
|
|
2885
|
+
this.renderTarget = null, this._bindState.target = null;
|
|
2886
|
+
}
|
|
2887
|
+
};
|
|
2888
|
+
//#endregion
|
|
2889
|
+
export { ge as A, Ht as C, tt as D, rt as E, et as O, Ut as S, V as T, en as _, In as a, Wt as b, xn as c, gn as d, hn as f, $t as g, nn as h, pr as i, ye as k, vn as l, on as m, hr as n, Tn as o, cn as p, mr as r, X as s, vr as t, _n as u, Yt as v, ct as w, Gt as x, Qt as y };
|