@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,1656 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { K as t, O as n, Q as r, X as i, _ as a, a as o, c as s, h as c, it as l, l as u, m as d, n as f, o as p, r as m, rt as h, s as g, w as _ } from "./Geometry-D3fkwmax.js";
|
|
3
|
+
import { t as v } from "./CanvasPool-ilDNHrRx.js";
|
|
4
|
+
import { C as y, E as ee, T as b, b as te, d as x, g as S, n as ne, o as re, r as ie, s as C, t as ae, v as oe } from "./RenderTargetSystem-umK0aqrs.js";
|
|
5
|
+
import { t as w } from "./getTextureBatchBindGroup-ChWkOJ3t.js";
|
|
6
|
+
import { c as se, d as ce, i as le, l as ue, o as de, p as fe, r as pe, s as me, t as he } from "./BufferResource-CKQMSOM4.js";
|
|
7
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/scene/graphics/gpu/GpuGraphicsAdaptor.mjs
|
|
8
|
+
var T = class {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._maxTextures = 0;
|
|
11
|
+
}
|
|
12
|
+
contextChange(e) {
|
|
13
|
+
let t = new g({
|
|
14
|
+
uTransformMatrix: {
|
|
15
|
+
value: new r(),
|
|
16
|
+
type: "mat3x3<f32>"
|
|
17
|
+
},
|
|
18
|
+
uColor: {
|
|
19
|
+
value: new Float32Array([
|
|
20
|
+
1,
|
|
21
|
+
1,
|
|
22
|
+
1,
|
|
23
|
+
1
|
|
24
|
+
]),
|
|
25
|
+
type: "vec4<f32>"
|
|
26
|
+
},
|
|
27
|
+
uRound: {
|
|
28
|
+
value: 0,
|
|
29
|
+
type: "f32"
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
this._maxTextures = e.limits.maxBatchableTextures;
|
|
33
|
+
let n = y({
|
|
34
|
+
name: "graphics",
|
|
35
|
+
bits: [
|
|
36
|
+
te,
|
|
37
|
+
oe(this._maxTextures),
|
|
38
|
+
fe,
|
|
39
|
+
S
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
this.shader = new p({
|
|
43
|
+
gpuProgram: n,
|
|
44
|
+
resources: { localUniforms: t }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
execute(e, t) {
|
|
48
|
+
let n = t.context, r = n.customShader || this.shader, i = e.renderer, { batcher: a, instructions: o } = i.graphicsContext.getContextRenderData(n), s = i.encoder;
|
|
49
|
+
s.setGeometry(a.geometry, r.gpuProgram);
|
|
50
|
+
let c = i.globalUniforms.bindGroup;
|
|
51
|
+
s.setBindGroup(0, c, r.gpuProgram);
|
|
52
|
+
let l = i.renderPipes.uniformBatch.getUniformBindGroup(r.resources.localUniforms, !0);
|
|
53
|
+
s.setBindGroup(2, l, r.gpuProgram);
|
|
54
|
+
let u = o.instructions, d = null;
|
|
55
|
+
for (let t = 0; t < o.instructionSize; t++) {
|
|
56
|
+
let n = u[t];
|
|
57
|
+
if (n.topology !== d && (d = n.topology, s.setPipelineFromGeometryProgramAndState(a.geometry, r.gpuProgram, e.state, n.topology)), r.groups[1] = n.bindGroup, !n.gpuBindGroup) {
|
|
58
|
+
let e = n.textures;
|
|
59
|
+
n.bindGroup = w(e.textures, e.count, this._maxTextures), n.gpuBindGroup = i.bindGroup.getBindGroup(n.bindGroup, r.gpuProgram, 1);
|
|
60
|
+
}
|
|
61
|
+
s.setBindGroup(1, n.bindGroup, r.gpuProgram), s.renderPassEncoder.drawIndexed(n.size, 1, n.start);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
destroy() {
|
|
65
|
+
this.shader.destroy(!0), this.shader = null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
T.extension = {
|
|
69
|
+
type: [h.WebGPUPipesAdaptor],
|
|
70
|
+
name: "graphics"
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/scene/mesh/gpu/GpuMeshAdapter.mjs
|
|
74
|
+
var E = class {
|
|
75
|
+
init() {
|
|
76
|
+
let e = y({
|
|
77
|
+
name: "mesh",
|
|
78
|
+
bits: [
|
|
79
|
+
ce,
|
|
80
|
+
ue,
|
|
81
|
+
S
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
this._shader = new p({
|
|
85
|
+
gpuProgram: e,
|
|
86
|
+
resources: {
|
|
87
|
+
uTexture: _.EMPTY._source,
|
|
88
|
+
uSampler: _.EMPTY._source.style,
|
|
89
|
+
textureUniforms: { uTextureMatrix: {
|
|
90
|
+
type: "mat3x3<f32>",
|
|
91
|
+
value: new r()
|
|
92
|
+
} }
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
execute(e, n) {
|
|
97
|
+
let r = e.renderer, i = n._shader;
|
|
98
|
+
if (!i) i = this._shader, i.groups[2] = r.texture.getTextureBindGroup(n.texture);
|
|
99
|
+
else if (!i.gpuProgram) {
|
|
100
|
+
t("Mesh shader has no gpuProgram", n.shader);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let a = i.gpuProgram;
|
|
104
|
+
if (a.autoAssignGlobalUniforms && (i.groups[0] = r.globalUniforms.bindGroup), a.autoAssignLocalUniforms) {
|
|
105
|
+
let t = e.localUniforms;
|
|
106
|
+
i.groups[1] = r.renderPipes.uniformBatch.getUniformBindGroup(t, !0);
|
|
107
|
+
}
|
|
108
|
+
r.encoder.draw({
|
|
109
|
+
geometry: n._geometry,
|
|
110
|
+
shader: i,
|
|
111
|
+
state: n.state
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
destroy() {
|
|
115
|
+
this._shader.destroy(!0), this._shader = null;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
E.extension = {
|
|
119
|
+
type: [h.WebGPUPipesAdaptor],
|
|
120
|
+
name: "mesh"
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/batcher/gpu/GpuBatchAdaptor.mjs
|
|
124
|
+
var D = o.for2d(), O = class {
|
|
125
|
+
start(e, t, n) {
|
|
126
|
+
let r = e.renderer, i = r.encoder, a = n.gpuProgram;
|
|
127
|
+
this._shader = n, this._geometry = t, i.setGeometry(t, a), D.blendMode = "normal", r.pipeline.getPipeline(t, a, D);
|
|
128
|
+
let o = r.globalUniforms.bindGroup;
|
|
129
|
+
i.resetBindGroup(1), i.setBindGroup(0, o, a);
|
|
130
|
+
}
|
|
131
|
+
execute(e, t) {
|
|
132
|
+
let n = this._shader.gpuProgram, r = e.renderer, i = r.encoder;
|
|
133
|
+
if (!t.bindGroup) {
|
|
134
|
+
let e = t.textures;
|
|
135
|
+
t.bindGroup = w(e.textures, e.count, r.limits.maxBatchableTextures);
|
|
136
|
+
}
|
|
137
|
+
D.blendMode = t.blendMode;
|
|
138
|
+
let a = r.bindGroup.getBindGroup(t.bindGroup, n, 1), o = r.pipeline.getPipeline(this._geometry, n, D, t.topology);
|
|
139
|
+
t.bindGroup._touch(r.gc.now, r.tick), i.setPipeline(o), i.renderPassEncoder.setBindGroup(1, a), i.renderPassEncoder.drawIndexed(t.size, 1, t.start);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
O.extension = {
|
|
143
|
+
type: [h.WebGPUPipesAdaptor],
|
|
144
|
+
name: "batch"
|
|
145
|
+
};
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/BindGroupSystem.mjs
|
|
148
|
+
var k = class {
|
|
149
|
+
constructor(e) {
|
|
150
|
+
this._hash = /* @__PURE__ */ Object.create(null), this._renderer = e;
|
|
151
|
+
}
|
|
152
|
+
contextChange(e) {
|
|
153
|
+
this._gpu = e;
|
|
154
|
+
}
|
|
155
|
+
getBindGroup(e, t, n) {
|
|
156
|
+
return e._updateKey(), this._hash[e._key] || this._createBindGroup(e, t, n);
|
|
157
|
+
}
|
|
158
|
+
_createBindGroup(e, t, n) {
|
|
159
|
+
let r = this._gpu.device, i = t.layout[n], a = [], o = this._renderer;
|
|
160
|
+
for (let t in i) {
|
|
161
|
+
let n = e.resources[t] ?? e.resources[i[t]], r;
|
|
162
|
+
if (n._resourceType === "uniformGroup") {
|
|
163
|
+
let e = n;
|
|
164
|
+
o.ubo.updateUniformGroup(e);
|
|
165
|
+
let t = e.buffer;
|
|
166
|
+
r = {
|
|
167
|
+
buffer: o.buffer.getGPUBuffer(t),
|
|
168
|
+
offset: 0,
|
|
169
|
+
size: t.descriptor.size
|
|
170
|
+
};
|
|
171
|
+
} else if (n._resourceType === "buffer") {
|
|
172
|
+
let e = n;
|
|
173
|
+
r = {
|
|
174
|
+
buffer: o.buffer.getGPUBuffer(e),
|
|
175
|
+
offset: 0,
|
|
176
|
+
size: e.descriptor.size
|
|
177
|
+
};
|
|
178
|
+
} else if (n._resourceType === "bufferResource") {
|
|
179
|
+
let e = n;
|
|
180
|
+
r = {
|
|
181
|
+
buffer: o.buffer.getGPUBuffer(e.buffer),
|
|
182
|
+
offset: e.offset,
|
|
183
|
+
size: e.size
|
|
184
|
+
};
|
|
185
|
+
} else if (n._resourceType === "textureSampler") {
|
|
186
|
+
let e = n;
|
|
187
|
+
r = o.texture.getGpuSampler(e);
|
|
188
|
+
} else if (n._resourceType === "textureSource") {
|
|
189
|
+
let e = n;
|
|
190
|
+
r = o.texture.getTextureView(e);
|
|
191
|
+
}
|
|
192
|
+
a.push({
|
|
193
|
+
binding: i[t],
|
|
194
|
+
resource: r
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
let s = o.shader.getProgramData(t).bindGroups[n], c = r.createBindGroup({
|
|
198
|
+
layout: s,
|
|
199
|
+
entries: a
|
|
200
|
+
});
|
|
201
|
+
return this._hash[e._key] = c, c;
|
|
202
|
+
}
|
|
203
|
+
destroy() {
|
|
204
|
+
this._hash = null, this._renderer = null;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
k.extension = {
|
|
208
|
+
type: [h.WebGPUSystem],
|
|
209
|
+
name: "bindGroup"
|
|
210
|
+
};
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/buffer/GpuBufferSystem.mjs
|
|
213
|
+
var ge = class {
|
|
214
|
+
constructor(e) {
|
|
215
|
+
this.gpuBuffer = e;
|
|
216
|
+
}
|
|
217
|
+
destroy() {
|
|
218
|
+
this.gpuBuffer.destroy(), this.gpuBuffer = null;
|
|
219
|
+
}
|
|
220
|
+
}, A = class {
|
|
221
|
+
constructor(e) {
|
|
222
|
+
this._renderer = e, this._managedBuffers = new x({
|
|
223
|
+
renderer: e,
|
|
224
|
+
type: "resource",
|
|
225
|
+
onUnload: this.onBufferUnload.bind(this),
|
|
226
|
+
name: "gpuBuffer"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
contextChange(e) {
|
|
230
|
+
this._gpu = e;
|
|
231
|
+
}
|
|
232
|
+
getGPUBuffer(e) {
|
|
233
|
+
return e._gcLastUsed = this._renderer.gc.now, e._gpuData[this._renderer.uid]?.gpuBuffer || this.createGPUBuffer(e);
|
|
234
|
+
}
|
|
235
|
+
updateBuffer(e) {
|
|
236
|
+
let t = this.getGPUBuffer(e), n = e.data;
|
|
237
|
+
return e._updateID && n && (e._updateID = 0, this._gpu.device.queue.writeBuffer(t, 0, n.buffer, 0, (e._updateSize || n.byteLength) + 3 & -4)), t;
|
|
238
|
+
}
|
|
239
|
+
destroyAll() {
|
|
240
|
+
this._managedBuffers.removeAll();
|
|
241
|
+
}
|
|
242
|
+
onBufferUnload(e) {
|
|
243
|
+
e.off("update", this.updateBuffer, this), e.off("change", this.onBufferChange, this);
|
|
244
|
+
}
|
|
245
|
+
createGPUBuffer(e) {
|
|
246
|
+
let t = this._gpu.device.createBuffer(e.descriptor);
|
|
247
|
+
return e._updateID = 0, e._resourceId = i("resource"), e.data && (ee(e.data.buffer, t.getMappedRange(), e.data.byteOffset, e.data.byteLength), t.unmap()), e._gpuData[this._renderer.uid] = new ge(t), this._managedBuffers.add(e) && (e.on("update", this.updateBuffer, this), e.on("change", this.onBufferChange, this)), t;
|
|
248
|
+
}
|
|
249
|
+
onBufferChange(e) {
|
|
250
|
+
this._managedBuffers.remove(e), e._updateID = 0, this.createGPUBuffer(e);
|
|
251
|
+
}
|
|
252
|
+
destroy() {
|
|
253
|
+
this._managedBuffers.destroy(), this._renderer = null, this._gpu = null;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
A.extension = {
|
|
257
|
+
type: [h.WebGPUSystem],
|
|
258
|
+
name: "buffer"
|
|
259
|
+
};
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuColorMaskSystem.mjs
|
|
262
|
+
var j = class {
|
|
263
|
+
constructor(e) {
|
|
264
|
+
this._colorMaskCache = 15, this._renderer = e;
|
|
265
|
+
}
|
|
266
|
+
setMask(e) {
|
|
267
|
+
this._colorMaskCache !== e && (this._colorMaskCache = e, this._renderer.pipeline.setColorMask(e));
|
|
268
|
+
}
|
|
269
|
+
destroy() {
|
|
270
|
+
this._renderer = null, this._colorMaskCache = null;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
j.extension = {
|
|
274
|
+
type: [h.WebGPUSystem],
|
|
275
|
+
name: "colorMask"
|
|
276
|
+
};
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuDeviceSystem.mjs
|
|
279
|
+
var M = class {
|
|
280
|
+
constructor(e) {
|
|
281
|
+
this._renderer = e;
|
|
282
|
+
}
|
|
283
|
+
async init(e) {
|
|
284
|
+
return this._initPromise ||= (e.gpu ? Promise.resolve(e.gpu) : this._createDeviceAndAdaptor(e)).then((e) => {
|
|
285
|
+
this.gpu = e, this.extensions = { transientAttachment: typeof GPUTextureUsage.TRANSIENT_ATTACHMENT == "number" }, this._renderer.runners.contextChange.emit(this.gpu);
|
|
286
|
+
}), this._initPromise;
|
|
287
|
+
}
|
|
288
|
+
contextChange(e) {
|
|
289
|
+
this._renderer.gpu = e;
|
|
290
|
+
}
|
|
291
|
+
async _createDeviceAndAdaptor(e) {
|
|
292
|
+
let t = await a.get().getNavigator().gpu.requestAdapter({
|
|
293
|
+
powerPreference: e.powerPreference,
|
|
294
|
+
forceFallbackAdapter: e.forceFallbackAdapter
|
|
295
|
+
}), n = [
|
|
296
|
+
"texture-compression-bc",
|
|
297
|
+
"texture-compression-astc",
|
|
298
|
+
"texture-compression-etc2"
|
|
299
|
+
].filter((e) => t.features.has(e));
|
|
300
|
+
return {
|
|
301
|
+
adapter: t,
|
|
302
|
+
device: await t.requestDevice({ requiredFeatures: n })
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
destroy() {
|
|
306
|
+
this.gpu = null, this.extensions = null, this._renderer = null;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
M.extension = {
|
|
310
|
+
type: [h.WebGPUSystem],
|
|
311
|
+
name: "device"
|
|
312
|
+
}, M.defaultOptions = {
|
|
313
|
+
powerPreference: void 0,
|
|
314
|
+
forceFallbackAdapter: !1
|
|
315
|
+
};
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuEncoderSystem.mjs
|
|
318
|
+
var N = class {
|
|
319
|
+
constructor(e) {
|
|
320
|
+
this._boundBindGroup = /* @__PURE__ */ Object.create(null), this._boundVertexBuffer = /* @__PURE__ */ Object.create(null), this._renderer = e;
|
|
321
|
+
}
|
|
322
|
+
renderStart() {
|
|
323
|
+
this.commandFinished = new Promise((e) => {
|
|
324
|
+
this._resolveCommandFinished = e;
|
|
325
|
+
}), this.commandEncoder = this._renderer.gpu.device.createCommandEncoder();
|
|
326
|
+
}
|
|
327
|
+
beginRenderPass(e) {
|
|
328
|
+
this.endRenderPass(), this._clearCache(), this.renderPassEncoder = this.commandEncoder.beginRenderPass(e.descriptor);
|
|
329
|
+
}
|
|
330
|
+
endRenderPass() {
|
|
331
|
+
this.renderPassEncoder && this.renderPassEncoder.end(), this.renderPassEncoder = null;
|
|
332
|
+
}
|
|
333
|
+
setViewport(e) {
|
|
334
|
+
this.renderPassEncoder.setViewport(e.x, e.y, e.width, e.height, 0, 1);
|
|
335
|
+
}
|
|
336
|
+
setPipelineFromGeometryProgramAndState(e, t, n, r) {
|
|
337
|
+
let i = this._renderer.pipeline.getPipeline(e, t, n, r);
|
|
338
|
+
this.setPipeline(i);
|
|
339
|
+
}
|
|
340
|
+
setPipeline(e) {
|
|
341
|
+
this._boundPipeline !== e && (this._boundPipeline = e, this.renderPassEncoder.setPipeline(e));
|
|
342
|
+
}
|
|
343
|
+
_setVertexBuffer(e, t) {
|
|
344
|
+
this._boundVertexBuffer[e] !== t && (this._boundVertexBuffer[e] = t, this.renderPassEncoder.setVertexBuffer(e, this._renderer.buffer.updateBuffer(t)));
|
|
345
|
+
}
|
|
346
|
+
_setIndexBuffer(e) {
|
|
347
|
+
if (this._boundIndexBuffer === e) return;
|
|
348
|
+
this._boundIndexBuffer = e;
|
|
349
|
+
let t = e.data.BYTES_PER_ELEMENT === 2 ? "uint16" : "uint32";
|
|
350
|
+
this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e), t);
|
|
351
|
+
}
|
|
352
|
+
resetBindGroup(e) {
|
|
353
|
+
this._boundBindGroup[e] = null;
|
|
354
|
+
}
|
|
355
|
+
setBindGroup(e, t, n) {
|
|
356
|
+
if (this._boundBindGroup[e] === t) return;
|
|
357
|
+
this._boundBindGroup[e] = t, t._touch(this._renderer.gc.now, this._renderer.tick);
|
|
358
|
+
let r = this._renderer.bindGroup.getBindGroup(t, n, e);
|
|
359
|
+
this.renderPassEncoder.setBindGroup(e, r);
|
|
360
|
+
}
|
|
361
|
+
setGeometry(e, t) {
|
|
362
|
+
let n = this._renderer.pipeline.getBufferNamesToBind(e, t);
|
|
363
|
+
for (let t in n) this._setVertexBuffer(parseInt(t, 10), e.attributes[n[t]].buffer);
|
|
364
|
+
e.indexBuffer && this._setIndexBuffer(e.indexBuffer);
|
|
365
|
+
}
|
|
366
|
+
_setShaderBindGroups(e, t) {
|
|
367
|
+
for (let n in e.groups) {
|
|
368
|
+
let r = e.groups[n];
|
|
369
|
+
t || this._syncBindGroup(r), this.setBindGroup(n, r, e.gpuProgram);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
_syncBindGroup(e) {
|
|
373
|
+
for (let t in e.resources) {
|
|
374
|
+
let n = e.resources[t];
|
|
375
|
+
n.isUniformGroup && this._renderer.ubo.updateUniformGroup(n);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
draw(e) {
|
|
379
|
+
let { geometry: t, shader: n, state: r, topology: i, size: a, start: o, instanceCount: s, skipSync: c } = e;
|
|
380
|
+
this.setPipelineFromGeometryProgramAndState(t, n.gpuProgram, r, i), this.setGeometry(t, n.gpuProgram), this._setShaderBindGroups(n, c), t.indexBuffer ? this.renderPassEncoder.drawIndexed(a || t.indexBuffer.data.length, s ?? t.instanceCount, o || 0) : this.renderPassEncoder.draw(a || t.getSize(), s ?? t.instanceCount, o || 0);
|
|
381
|
+
}
|
|
382
|
+
finishRenderPass() {
|
|
383
|
+
this.renderPassEncoder &&= (this.renderPassEncoder.end(), null);
|
|
384
|
+
}
|
|
385
|
+
postrender() {
|
|
386
|
+
this.finishRenderPass(), this._gpu.device.queue.submit([this.commandEncoder.finish()]), this._resolveCommandFinished(), this.commandEncoder = null;
|
|
387
|
+
}
|
|
388
|
+
restoreRenderPass() {
|
|
389
|
+
let e = this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget, !1, [
|
|
390
|
+
0,
|
|
391
|
+
0,
|
|
392
|
+
0,
|
|
393
|
+
1
|
|
394
|
+
], this._renderer.renderTarget.mipLevel, this._renderer.renderTarget.layer);
|
|
395
|
+
this.renderPassEncoder = this.commandEncoder.beginRenderPass(e);
|
|
396
|
+
let t = this._boundPipeline, n = { ...this._boundVertexBuffer }, r = this._boundIndexBuffer, i = { ...this._boundBindGroup };
|
|
397
|
+
this._clearCache();
|
|
398
|
+
let a = this._renderer.renderTarget.viewport;
|
|
399
|
+
this.renderPassEncoder.setViewport(a.x, a.y, a.width, a.height, 0, 1), this.setPipeline(t);
|
|
400
|
+
for (let e in n) this._setVertexBuffer(e, n[e]);
|
|
401
|
+
for (let e in i) this.setBindGroup(e, i[e], null);
|
|
402
|
+
this._setIndexBuffer(r);
|
|
403
|
+
}
|
|
404
|
+
_clearCache() {
|
|
405
|
+
for (let e = 0; e < 16; e++) this._boundBindGroup[e] = null, this._boundVertexBuffer[e] = null;
|
|
406
|
+
this._boundIndexBuffer = null, this._boundPipeline = null;
|
|
407
|
+
}
|
|
408
|
+
destroy() {
|
|
409
|
+
this._renderer = null, this._gpu = null, this._boundBindGroup = null, this._boundVertexBuffer = null, this._boundIndexBuffer = null, this._boundPipeline = null;
|
|
410
|
+
}
|
|
411
|
+
contextChange(e) {
|
|
412
|
+
this._gpu = e;
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
N.extension = {
|
|
416
|
+
type: [h.WebGPUSystem],
|
|
417
|
+
name: "encoder",
|
|
418
|
+
priority: 1
|
|
419
|
+
};
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.mjs
|
|
422
|
+
var P = class {
|
|
423
|
+
constructor(e) {
|
|
424
|
+
this._renderer = e;
|
|
425
|
+
}
|
|
426
|
+
contextChange() {
|
|
427
|
+
this.maxTextures = this._renderer.device.gpu.device.limits.maxSampledTexturesPerShaderStage, this.maxBatchableTextures = this.maxTextures;
|
|
428
|
+
}
|
|
429
|
+
destroy() {}
|
|
430
|
+
};
|
|
431
|
+
P.extension = {
|
|
432
|
+
type: [h.WebGPUSystem],
|
|
433
|
+
name: "limits"
|
|
434
|
+
};
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuStencilSystem.mjs
|
|
437
|
+
var F = class {
|
|
438
|
+
constructor(e) {
|
|
439
|
+
this._renderTargetStencilState = /* @__PURE__ */ Object.create(null), this._renderer = e, e.renderTarget.onRenderTargetChange.add(this);
|
|
440
|
+
}
|
|
441
|
+
onRenderTargetChange(e) {
|
|
442
|
+
let t = this._renderTargetStencilState[e.uid];
|
|
443
|
+
t ||= this._renderTargetStencilState[e.uid] = {
|
|
444
|
+
stencilMode: b.DISABLED,
|
|
445
|
+
stencilReference: 0
|
|
446
|
+
}, this._activeRenderTarget = e, this.setStencilMode(t.stencilMode, t.stencilReference);
|
|
447
|
+
}
|
|
448
|
+
setStencilMode(e, t) {
|
|
449
|
+
let n = this._renderTargetStencilState[this._activeRenderTarget.uid];
|
|
450
|
+
n.stencilMode = e, n.stencilReference = t;
|
|
451
|
+
let r = this._renderer;
|
|
452
|
+
r.pipeline.setStencilMode(e), r.encoder.renderPassEncoder.setStencilReference(t);
|
|
453
|
+
}
|
|
454
|
+
destroy() {
|
|
455
|
+
this._renderer.renderTarget.onRenderTargetChange.remove(this), this._renderer = null, this._activeRenderTarget = null, this._renderTargetStencilState = null;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
F.extension = {
|
|
459
|
+
type: [h.WebGPUSystem],
|
|
460
|
+
name: "stencil"
|
|
461
|
+
};
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/createUboElementsWGSL.mjs
|
|
464
|
+
var I = {
|
|
465
|
+
i32: {
|
|
466
|
+
align: 4,
|
|
467
|
+
size: 4
|
|
468
|
+
},
|
|
469
|
+
u32: {
|
|
470
|
+
align: 4,
|
|
471
|
+
size: 4
|
|
472
|
+
},
|
|
473
|
+
f32: {
|
|
474
|
+
align: 4,
|
|
475
|
+
size: 4
|
|
476
|
+
},
|
|
477
|
+
f16: {
|
|
478
|
+
align: 2,
|
|
479
|
+
size: 2
|
|
480
|
+
},
|
|
481
|
+
"vec2<i32>": {
|
|
482
|
+
align: 8,
|
|
483
|
+
size: 8
|
|
484
|
+
},
|
|
485
|
+
"vec2<u32>": {
|
|
486
|
+
align: 8,
|
|
487
|
+
size: 8
|
|
488
|
+
},
|
|
489
|
+
"vec2<f32>": {
|
|
490
|
+
align: 8,
|
|
491
|
+
size: 8
|
|
492
|
+
},
|
|
493
|
+
"vec2<f16>": {
|
|
494
|
+
align: 4,
|
|
495
|
+
size: 4
|
|
496
|
+
},
|
|
497
|
+
"vec3<i32>": {
|
|
498
|
+
align: 16,
|
|
499
|
+
size: 12
|
|
500
|
+
},
|
|
501
|
+
"vec3<u32>": {
|
|
502
|
+
align: 16,
|
|
503
|
+
size: 12
|
|
504
|
+
},
|
|
505
|
+
"vec3<f32>": {
|
|
506
|
+
align: 16,
|
|
507
|
+
size: 12
|
|
508
|
+
},
|
|
509
|
+
"vec3<f16>": {
|
|
510
|
+
align: 8,
|
|
511
|
+
size: 6
|
|
512
|
+
},
|
|
513
|
+
"vec4<i32>": {
|
|
514
|
+
align: 16,
|
|
515
|
+
size: 16
|
|
516
|
+
},
|
|
517
|
+
"vec4<u32>": {
|
|
518
|
+
align: 16,
|
|
519
|
+
size: 16
|
|
520
|
+
},
|
|
521
|
+
"vec4<f32>": {
|
|
522
|
+
align: 16,
|
|
523
|
+
size: 16
|
|
524
|
+
},
|
|
525
|
+
"vec4<f16>": {
|
|
526
|
+
align: 8,
|
|
527
|
+
size: 8
|
|
528
|
+
},
|
|
529
|
+
"mat2x2<f32>": {
|
|
530
|
+
align: 8,
|
|
531
|
+
size: 16
|
|
532
|
+
},
|
|
533
|
+
"mat2x2<f16>": {
|
|
534
|
+
align: 4,
|
|
535
|
+
size: 8
|
|
536
|
+
},
|
|
537
|
+
"mat3x2<f32>": {
|
|
538
|
+
align: 8,
|
|
539
|
+
size: 24
|
|
540
|
+
},
|
|
541
|
+
"mat3x2<f16>": {
|
|
542
|
+
align: 4,
|
|
543
|
+
size: 12
|
|
544
|
+
},
|
|
545
|
+
"mat4x2<f32>": {
|
|
546
|
+
align: 8,
|
|
547
|
+
size: 32
|
|
548
|
+
},
|
|
549
|
+
"mat4x2<f16>": {
|
|
550
|
+
align: 4,
|
|
551
|
+
size: 16
|
|
552
|
+
},
|
|
553
|
+
"mat2x3<f32>": {
|
|
554
|
+
align: 16,
|
|
555
|
+
size: 32
|
|
556
|
+
},
|
|
557
|
+
"mat2x3<f16>": {
|
|
558
|
+
align: 8,
|
|
559
|
+
size: 16
|
|
560
|
+
},
|
|
561
|
+
"mat3x3<f32>": {
|
|
562
|
+
align: 16,
|
|
563
|
+
size: 48
|
|
564
|
+
},
|
|
565
|
+
"mat3x3<f16>": {
|
|
566
|
+
align: 8,
|
|
567
|
+
size: 24
|
|
568
|
+
},
|
|
569
|
+
"mat4x3<f32>": {
|
|
570
|
+
align: 16,
|
|
571
|
+
size: 64
|
|
572
|
+
},
|
|
573
|
+
"mat4x3<f16>": {
|
|
574
|
+
align: 8,
|
|
575
|
+
size: 32
|
|
576
|
+
},
|
|
577
|
+
"mat2x4<f32>": {
|
|
578
|
+
align: 16,
|
|
579
|
+
size: 32
|
|
580
|
+
},
|
|
581
|
+
"mat2x4<f16>": {
|
|
582
|
+
align: 8,
|
|
583
|
+
size: 16
|
|
584
|
+
},
|
|
585
|
+
"mat3x4<f32>": {
|
|
586
|
+
align: 16,
|
|
587
|
+
size: 48
|
|
588
|
+
},
|
|
589
|
+
"mat3x4<f16>": {
|
|
590
|
+
align: 8,
|
|
591
|
+
size: 24
|
|
592
|
+
},
|
|
593
|
+
"mat4x4<f32>": {
|
|
594
|
+
align: 16,
|
|
595
|
+
size: 64
|
|
596
|
+
},
|
|
597
|
+
"mat4x4<f16>": {
|
|
598
|
+
align: 8,
|
|
599
|
+
size: 32
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
function _e(e) {
|
|
603
|
+
let t = e.map((e) => ({
|
|
604
|
+
data: e,
|
|
605
|
+
offset: 0,
|
|
606
|
+
size: 0
|
|
607
|
+
})), n = 0;
|
|
608
|
+
for (let e = 0; e < t.length; e++) {
|
|
609
|
+
let r = t[e], i = I[r.data.type].size, a = I[r.data.type].align;
|
|
610
|
+
if (!I[r.data.type]) throw Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${r.data.type}`);
|
|
611
|
+
r.data.size > 1 && (i = Math.max(i, a) * r.data.size), n = Math.ceil(n / a) * a, r.size = i, r.offset = n, n += i;
|
|
612
|
+
}
|
|
613
|
+
return n = Math.ceil(n / 16) * 16, {
|
|
614
|
+
uboElements: t,
|
|
615
|
+
size: n
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/generateArraySyncWGSL.mjs
|
|
620
|
+
function ve(e, t) {
|
|
621
|
+
let { size: n, align: r } = I[e.data.type], i = (r - n) / 4, a = e.data.type.indexOf("i32") >= 0 ? "dataInt32" : "data";
|
|
622
|
+
return `
|
|
623
|
+
v = uv.${e.data.name};
|
|
624
|
+
${t === 0 ? "" : `offset += ${t};`}
|
|
625
|
+
|
|
626
|
+
arrayOffset = offset;
|
|
627
|
+
|
|
628
|
+
t = 0;
|
|
629
|
+
|
|
630
|
+
for(var i=0; i < ${e.data.size * (n / 4)}; i++)
|
|
631
|
+
{
|
|
632
|
+
for(var j = 0; j < ${n / 4}; j++)
|
|
633
|
+
{
|
|
634
|
+
${a}[arrayOffset++] = v[t++];
|
|
635
|
+
}
|
|
636
|
+
${i === 0 ? "" : `arrayOffset += ${i};`}
|
|
637
|
+
}
|
|
638
|
+
`;
|
|
639
|
+
}
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/createUboSyncFunctionWGSL.mjs
|
|
642
|
+
function ye(e) {
|
|
643
|
+
return le(e, "uboWgsl", ve, pe);
|
|
644
|
+
}
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/GpuUboSystem.mjs
|
|
647
|
+
var L = class extends de {
|
|
648
|
+
constructor() {
|
|
649
|
+
super({
|
|
650
|
+
createUboElements: _e,
|
|
651
|
+
generateUboSync: ye
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
L.extension = {
|
|
656
|
+
type: [h.WebGPUSystem],
|
|
657
|
+
name: "ubo"
|
|
658
|
+
};
|
|
659
|
+
//#endregion
|
|
660
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/buffer/UboBatch.mjs
|
|
661
|
+
var be = class {
|
|
662
|
+
constructor({ minUniformOffsetAlignment: e }) {
|
|
663
|
+
this._minUniformOffsetAlignment = 256, this.byteIndex = 0, this._minUniformOffsetAlignment = e, this.data = /* @__PURE__ */ new Float32Array(65535);
|
|
664
|
+
}
|
|
665
|
+
clear() {
|
|
666
|
+
this.byteIndex = 0;
|
|
667
|
+
}
|
|
668
|
+
addEmptyGroup(e) {
|
|
669
|
+
if (e > this._minUniformOffsetAlignment / 4) throw Error(`UniformBufferBatch: array is too large: ${e * 4}`);
|
|
670
|
+
let t = this.byteIndex, n = t + e * 4;
|
|
671
|
+
if (n = Math.ceil(n / this._minUniformOffsetAlignment) * this._minUniformOffsetAlignment, n > this.data.length * 4) throw Error("UniformBufferBatch: ubo batch got too big");
|
|
672
|
+
return this.byteIndex = n, t;
|
|
673
|
+
}
|
|
674
|
+
addGroup(e) {
|
|
675
|
+
let t = this.addEmptyGroup(e.length);
|
|
676
|
+
for (let n = 0; n < e.length; n++) this.data[t / 4 + n] = e[n];
|
|
677
|
+
return t;
|
|
678
|
+
}
|
|
679
|
+
destroy() {
|
|
680
|
+
this.data = null;
|
|
681
|
+
}
|
|
682
|
+
}, R = 128, z = class {
|
|
683
|
+
constructor(e) {
|
|
684
|
+
this._bindGroupHash = /* @__PURE__ */ Object.create(null), this._buffers = [], this._bindGroups = [], this._bufferResources = [], this._renderer = e, this._batchBuffer = new be({ minUniformOffsetAlignment: R });
|
|
685
|
+
let t = 256 / R;
|
|
686
|
+
for (let e = 0; e < t; e++) {
|
|
687
|
+
let t = m.UNIFORM | m.COPY_DST;
|
|
688
|
+
e === 0 && (t |= m.COPY_SRC), this._buffers.push(new f({
|
|
689
|
+
data: this._batchBuffer.data,
|
|
690
|
+
usage: t
|
|
691
|
+
}));
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
renderEnd() {
|
|
695
|
+
this._uploadBindGroups(), this._resetBindGroups();
|
|
696
|
+
}
|
|
697
|
+
_resetBindGroups() {
|
|
698
|
+
this._bindGroupHash = /* @__PURE__ */ Object.create(null), this._batchBuffer.clear();
|
|
699
|
+
}
|
|
700
|
+
getUniformBindGroup(e, t) {
|
|
701
|
+
if (!t && this._bindGroupHash[e.uid]) return this._bindGroupHash[e.uid];
|
|
702
|
+
this._renderer.ubo.ensureUniformGroup(e);
|
|
703
|
+
let n = e.buffer.data, r = this._batchBuffer.addEmptyGroup(n.length);
|
|
704
|
+
return this._renderer.ubo.syncUniformGroup(e, this._batchBuffer.data, r / 4), this._bindGroupHash[e.uid] = this._getBindGroup(r / R), this._bindGroupHash[e.uid];
|
|
705
|
+
}
|
|
706
|
+
getUboResource(e) {
|
|
707
|
+
this._renderer.ubo.updateUniformGroup(e);
|
|
708
|
+
let t = e.buffer.data, n = this._batchBuffer.addGroup(t);
|
|
709
|
+
return this._getBufferResource(n / R);
|
|
710
|
+
}
|
|
711
|
+
getArrayBindGroup(e) {
|
|
712
|
+
let t = this._batchBuffer.addGroup(e);
|
|
713
|
+
return this._getBindGroup(t / R);
|
|
714
|
+
}
|
|
715
|
+
getArrayBufferResource(e) {
|
|
716
|
+
let t = this._batchBuffer.addGroup(e) / R;
|
|
717
|
+
return this._getBufferResource(t);
|
|
718
|
+
}
|
|
719
|
+
_getBufferResource(e) {
|
|
720
|
+
if (!this._bufferResources[e]) {
|
|
721
|
+
let t = this._buffers[e % 2];
|
|
722
|
+
this._bufferResources[e] = new he({
|
|
723
|
+
buffer: t,
|
|
724
|
+
offset: (e / 2 | 0) * 256,
|
|
725
|
+
size: R
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
return this._bufferResources[e];
|
|
729
|
+
}
|
|
730
|
+
_getBindGroup(e) {
|
|
731
|
+
if (!this._bindGroups[e]) {
|
|
732
|
+
let t = new u({ 0: this._getBufferResource(e) });
|
|
733
|
+
this._bindGroups[e] = t;
|
|
734
|
+
}
|
|
735
|
+
return this._bindGroups[e];
|
|
736
|
+
}
|
|
737
|
+
_uploadBindGroups() {
|
|
738
|
+
let e = this._renderer.buffer, t = this._buffers[0];
|
|
739
|
+
t.update(this._batchBuffer.byteIndex), e.updateBuffer(t);
|
|
740
|
+
let n = this._renderer.gpu.device.createCommandEncoder();
|
|
741
|
+
for (let r = 1; r < this._buffers.length; r++) {
|
|
742
|
+
let i = this._buffers[r];
|
|
743
|
+
n.copyBufferToBuffer(e.getGPUBuffer(t), R, e.getGPUBuffer(i), 0, this._batchBuffer.byteIndex);
|
|
744
|
+
}
|
|
745
|
+
this._renderer.gpu.device.queue.submit([n.finish()]);
|
|
746
|
+
}
|
|
747
|
+
destroy() {
|
|
748
|
+
for (let e = 0; e < this._bindGroups.length; e++) this._bindGroups[e]?.destroy();
|
|
749
|
+
this._bindGroups = null, this._bindGroupHash = null;
|
|
750
|
+
for (let e = 0; e < this._buffers.length; e++) this._buffers[e].destroy();
|
|
751
|
+
this._buffers = null;
|
|
752
|
+
for (let e = 0; e < this._bufferResources.length; e++) this._bufferResources[e].destroy();
|
|
753
|
+
this._bufferResources = null, this._batchBuffer.destroy(), this._renderer = null;
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
z.extension = {
|
|
757
|
+
type: [h.WebGPUPipes],
|
|
758
|
+
name: "uniformBatch"
|
|
759
|
+
};
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.mjs
|
|
762
|
+
var xe = {
|
|
763
|
+
"point-list": 0,
|
|
764
|
+
"line-list": 1,
|
|
765
|
+
"line-strip": 2,
|
|
766
|
+
"triangle-list": 3,
|
|
767
|
+
"triangle-strip": 4
|
|
768
|
+
};
|
|
769
|
+
function B(e, t, n, r, i) {
|
|
770
|
+
return e << 24 | t << 16 | n << 10 | r << 5 | i;
|
|
771
|
+
}
|
|
772
|
+
function Se(e, t, n, r, i) {
|
|
773
|
+
return n << 8 | e << 5 | r << 3 | i << 1 | t;
|
|
774
|
+
}
|
|
775
|
+
var V = class {
|
|
776
|
+
constructor(e) {
|
|
777
|
+
this._moduleCache = /* @__PURE__ */ Object.create(null), this._bufferLayoutsCache = /* @__PURE__ */ Object.create(null), this._bindingNamesCache = /* @__PURE__ */ Object.create(null), this._pipeCache = /* @__PURE__ */ Object.create(null), this._pipeStateCaches = /* @__PURE__ */ Object.create(null), this._colorMask = 15, this._multisampleCount = 1, this._colorTargetCount = 1, this._renderer = e;
|
|
778
|
+
}
|
|
779
|
+
contextChange(e) {
|
|
780
|
+
this._gpu = e, this.setStencilMode(b.DISABLED), this._updatePipeHash();
|
|
781
|
+
}
|
|
782
|
+
setMultisampleCount(e) {
|
|
783
|
+
this._multisampleCount !== e && (this._multisampleCount = e, this._updatePipeHash());
|
|
784
|
+
}
|
|
785
|
+
setRenderTarget(e) {
|
|
786
|
+
this._multisampleCount = e.msaaSamples, this._depthStencilAttachment = +!!e.descriptor.depthStencilAttachment, this._colorTargetCount = e.colorTargetCount, this._updatePipeHash();
|
|
787
|
+
}
|
|
788
|
+
setColorMask(e) {
|
|
789
|
+
this._colorMask !== e && (this._colorMask = e, this._updatePipeHash());
|
|
790
|
+
}
|
|
791
|
+
setStencilMode(e) {
|
|
792
|
+
this._stencilMode !== e && (this._stencilMode = e, this._stencilState = me[e], this._updatePipeHash());
|
|
793
|
+
}
|
|
794
|
+
setPipeline(e, t, n, r) {
|
|
795
|
+
let i = this.getPipeline(e, t, n);
|
|
796
|
+
r.setPipeline(i);
|
|
797
|
+
}
|
|
798
|
+
getPipeline(e, t, n, r) {
|
|
799
|
+
e._layoutKey || (se(e, t.attributeData), this._generateBufferKey(e)), r ||= e.topology;
|
|
800
|
+
let i = B(e._layoutKey, t._layoutKey, n.data, n._blendModeId, xe[r]);
|
|
801
|
+
return this._pipeCache[i] || (this._pipeCache[i] = this._createPipeline(e, t, n, r)), this._pipeCache[i];
|
|
802
|
+
}
|
|
803
|
+
_createPipeline(e, t, n, r) {
|
|
804
|
+
let i = this._gpu.device, a = this._createVertexBufferLayouts(e, t), o = this._renderer.state.getColorTargets(n, this._colorTargetCount), s = this._stencilMode === b.RENDERING_MASK_ADD ? 0 : this._colorMask;
|
|
805
|
+
for (let e = 0; e < o.length; e++) o[e].writeMask = s;
|
|
806
|
+
let c = this._renderer.shader.getProgramData(t).pipeline, l = {
|
|
807
|
+
vertex: {
|
|
808
|
+
module: this._getModule(t.vertex.source),
|
|
809
|
+
entryPoint: t.vertex.entryPoint,
|
|
810
|
+
buffers: a
|
|
811
|
+
},
|
|
812
|
+
fragment: {
|
|
813
|
+
module: this._getModule(t.fragment.source),
|
|
814
|
+
entryPoint: t.fragment.entryPoint,
|
|
815
|
+
targets: o
|
|
816
|
+
},
|
|
817
|
+
primitive: {
|
|
818
|
+
topology: r,
|
|
819
|
+
cullMode: n.cullMode
|
|
820
|
+
},
|
|
821
|
+
layout: c,
|
|
822
|
+
multisample: { count: this._multisampleCount },
|
|
823
|
+
label: "PIXI Pipeline"
|
|
824
|
+
};
|
|
825
|
+
return this._depthStencilAttachment && (l.depthStencil = {
|
|
826
|
+
...this._stencilState,
|
|
827
|
+
format: "depth24plus-stencil8",
|
|
828
|
+
depthWriteEnabled: n.depthTest,
|
|
829
|
+
depthCompare: n.depthTest ? "less" : "always"
|
|
830
|
+
}), i.createRenderPipeline(l);
|
|
831
|
+
}
|
|
832
|
+
_getModule(e) {
|
|
833
|
+
return this._moduleCache[e] || this._createModule(e);
|
|
834
|
+
}
|
|
835
|
+
_createModule(e) {
|
|
836
|
+
let t = this._gpu.device;
|
|
837
|
+
return this._moduleCache[e] = t.createShaderModule({ code: e }), this._moduleCache[e];
|
|
838
|
+
}
|
|
839
|
+
_generateBufferKey(e) {
|
|
840
|
+
let t = [], n = 0, r = Object.keys(e.attributes).sort();
|
|
841
|
+
for (let i = 0; i < r.length; i++) {
|
|
842
|
+
let a = e.attributes[r[i]];
|
|
843
|
+
t[n++] = a.offset, t[n++] = a.format, t[n++] = a.stride, t[n++] = a.instance;
|
|
844
|
+
}
|
|
845
|
+
let i = t.join("|");
|
|
846
|
+
return e._layoutKey = d(i, "geometry"), e._layoutKey;
|
|
847
|
+
}
|
|
848
|
+
_generateAttributeLocationsKey(e) {
|
|
849
|
+
let t = [], n = 0, r = Object.keys(e.attributeData).sort();
|
|
850
|
+
for (let i = 0; i < r.length; i++) {
|
|
851
|
+
let a = e.attributeData[r[i]];
|
|
852
|
+
t[n++] = a.location;
|
|
853
|
+
}
|
|
854
|
+
let i = t.join("|");
|
|
855
|
+
return e._attributeLocationsKey = d(i, "programAttributes"), e._attributeLocationsKey;
|
|
856
|
+
}
|
|
857
|
+
getBufferNamesToBind(e, t) {
|
|
858
|
+
let n = e._layoutKey << 16 | t._attributeLocationsKey;
|
|
859
|
+
if (this._bindingNamesCache[n]) return this._bindingNamesCache[n];
|
|
860
|
+
let r = this._createVertexBufferLayouts(e, t), i = /* @__PURE__ */ Object.create(null), a = t.attributeData;
|
|
861
|
+
for (let e = 0; e < r.length; e++) {
|
|
862
|
+
let t = Object.values(r[e].attributes)[0].shaderLocation;
|
|
863
|
+
for (let n in a) if (a[n].location === t) {
|
|
864
|
+
i[e] = n;
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return this._bindingNamesCache[n] = i, i;
|
|
869
|
+
}
|
|
870
|
+
_createVertexBufferLayouts(e, n) {
|
|
871
|
+
n._attributeLocationsKey || this._generateAttributeLocationsKey(n);
|
|
872
|
+
let r = e._layoutKey << 16 | n._attributeLocationsKey;
|
|
873
|
+
if (this._bufferLayoutsCache[r]) return this._bufferLayoutsCache[r];
|
|
874
|
+
let i = [];
|
|
875
|
+
return e.buffers.forEach((r) => {
|
|
876
|
+
let a = {
|
|
877
|
+
arrayStride: 0,
|
|
878
|
+
stepMode: "vertex",
|
|
879
|
+
attributes: []
|
|
880
|
+
}, o = a.attributes;
|
|
881
|
+
for (let i in n.attributeData) {
|
|
882
|
+
let s = e.attributes[i];
|
|
883
|
+
(s.divisor ?? 1) !== 1 && t(`Attribute ${i} has an invalid divisor value of '${s.divisor}'. WebGPU only supports a divisor value of 1`), s.buffer === r && (a.arrayStride = s.stride, a.stepMode = s.instance ? "instance" : "vertex", o.push({
|
|
884
|
+
shaderLocation: n.attributeData[i].location,
|
|
885
|
+
offset: s.offset,
|
|
886
|
+
format: s.format
|
|
887
|
+
}));
|
|
888
|
+
}
|
|
889
|
+
o.length && i.push(a);
|
|
890
|
+
}), this._bufferLayoutsCache[r] = i, i;
|
|
891
|
+
}
|
|
892
|
+
_updatePipeHash() {
|
|
893
|
+
let e = Se(this._stencilMode, this._multisampleCount, this._colorMask, this._depthStencilAttachment, this._colorTargetCount);
|
|
894
|
+
this._pipeStateCaches[e] || (this._pipeStateCaches[e] = /* @__PURE__ */ Object.create(null)), this._pipeCache = this._pipeStateCaches[e];
|
|
895
|
+
}
|
|
896
|
+
destroy() {
|
|
897
|
+
this._renderer = null, this._bufferLayoutsCache = null;
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
V.extension = {
|
|
901
|
+
type: [h.WebGPUSystem],
|
|
902
|
+
name: "pipeline"
|
|
903
|
+
};
|
|
904
|
+
//#endregion
|
|
905
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/renderTarget/GpuRenderTarget.mjs
|
|
906
|
+
var Ce = class {
|
|
907
|
+
constructor() {
|
|
908
|
+
this.contexts = [], this.msaaTextures = [], this.msaaSamples = 1;
|
|
909
|
+
}
|
|
910
|
+
}, we = class {
|
|
911
|
+
init(e, t) {
|
|
912
|
+
this._renderer = e, this._renderTargetSystem = t;
|
|
913
|
+
}
|
|
914
|
+
copyToTexture(e, t, n, r, i) {
|
|
915
|
+
let a = this._renderer, o = this._getGpuColorTexture(e), s = a.texture.getGpuSource(t.source);
|
|
916
|
+
return a.encoder.commandEncoder.copyTextureToTexture({
|
|
917
|
+
texture: o,
|
|
918
|
+
origin: n
|
|
919
|
+
}, {
|
|
920
|
+
texture: s,
|
|
921
|
+
origin: i
|
|
922
|
+
}, r), t;
|
|
923
|
+
}
|
|
924
|
+
startRenderPass(e, t = !0, n, r, i = 0, a = 0) {
|
|
925
|
+
let o = this._renderTargetSystem.getGpuRenderTarget(e);
|
|
926
|
+
if (a !== 0 && o.msaaTextures?.length) throw Error("[RenderTargetSystem] Rendering to array layers is not supported with MSAA render targets.");
|
|
927
|
+
if (i > 0 && o.msaaTextures?.length) throw Error("[RenderTargetSystem] Rendering to mip levels is not supported with MSAA render targets.");
|
|
928
|
+
o.descriptor = this.getDescriptor(e, t, n, i, a), this._renderer.pipeline.setRenderTarget(o), this._renderer.encoder.beginRenderPass(o), this._renderer.encoder.setViewport(r);
|
|
929
|
+
}
|
|
930
|
+
finishRenderPass() {
|
|
931
|
+
this._renderer.encoder.endRenderPass();
|
|
932
|
+
}
|
|
933
|
+
_getGpuColorTexture(e) {
|
|
934
|
+
let t = this._renderTargetSystem.getGpuRenderTarget(e);
|
|
935
|
+
return t.contexts[0] ? t.contexts[0].getCurrentTexture() : this._renderer.texture.getGpuSource(e.colorTextures[0].source);
|
|
936
|
+
}
|
|
937
|
+
getDescriptor(e, t, n, r = 0, i = 0) {
|
|
938
|
+
typeof t == "boolean" && (t = t ? C.ALL : C.NONE);
|
|
939
|
+
let a = this._renderTargetSystem, o = a.getGpuRenderTarget(e), s = e.colorTextures.map((e, s) => {
|
|
940
|
+
let c = o.contexts[s], l, u;
|
|
941
|
+
if (c) {
|
|
942
|
+
if (i !== 0) throw Error("[RenderTargetSystem] Rendering to array layers is not supported for canvas targets.");
|
|
943
|
+
l = c.getCurrentTexture().createView();
|
|
944
|
+
} else l = this._renderer.texture.getGpuSource(e).createView({
|
|
945
|
+
dimension: "2d",
|
|
946
|
+
baseMipLevel: r,
|
|
947
|
+
mipLevelCount: 1,
|
|
948
|
+
baseArrayLayer: i,
|
|
949
|
+
arrayLayerCount: 1
|
|
950
|
+
});
|
|
951
|
+
let d = !1;
|
|
952
|
+
o.msaaTextures[s] && (u = l, l = this._renderer.texture.getTextureView(o.msaaTextures[s]), d = o.msaaTextures[s].transient);
|
|
953
|
+
let f = t & C.COLOR ? "clear" : "load";
|
|
954
|
+
return n ??= a.defaultClearColor, {
|
|
955
|
+
view: l,
|
|
956
|
+
resolveTarget: u,
|
|
957
|
+
clearValue: n,
|
|
958
|
+
storeOp: d ? "discard" : "store",
|
|
959
|
+
loadOp: f
|
|
960
|
+
};
|
|
961
|
+
}), c;
|
|
962
|
+
if ((e.stencil || e.depth) && !e.depthStencilTexture && (e.ensureDepthStencilTexture(), e.depthStencilTexture.source.sampleCount = o.msaa ? 4 : 1, e.depthStencilTexture.source.transient = !!o.msaaTextures[0]?.transient), e.depthStencilTexture) {
|
|
963
|
+
let n = t & C.STENCIL ? "clear" : "load", a = t & C.DEPTH ? "clear" : "load", o = e.depthStencilTexture.source.transient ? "discard" : "store";
|
|
964
|
+
c = {
|
|
965
|
+
view: this._renderer.texture.getGpuSource(e.depthStencilTexture.source).createView({
|
|
966
|
+
dimension: "2d",
|
|
967
|
+
baseMipLevel: r,
|
|
968
|
+
mipLevelCount: 1,
|
|
969
|
+
baseArrayLayer: i,
|
|
970
|
+
arrayLayerCount: 1
|
|
971
|
+
}),
|
|
972
|
+
stencilStoreOp: o,
|
|
973
|
+
stencilLoadOp: n,
|
|
974
|
+
depthClearValue: 1,
|
|
975
|
+
depthLoadOp: a,
|
|
976
|
+
depthStoreOp: o
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
return {
|
|
980
|
+
colorAttachments: s,
|
|
981
|
+
depthStencilAttachment: c
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
clear(e, t = !0, n, r, i = 0, a = 0) {
|
|
985
|
+
if (!t) return;
|
|
986
|
+
let { gpu: o, encoder: s } = this._renderer, c = o.device;
|
|
987
|
+
if (s.commandEncoder === null) {
|
|
988
|
+
let o = c.createCommandEncoder(), s = this.getDescriptor(e, t, n, i, a), l = o.beginRenderPass(s);
|
|
989
|
+
l.setViewport(r.x, r.y, r.width, r.height, 0, 1), l.end();
|
|
990
|
+
let u = o.finish();
|
|
991
|
+
c.queue.submit([u]);
|
|
992
|
+
} else this.startRenderPass(e, t, n, r, i, a);
|
|
993
|
+
}
|
|
994
|
+
initGpuRenderTarget(e) {
|
|
995
|
+
e.isRoot = !0;
|
|
996
|
+
let t = new Ce();
|
|
997
|
+
return t.colorTargetCount = e.colorTextures.length, e.colorTextures.forEach((e, r) => {
|
|
998
|
+
if (e instanceof c) {
|
|
999
|
+
let n = e.resource.getContext("webgpu"), i = e.transparent ? "premultiplied" : "opaque";
|
|
1000
|
+
try {
|
|
1001
|
+
n.configure({
|
|
1002
|
+
device: this._renderer.gpu.device,
|
|
1003
|
+
usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,
|
|
1004
|
+
format: "bgra8unorm",
|
|
1005
|
+
alphaMode: i
|
|
1006
|
+
});
|
|
1007
|
+
} catch (e) {
|
|
1008
|
+
console.error(e);
|
|
1009
|
+
}
|
|
1010
|
+
t.contexts[r] = n;
|
|
1011
|
+
}
|
|
1012
|
+
if (t.msaa = e.source.antialias, e.source.antialias) {
|
|
1013
|
+
let i = new n({
|
|
1014
|
+
width: 0,
|
|
1015
|
+
height: 0,
|
|
1016
|
+
sampleCount: 4,
|
|
1017
|
+
transient: e.source.transient,
|
|
1018
|
+
arrayLayerCount: e.source.arrayLayerCount
|
|
1019
|
+
});
|
|
1020
|
+
t.msaaTextures[r] = i;
|
|
1021
|
+
}
|
|
1022
|
+
}), t.msaa && (t.msaaSamples = 4, e.depthStencilTexture && (e.depthStencilTexture.source.sampleCount = 4, e.depthStencilTexture.source.transient = !!t.msaaTextures[0]?.transient)), t;
|
|
1023
|
+
}
|
|
1024
|
+
destroyGpuRenderTarget(e) {
|
|
1025
|
+
e.contexts.forEach((e) => {
|
|
1026
|
+
e.unconfigure();
|
|
1027
|
+
}), e.msaaTextures.forEach((e) => {
|
|
1028
|
+
e.destroy();
|
|
1029
|
+
}), e.msaaTextures.length = 0, e.contexts.length = 0;
|
|
1030
|
+
}
|
|
1031
|
+
ensureDepthStencilTexture(e) {
|
|
1032
|
+
let t = this._renderTargetSystem.getGpuRenderTarget(e);
|
|
1033
|
+
e.depthStencilTexture && t.msaa && (e.depthStencilTexture.source.sampleCount = 4);
|
|
1034
|
+
}
|
|
1035
|
+
resizeGpuRenderTarget(e) {
|
|
1036
|
+
let t = this._renderTargetSystem.getGpuRenderTarget(e);
|
|
1037
|
+
t.width = e.width, t.height = e.height, t.msaa && e.colorTextures.forEach((e, n) => {
|
|
1038
|
+
t.msaaTextures[n]?.resize(e.source.width, e.source.height, e.source._resolution);
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
}, H = class extends ae {
|
|
1042
|
+
constructor(e) {
|
|
1043
|
+
super(e), this.adaptor = new we(), this.adaptor.init(e, this);
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
H.extension = {
|
|
1047
|
+
type: [h.WebGPUSystem],
|
|
1048
|
+
name: "renderTarget"
|
|
1049
|
+
};
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/GpuShaderSystem.mjs
|
|
1052
|
+
var U = class {
|
|
1053
|
+
constructor() {
|
|
1054
|
+
this._gpuProgramData = /* @__PURE__ */ Object.create(null);
|
|
1055
|
+
}
|
|
1056
|
+
contextChange(e) {
|
|
1057
|
+
this._gpu = e;
|
|
1058
|
+
}
|
|
1059
|
+
getProgramData(e) {
|
|
1060
|
+
return this._gpuProgramData[e._layoutKey] || this._createGPUProgramData(e);
|
|
1061
|
+
}
|
|
1062
|
+
_createGPUProgramData(e) {
|
|
1063
|
+
let t = this._gpu.device, n = e.gpuLayout.map((e) => t.createBindGroupLayout({ entries: e })), r = { bindGroupLayouts: n };
|
|
1064
|
+
return this._gpuProgramData[e._layoutKey] = {
|
|
1065
|
+
bindGroups: n,
|
|
1066
|
+
pipeline: t.createPipelineLayout(r)
|
|
1067
|
+
}, this._gpuProgramData[e._layoutKey];
|
|
1068
|
+
}
|
|
1069
|
+
destroy() {
|
|
1070
|
+
this._gpu = null, this._gpuProgramData = null;
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
U.extension = {
|
|
1074
|
+
type: [h.WebGPUSystem],
|
|
1075
|
+
name: "shader"
|
|
1076
|
+
};
|
|
1077
|
+
//#endregion
|
|
1078
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuBlendModesToPixi.mjs
|
|
1079
|
+
var W = {};
|
|
1080
|
+
W.normal = {
|
|
1081
|
+
alpha: {
|
|
1082
|
+
srcFactor: "one",
|
|
1083
|
+
dstFactor: "one-minus-src-alpha",
|
|
1084
|
+
operation: "add"
|
|
1085
|
+
},
|
|
1086
|
+
color: {
|
|
1087
|
+
srcFactor: "one",
|
|
1088
|
+
dstFactor: "one-minus-src-alpha",
|
|
1089
|
+
operation: "add"
|
|
1090
|
+
}
|
|
1091
|
+
}, W.add = {
|
|
1092
|
+
alpha: {
|
|
1093
|
+
srcFactor: "src-alpha",
|
|
1094
|
+
dstFactor: "one-minus-src-alpha",
|
|
1095
|
+
operation: "add"
|
|
1096
|
+
},
|
|
1097
|
+
color: {
|
|
1098
|
+
srcFactor: "one",
|
|
1099
|
+
dstFactor: "one",
|
|
1100
|
+
operation: "add"
|
|
1101
|
+
}
|
|
1102
|
+
}, W.multiply = {
|
|
1103
|
+
alpha: {
|
|
1104
|
+
srcFactor: "one",
|
|
1105
|
+
dstFactor: "one-minus-src-alpha",
|
|
1106
|
+
operation: "add"
|
|
1107
|
+
},
|
|
1108
|
+
color: {
|
|
1109
|
+
srcFactor: "dst",
|
|
1110
|
+
dstFactor: "one-minus-src-alpha",
|
|
1111
|
+
operation: "add"
|
|
1112
|
+
}
|
|
1113
|
+
}, W.screen = {
|
|
1114
|
+
alpha: {
|
|
1115
|
+
srcFactor: "one",
|
|
1116
|
+
dstFactor: "one-minus-src-alpha",
|
|
1117
|
+
operation: "add"
|
|
1118
|
+
},
|
|
1119
|
+
color: {
|
|
1120
|
+
srcFactor: "one",
|
|
1121
|
+
dstFactor: "one-minus-src",
|
|
1122
|
+
operation: "add"
|
|
1123
|
+
}
|
|
1124
|
+
}, W.overlay = {
|
|
1125
|
+
alpha: {
|
|
1126
|
+
srcFactor: "one",
|
|
1127
|
+
dstFactor: "one-minus-src-alpha",
|
|
1128
|
+
operation: "add"
|
|
1129
|
+
},
|
|
1130
|
+
color: {
|
|
1131
|
+
srcFactor: "one",
|
|
1132
|
+
dstFactor: "one-minus-src",
|
|
1133
|
+
operation: "add"
|
|
1134
|
+
}
|
|
1135
|
+
}, W.none = {
|
|
1136
|
+
alpha: {
|
|
1137
|
+
srcFactor: "one",
|
|
1138
|
+
dstFactor: "one-minus-src-alpha",
|
|
1139
|
+
operation: "add"
|
|
1140
|
+
},
|
|
1141
|
+
color: {
|
|
1142
|
+
srcFactor: "zero",
|
|
1143
|
+
dstFactor: "zero",
|
|
1144
|
+
operation: "add"
|
|
1145
|
+
}
|
|
1146
|
+
}, W["normal-npm"] = {
|
|
1147
|
+
alpha: {
|
|
1148
|
+
srcFactor: "one",
|
|
1149
|
+
dstFactor: "one-minus-src-alpha",
|
|
1150
|
+
operation: "add"
|
|
1151
|
+
},
|
|
1152
|
+
color: {
|
|
1153
|
+
srcFactor: "src-alpha",
|
|
1154
|
+
dstFactor: "one-minus-src-alpha",
|
|
1155
|
+
operation: "add"
|
|
1156
|
+
}
|
|
1157
|
+
}, W["add-npm"] = {
|
|
1158
|
+
alpha: {
|
|
1159
|
+
srcFactor: "one",
|
|
1160
|
+
dstFactor: "one",
|
|
1161
|
+
operation: "add"
|
|
1162
|
+
},
|
|
1163
|
+
color: {
|
|
1164
|
+
srcFactor: "src-alpha",
|
|
1165
|
+
dstFactor: "one",
|
|
1166
|
+
operation: "add"
|
|
1167
|
+
}
|
|
1168
|
+
}, W["screen-npm"] = {
|
|
1169
|
+
alpha: {
|
|
1170
|
+
srcFactor: "one",
|
|
1171
|
+
dstFactor: "one-minus-src-alpha",
|
|
1172
|
+
operation: "add"
|
|
1173
|
+
},
|
|
1174
|
+
color: {
|
|
1175
|
+
srcFactor: "src-alpha",
|
|
1176
|
+
dstFactor: "one-minus-src",
|
|
1177
|
+
operation: "add"
|
|
1178
|
+
}
|
|
1179
|
+
}, W.erase = {
|
|
1180
|
+
alpha: {
|
|
1181
|
+
srcFactor: "zero",
|
|
1182
|
+
dstFactor: "one-minus-src-alpha",
|
|
1183
|
+
operation: "add"
|
|
1184
|
+
},
|
|
1185
|
+
color: {
|
|
1186
|
+
srcFactor: "zero",
|
|
1187
|
+
dstFactor: "one-minus-src",
|
|
1188
|
+
operation: "add"
|
|
1189
|
+
}
|
|
1190
|
+
}, W.min = {
|
|
1191
|
+
alpha: {
|
|
1192
|
+
srcFactor: "one",
|
|
1193
|
+
dstFactor: "one",
|
|
1194
|
+
operation: "min"
|
|
1195
|
+
},
|
|
1196
|
+
color: {
|
|
1197
|
+
srcFactor: "one",
|
|
1198
|
+
dstFactor: "one",
|
|
1199
|
+
operation: "min"
|
|
1200
|
+
}
|
|
1201
|
+
}, W.max = {
|
|
1202
|
+
alpha: {
|
|
1203
|
+
srcFactor: "one",
|
|
1204
|
+
dstFactor: "one",
|
|
1205
|
+
operation: "max"
|
|
1206
|
+
},
|
|
1207
|
+
color: {
|
|
1208
|
+
srcFactor: "one",
|
|
1209
|
+
dstFactor: "one",
|
|
1210
|
+
operation: "max"
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
//#endregion
|
|
1214
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/state/GpuStateSystem.mjs
|
|
1215
|
+
var G = class {
|
|
1216
|
+
constructor() {
|
|
1217
|
+
this.defaultState = new o(), this.defaultState.blend = !0;
|
|
1218
|
+
}
|
|
1219
|
+
contextChange(e) {
|
|
1220
|
+
this.gpu = e;
|
|
1221
|
+
}
|
|
1222
|
+
getColorTargets(e, t) {
|
|
1223
|
+
let n = W[e.blendMode] || W.normal, r = [], i = {
|
|
1224
|
+
format: "bgra8unorm",
|
|
1225
|
+
writeMask: 0,
|
|
1226
|
+
blend: n
|
|
1227
|
+
};
|
|
1228
|
+
for (let e = 0; e < t; e++) r[e] = i;
|
|
1229
|
+
return r;
|
|
1230
|
+
}
|
|
1231
|
+
destroy() {
|
|
1232
|
+
this.gpu = null;
|
|
1233
|
+
}
|
|
1234
|
+
};
|
|
1235
|
+
G.extension = {
|
|
1236
|
+
type: [h.WebGPUSystem],
|
|
1237
|
+
name: "state"
|
|
1238
|
+
};
|
|
1239
|
+
//#endregion
|
|
1240
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadBufferImageResource.mjs
|
|
1241
|
+
var Te = {
|
|
1242
|
+
type: "image",
|
|
1243
|
+
upload(e, t, n, r = 0) {
|
|
1244
|
+
let i = e.resource, a = (e.pixelWidth | 0) * (e.pixelHeight | 0), o = i.byteLength / a;
|
|
1245
|
+
n.device.queue.writeTexture({
|
|
1246
|
+
texture: t,
|
|
1247
|
+
origin: {
|
|
1248
|
+
x: 0,
|
|
1249
|
+
y: 0,
|
|
1250
|
+
z: r
|
|
1251
|
+
}
|
|
1252
|
+
}, i, {
|
|
1253
|
+
offset: 0,
|
|
1254
|
+
rowsPerImage: e.pixelHeight,
|
|
1255
|
+
bytesPerRow: e.pixelWidth * o
|
|
1256
|
+
}, {
|
|
1257
|
+
width: e.pixelWidth,
|
|
1258
|
+
height: e.pixelHeight,
|
|
1259
|
+
depthOrArrayLayers: 1
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
}, K = {
|
|
1263
|
+
"bc1-rgba-unorm": {
|
|
1264
|
+
blockBytes: 8,
|
|
1265
|
+
blockWidth: 4,
|
|
1266
|
+
blockHeight: 4
|
|
1267
|
+
},
|
|
1268
|
+
"bc2-rgba-unorm": {
|
|
1269
|
+
blockBytes: 16,
|
|
1270
|
+
blockWidth: 4,
|
|
1271
|
+
blockHeight: 4
|
|
1272
|
+
},
|
|
1273
|
+
"bc3-rgba-unorm": {
|
|
1274
|
+
blockBytes: 16,
|
|
1275
|
+
blockWidth: 4,
|
|
1276
|
+
blockHeight: 4
|
|
1277
|
+
},
|
|
1278
|
+
"bc7-rgba-unorm": {
|
|
1279
|
+
blockBytes: 16,
|
|
1280
|
+
blockWidth: 4,
|
|
1281
|
+
blockHeight: 4
|
|
1282
|
+
},
|
|
1283
|
+
"etc1-rgb-unorm": {
|
|
1284
|
+
blockBytes: 8,
|
|
1285
|
+
blockWidth: 4,
|
|
1286
|
+
blockHeight: 4
|
|
1287
|
+
},
|
|
1288
|
+
"etc2-rgba8unorm": {
|
|
1289
|
+
blockBytes: 16,
|
|
1290
|
+
blockWidth: 4,
|
|
1291
|
+
blockHeight: 4
|
|
1292
|
+
},
|
|
1293
|
+
"astc-4x4-unorm": {
|
|
1294
|
+
blockBytes: 16,
|
|
1295
|
+
blockWidth: 4,
|
|
1296
|
+
blockHeight: 4
|
|
1297
|
+
}
|
|
1298
|
+
}, Ee = {
|
|
1299
|
+
blockBytes: 4,
|
|
1300
|
+
blockWidth: 1,
|
|
1301
|
+
blockHeight: 1
|
|
1302
|
+
}, De = {
|
|
1303
|
+
type: "compressed",
|
|
1304
|
+
upload(e, t, n, r = 0) {
|
|
1305
|
+
let i = e.pixelWidth, a = e.pixelHeight, o = K[e.format] || Ee;
|
|
1306
|
+
for (let s = 0; s < e.resource.length; s++) {
|
|
1307
|
+
let c = e.resource[s], l = Math.ceil(i / o.blockWidth) * o.blockBytes;
|
|
1308
|
+
n.device.queue.writeTexture({
|
|
1309
|
+
texture: t,
|
|
1310
|
+
mipLevel: s,
|
|
1311
|
+
origin: {
|
|
1312
|
+
x: 0,
|
|
1313
|
+
y: 0,
|
|
1314
|
+
z: r
|
|
1315
|
+
}
|
|
1316
|
+
}, c, {
|
|
1317
|
+
offset: 0,
|
|
1318
|
+
bytesPerRow: l
|
|
1319
|
+
}, {
|
|
1320
|
+
width: Math.ceil(i / o.blockWidth) * o.blockWidth,
|
|
1321
|
+
height: Math.ceil(a / o.blockHeight) * o.blockHeight,
|
|
1322
|
+
depthOrArrayLayers: 1
|
|
1323
|
+
}), i = Math.max(i >> 1, 1), a = Math.max(a >> 1, 1);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}, q = [
|
|
1327
|
+
"right",
|
|
1328
|
+
"left",
|
|
1329
|
+
"top",
|
|
1330
|
+
"bottom",
|
|
1331
|
+
"front",
|
|
1332
|
+
"back"
|
|
1333
|
+
];
|
|
1334
|
+
function Oe(e) {
|
|
1335
|
+
return {
|
|
1336
|
+
type: "cube",
|
|
1337
|
+
upload(t, n, r) {
|
|
1338
|
+
let i = t.faces;
|
|
1339
|
+
for (let t = 0; t < q.length; t++) {
|
|
1340
|
+
let a = i[q[t]];
|
|
1341
|
+
(e[a.uploadMethodId] || e.image).upload(a, n, r, t);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
//#endregion
|
|
1347
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/texture/uploaders/gpuUploadImageSource.mjs
|
|
1348
|
+
var J = {
|
|
1349
|
+
type: "image",
|
|
1350
|
+
upload(e, n, r, i = 0) {
|
|
1351
|
+
let o = e.resource;
|
|
1352
|
+
if (!o) return;
|
|
1353
|
+
if (globalThis.HTMLImageElement && o instanceof HTMLImageElement) {
|
|
1354
|
+
let n = a.get().createCanvas(o.width, o.height);
|
|
1355
|
+
n.getContext("2d").drawImage(o, 0, 0, o.width, o.height), e.resource = n, t("ImageSource: Image element passed, converting to canvas and replacing resource.");
|
|
1356
|
+
}
|
|
1357
|
+
let s = Math.min(n.width, e.resourceWidth || e.pixelWidth), c = Math.min(n.height, e.resourceHeight || e.pixelHeight), l = e.alphaMode === "premultiply-alpha-on-upload";
|
|
1358
|
+
r.device.queue.copyExternalImageToTexture({ source: o }, {
|
|
1359
|
+
texture: n,
|
|
1360
|
+
origin: {
|
|
1361
|
+
x: 0,
|
|
1362
|
+
y: 0,
|
|
1363
|
+
z: i
|
|
1364
|
+
},
|
|
1365
|
+
premultipliedAlpha: l
|
|
1366
|
+
}, {
|
|
1367
|
+
width: s,
|
|
1368
|
+
height: c
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
}, ke = {
|
|
1372
|
+
type: "video",
|
|
1373
|
+
upload(e, t, n, r) {
|
|
1374
|
+
J.upload(e, t, n, r);
|
|
1375
|
+
}
|
|
1376
|
+
}, Ae = class {
|
|
1377
|
+
constructor(e) {
|
|
1378
|
+
this.device = e, this.sampler = e.createSampler({ minFilter: "linear" }), this.pipelines = {};
|
|
1379
|
+
}
|
|
1380
|
+
_getMipmapPipeline(e) {
|
|
1381
|
+
let t = this.pipelines[e];
|
|
1382
|
+
return t || (this.mipmapShaderModule ||= this.device.createShaderModule({ code: "\n var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));\n\n struct VertexOutput {\n @builtin(position) position : vec4<f32>,\n @location(0) texCoord : vec2<f32>,\n };\n\n @vertex\n fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {\n var output : VertexOutput;\n output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);\n output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);\n return output;\n }\n\n @group(0) @binding(0) var imgSampler : sampler;\n @group(0) @binding(1) var img : texture_2d<f32>;\n\n @fragment\n fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {\n return textureSample(img, imgSampler, texCoord);\n }\n " }), t = this.device.createRenderPipeline({
|
|
1383
|
+
layout: "auto",
|
|
1384
|
+
vertex: {
|
|
1385
|
+
module: this.mipmapShaderModule,
|
|
1386
|
+
entryPoint: "vertexMain"
|
|
1387
|
+
},
|
|
1388
|
+
fragment: {
|
|
1389
|
+
module: this.mipmapShaderModule,
|
|
1390
|
+
entryPoint: "fragmentMain",
|
|
1391
|
+
targets: [{ format: e }]
|
|
1392
|
+
}
|
|
1393
|
+
}), this.pipelines[e] = t), t;
|
|
1394
|
+
}
|
|
1395
|
+
generateMipmap(e) {
|
|
1396
|
+
let t = this._getMipmapPipeline(e.format);
|
|
1397
|
+
if (e.dimension === "3d" || e.dimension === "1d") throw Error("Generating mipmaps for non-2d textures is currently unsupported!");
|
|
1398
|
+
let n = e, r = e.depthOrArrayLayers || 1, i = e.usage & GPUTextureUsage.RENDER_ATTACHMENT;
|
|
1399
|
+
if (!i) {
|
|
1400
|
+
let t = {
|
|
1401
|
+
size: {
|
|
1402
|
+
width: Math.ceil(e.width / 2),
|
|
1403
|
+
height: Math.ceil(e.height / 2),
|
|
1404
|
+
depthOrArrayLayers: r
|
|
1405
|
+
},
|
|
1406
|
+
format: e.format,
|
|
1407
|
+
usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_SRC | GPUTextureUsage.RENDER_ATTACHMENT,
|
|
1408
|
+
mipLevelCount: e.mipLevelCount - 1
|
|
1409
|
+
};
|
|
1410
|
+
n = this.device.createTexture(t);
|
|
1411
|
+
}
|
|
1412
|
+
let a = this.device.createCommandEncoder({}), o = t.getBindGroupLayout(0);
|
|
1413
|
+
for (let s = 0; s < r; ++s) {
|
|
1414
|
+
let r = e.createView({
|
|
1415
|
+
baseMipLevel: 0,
|
|
1416
|
+
mipLevelCount: 1,
|
|
1417
|
+
dimension: "2d",
|
|
1418
|
+
baseArrayLayer: s,
|
|
1419
|
+
arrayLayerCount: 1
|
|
1420
|
+
}), c = +!!i;
|
|
1421
|
+
for (let i = 1; i < e.mipLevelCount; ++i) {
|
|
1422
|
+
let e = n.createView({
|
|
1423
|
+
baseMipLevel: c++,
|
|
1424
|
+
mipLevelCount: 1,
|
|
1425
|
+
dimension: "2d",
|
|
1426
|
+
baseArrayLayer: s,
|
|
1427
|
+
arrayLayerCount: 1
|
|
1428
|
+
}), i = a.beginRenderPass({ colorAttachments: [{
|
|
1429
|
+
view: e,
|
|
1430
|
+
storeOp: "store",
|
|
1431
|
+
loadOp: "clear",
|
|
1432
|
+
clearValue: {
|
|
1433
|
+
r: 0,
|
|
1434
|
+
g: 0,
|
|
1435
|
+
b: 0,
|
|
1436
|
+
a: 0
|
|
1437
|
+
}
|
|
1438
|
+
}] }), l = this.device.createBindGroup({
|
|
1439
|
+
layout: o,
|
|
1440
|
+
entries: [{
|
|
1441
|
+
binding: 0,
|
|
1442
|
+
resource: this.sampler
|
|
1443
|
+
}, {
|
|
1444
|
+
binding: 1,
|
|
1445
|
+
resource: r
|
|
1446
|
+
}]
|
|
1447
|
+
});
|
|
1448
|
+
i.setPipeline(t), i.setBindGroup(0, l), i.draw(3, 1, 0, 0), i.end(), r = e;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
if (!i) {
|
|
1452
|
+
let t = {
|
|
1453
|
+
width: Math.ceil(e.width / 2),
|
|
1454
|
+
height: Math.ceil(e.height / 2),
|
|
1455
|
+
depthOrArrayLayers: r
|
|
1456
|
+
};
|
|
1457
|
+
for (let r = 1; r < e.mipLevelCount; ++r) a.copyTextureToTexture({
|
|
1458
|
+
texture: n,
|
|
1459
|
+
mipLevel: r - 1
|
|
1460
|
+
}, {
|
|
1461
|
+
texture: e,
|
|
1462
|
+
mipLevel: r
|
|
1463
|
+
}, t), t.width = Math.ceil(t.width / 2), t.height = Math.ceil(t.height / 2);
|
|
1464
|
+
}
|
|
1465
|
+
return this.device.queue.submit([a.finish()]), i || n.destroy(), e;
|
|
1466
|
+
}
|
|
1467
|
+
}, je = class {
|
|
1468
|
+
constructor(e) {
|
|
1469
|
+
this.textureView = null, this.gpuTexture = e;
|
|
1470
|
+
}
|
|
1471
|
+
destroy() {
|
|
1472
|
+
this.gpuTexture.destroy(), this.textureView = null, this.gpuTexture = null;
|
|
1473
|
+
}
|
|
1474
|
+
}, Y = class e {
|
|
1475
|
+
constructor(t) {
|
|
1476
|
+
this._gpuSamplers = /* @__PURE__ */ Object.create(null), this._bindGroupHash = /* @__PURE__ */ Object.create(null), this._renderer = t, t.gc.addCollection(this, "_bindGroupHash", "hash"), this._managedTextures = new x({
|
|
1477
|
+
renderer: t,
|
|
1478
|
+
type: "resource",
|
|
1479
|
+
onUnload: this.onSourceUnload.bind(this),
|
|
1480
|
+
name: "gpuTextureSource"
|
|
1481
|
+
});
|
|
1482
|
+
let n = {
|
|
1483
|
+
image: J,
|
|
1484
|
+
buffer: Te,
|
|
1485
|
+
video: ke,
|
|
1486
|
+
compressed: De,
|
|
1487
|
+
...e.uploadExtensions
|
|
1488
|
+
};
|
|
1489
|
+
this._uploads = {
|
|
1490
|
+
...n,
|
|
1491
|
+
cube: Oe(n)
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
get managedTextures() {
|
|
1495
|
+
return Object.values(this._managedTextures.items);
|
|
1496
|
+
}
|
|
1497
|
+
contextChange(e) {
|
|
1498
|
+
this._gpu = e;
|
|
1499
|
+
}
|
|
1500
|
+
initSource(e) {
|
|
1501
|
+
return e._gpuData[this._renderer.uid]?.gpuTexture || this._initSource(e);
|
|
1502
|
+
}
|
|
1503
|
+
_initSource(e) {
|
|
1504
|
+
if (e.autoGenerateMipmaps) {
|
|
1505
|
+
let t = Math.max(e.pixelWidth, e.pixelHeight);
|
|
1506
|
+
e.mipLevelCount = Math.floor(Math.log2(t)) + 1;
|
|
1507
|
+
}
|
|
1508
|
+
let t;
|
|
1509
|
+
e.sampleCount > 1 ? (t = GPUTextureUsage.RENDER_ATTACHMENT, e.transient && this._renderer.device.extensions.transientAttachment && (t |= GPUTextureUsage.TRANSIENT_ATTACHMENT)) : (t = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST, e.uploadMethodId !== "compressed" && (t |= GPUTextureUsage.RENDER_ATTACHMENT, t |= GPUTextureUsage.COPY_SRC));
|
|
1510
|
+
let n = K[e.format] || {
|
|
1511
|
+
blockBytes: 4,
|
|
1512
|
+
blockWidth: 1,
|
|
1513
|
+
blockHeight: 1
|
|
1514
|
+
}, r = Math.ceil(e.pixelWidth / n.blockWidth) * n.blockWidth, i = Math.ceil(e.pixelHeight / n.blockHeight) * n.blockHeight, a = {
|
|
1515
|
+
label: e.label,
|
|
1516
|
+
size: {
|
|
1517
|
+
width: r,
|
|
1518
|
+
height: i,
|
|
1519
|
+
depthOrArrayLayers: e.arrayLayerCount
|
|
1520
|
+
},
|
|
1521
|
+
format: e.format,
|
|
1522
|
+
sampleCount: e.sampleCount,
|
|
1523
|
+
mipLevelCount: e.mipLevelCount,
|
|
1524
|
+
dimension: e.dimension,
|
|
1525
|
+
usage: t
|
|
1526
|
+
}, o = this._gpu.device.createTexture(a);
|
|
1527
|
+
return e._gpuData[this._renderer.uid] = new je(o), this._managedTextures.add(e) && (e.on("update", this.onSourceUpdate, this), e.on("resize", this.onSourceResize, this), e.on("updateMipmaps", this.onUpdateMipmaps, this)), this.onSourceUpdate(e), o;
|
|
1528
|
+
}
|
|
1529
|
+
onSourceUpdate(e) {
|
|
1530
|
+
let t = this.getGpuSource(e);
|
|
1531
|
+
t && (this._uploads[e.uploadMethodId] && this._uploads[e.uploadMethodId].upload(e, t, this._gpu), e.autoGenerateMipmaps && e.mipLevelCount > 1 && this.onUpdateMipmaps(e));
|
|
1532
|
+
}
|
|
1533
|
+
onUpdateMipmaps(e) {
|
|
1534
|
+
this._mipmapGenerator ||= new Ae(this._gpu.device);
|
|
1535
|
+
let t = this.getGpuSource(e);
|
|
1536
|
+
this._mipmapGenerator.generateMipmap(t);
|
|
1537
|
+
}
|
|
1538
|
+
onSourceUnload(e) {
|
|
1539
|
+
e.off("update", this.onSourceUpdate, this), e.off("resize", this.onSourceResize, this), e.off("updateMipmaps", this.onUpdateMipmaps, this);
|
|
1540
|
+
}
|
|
1541
|
+
onSourceResize(e) {
|
|
1542
|
+
e._gcLastUsed = this._renderer.gc.now;
|
|
1543
|
+
let t = e._gpuData[this._renderer.uid], n = t?.gpuTexture;
|
|
1544
|
+
n ? (n.width !== e.pixelWidth || n.height !== e.pixelHeight) && (t.destroy(), this._bindGroupHash[e.uid] = null, e._gpuData[this._renderer.uid] = null, this.initSource(e)) : this.initSource(e);
|
|
1545
|
+
}
|
|
1546
|
+
_initSampler(e) {
|
|
1547
|
+
return this._gpuSamplers[e._resourceId] = this._gpu.device.createSampler(e), this._gpuSamplers[e._resourceId];
|
|
1548
|
+
}
|
|
1549
|
+
getGpuSampler(e) {
|
|
1550
|
+
return this._gpuSamplers[e._resourceId] || this._initSampler(e);
|
|
1551
|
+
}
|
|
1552
|
+
getGpuSource(e) {
|
|
1553
|
+
return e._gcLastUsed = this._renderer.gc.now, e._gpuData[this._renderer.uid]?.gpuTexture || this.initSource(e);
|
|
1554
|
+
}
|
|
1555
|
+
getTextureBindGroup(e) {
|
|
1556
|
+
return this._bindGroupHash[e.uid] || this._createTextureBindGroup(e);
|
|
1557
|
+
}
|
|
1558
|
+
_createTextureBindGroup(e) {
|
|
1559
|
+
let t = e.source;
|
|
1560
|
+
return this._bindGroupHash[e.uid] = new u({
|
|
1561
|
+
0: t,
|
|
1562
|
+
1: t.style,
|
|
1563
|
+
2: new g({ uTextureMatrix: {
|
|
1564
|
+
type: "mat3x3<f32>",
|
|
1565
|
+
value: e.textureMatrix.mapCoord
|
|
1566
|
+
} })
|
|
1567
|
+
}), this._bindGroupHash[e.uid];
|
|
1568
|
+
}
|
|
1569
|
+
getTextureView(e) {
|
|
1570
|
+
let t = e.source;
|
|
1571
|
+
t._gcLastUsed = this._renderer.gc.now;
|
|
1572
|
+
let n = t._gpuData[this._renderer.uid];
|
|
1573
|
+
return n ||= (this.initSource(t), t._gpuData[this._renderer.uid]), n.textureView || (n.textureView = n.gpuTexture.createView({ dimension: t.viewDimension })), n.textureView;
|
|
1574
|
+
}
|
|
1575
|
+
generateCanvas(e) {
|
|
1576
|
+
let t = this._renderer, n = t.gpu.device.createCommandEncoder(), r = a.get().createCanvas();
|
|
1577
|
+
r.width = e.source.pixelWidth, r.height = e.source.pixelHeight;
|
|
1578
|
+
let i = r.getContext("webgpu");
|
|
1579
|
+
return i.configure({
|
|
1580
|
+
device: t.gpu.device,
|
|
1581
|
+
usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC,
|
|
1582
|
+
format: a.get().getNavigator().gpu.getPreferredCanvasFormat(),
|
|
1583
|
+
alphaMode: "premultiplied"
|
|
1584
|
+
}), n.copyTextureToTexture({
|
|
1585
|
+
texture: t.texture.getGpuSource(e.source),
|
|
1586
|
+
origin: {
|
|
1587
|
+
x: 0,
|
|
1588
|
+
y: 0
|
|
1589
|
+
}
|
|
1590
|
+
}, { texture: i.getCurrentTexture() }, {
|
|
1591
|
+
width: r.width,
|
|
1592
|
+
height: r.height
|
|
1593
|
+
}), t.gpu.device.queue.submit([n.finish()]), r;
|
|
1594
|
+
}
|
|
1595
|
+
getPixels(e) {
|
|
1596
|
+
let t = this.generateCanvas(e), n = v.getOptimalCanvasAndContext(t.width, t.height), r = n.context;
|
|
1597
|
+
r.drawImage(t, 0, 0);
|
|
1598
|
+
let { width: i, height: a } = t, o = r.getImageData(0, 0, i, a), s = new Uint8ClampedArray(o.data.buffer);
|
|
1599
|
+
return v.returnCanvasAndContext(n), {
|
|
1600
|
+
pixels: s,
|
|
1601
|
+
width: i,
|
|
1602
|
+
height: a
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
destroy() {
|
|
1606
|
+
this._managedTextures.destroy();
|
|
1607
|
+
for (let e of Object.keys(this._bindGroupHash)) {
|
|
1608
|
+
let t = Number(e);
|
|
1609
|
+
this._bindGroupHash[t]?.destroy();
|
|
1610
|
+
}
|
|
1611
|
+
this._renderer = null, this._gpu = null, this._mipmapGenerator = null, this._gpuSamplers = null, this._bindGroupHash = null;
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1614
|
+
Y.extension = {
|
|
1615
|
+
type: [h.WebGPUSystem],
|
|
1616
|
+
name: "texture"
|
|
1617
|
+
}, Y.uploadExtensions = /* @__PURE__ */ Object.create(null);
|
|
1618
|
+
var X = Y;
|
|
1619
|
+
l.handleByMap(h.TextureUploaderWebGPU, X.uploadExtensions);
|
|
1620
|
+
//#endregion
|
|
1621
|
+
//#region node_modules/.pnpm/pixi.js@8.19.0/node_modules/pixi.js/lib/rendering/renderers/gpu/WebGPURenderer.mjs
|
|
1622
|
+
var Me = /* @__PURE__ */ e({ WebGPURenderer: () => Ie }), Ne = [
|
|
1623
|
+
...ie,
|
|
1624
|
+
L,
|
|
1625
|
+
N,
|
|
1626
|
+
M,
|
|
1627
|
+
P,
|
|
1628
|
+
A,
|
|
1629
|
+
X,
|
|
1630
|
+
H,
|
|
1631
|
+
U,
|
|
1632
|
+
G,
|
|
1633
|
+
V,
|
|
1634
|
+
j,
|
|
1635
|
+
F,
|
|
1636
|
+
k
|
|
1637
|
+
], Pe = [...ne, z], Fe = [
|
|
1638
|
+
O,
|
|
1639
|
+
E,
|
|
1640
|
+
T
|
|
1641
|
+
], Z = [], Q = [], $ = [];
|
|
1642
|
+
l.handleByNamedList(h.WebGPUSystem, Z), l.handleByNamedList(h.WebGPUPipes, Q), l.handleByNamedList(h.WebGPUPipesAdaptor, $), l.add(...Ne, ...Pe, ...Fe);
|
|
1643
|
+
var Ie = class extends re {
|
|
1644
|
+
constructor() {
|
|
1645
|
+
let e = {
|
|
1646
|
+
name: "webgpu",
|
|
1647
|
+
type: s.WEBGPU,
|
|
1648
|
+
systems: Z,
|
|
1649
|
+
renderPipes: Q,
|
|
1650
|
+
renderPipeAdaptors: $
|
|
1651
|
+
};
|
|
1652
|
+
super(e);
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
//#endregion
|
|
1656
|
+
export { Me as t };
|