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