@kolkrabbi/design-editor 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -25
- package/dist/BufferResource-BfLgK37S.js +273 -0
- package/dist/CanvasPool-YNSF8hsR.js +30 -0
- package/dist/CanvasRenderer-Bl0rlqNq.js +2 -0
- package/dist/FederatedEventTarget-BJgROaRQ.js +975 -0
- package/dist/FilterSystem-BUrPNXx-.js +1323 -0
- package/dist/Geometry-C5s5KpWq.js +3805 -0
- package/dist/{OrbitControls-BAhLQ5d8.js → OrbitControls-Cql8Rn2i.js} +10305 -9058
- package/dist/RenderTargetSystem-oFwWv5IW.js +2889 -0
- package/dist/WebGLRenderer-CXxpVIx3.js +2 -0
- package/dist/WebGPURenderer-BwLEUYBa.js +2 -0
- package/dist/browserAll-CAzdTUbR.js +6 -0
- package/dist/canvasUtils-BoNfkAod.js +168 -0
- package/dist/chunk-3b4jIN3o.js +13 -0
- package/dist/design-editor.css +2 -2
- package/dist/design-editor.js +52017 -38760
- package/dist/getTextureBatchBindGroup-CNWhZRbV.js +19 -0
- package/dist/{host-IfZgcJFg.js → host-CVR9RL_W.js} +505 -556
- package/dist/{host-Cidlc8xP.js → host-be1CWhN1.js} +133 -85
- package/dist/init-jApIMi04.js +4 -0
- package/dist/phase-t_DhU5Nm.js +1719 -0
- package/dist/pipeline-CMpuPUaX.js +11995 -0
- package/dist/src-QwKcYKfv.js +4315 -0
- package/dist/webworkerAll-DEZhpG90.js +2 -0
- package/package.json +42 -31
- package/LICENSE +0 -21
- package/dist/favicon/favicon.svg +0 -12
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Black.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-BlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Bold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-BoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-CompactRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Dark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-DarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Fine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-FineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Light.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-LightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Medium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-MediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-NarrowRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-SpatialRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TallRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-TightRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlack.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBlackItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideDarkItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideFineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk/PPRightGrotesk-WideRegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Bold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-BoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Dark.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Fine.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-FineItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Light.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Medium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Mono/PPRightGroteskMono-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMedium.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-CompactMediumItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-Regular.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-RegularItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLight.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-SpatialLightItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBold.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-Text/PPRightGroteskText-WideBoldItalic.woff2 +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Black.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Bold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-BoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-CompactRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Dark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-DarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Fine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-FineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Light.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-LightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Medium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-MediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-NarrowRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-Regular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-RegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-SpatialRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TallRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-TightRegularItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlack.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBlackItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBold.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideBoldItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDark.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideDarkItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFine.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideFineItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLight.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideLightItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMedium.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideMediumItalic.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegular.ttf +0 -0
- package/dist/fonts/Right-Grotesk-ttf/PPRightGrotesk-WideRegularItalic.ttf +0 -0
- package/dist/fonts/TG/TGGullhamrarVF.ttf +0 -0
- package/dist/fonts/TG/TGMalromurRomanVF.ttf +0 -0
- package/dist/fonts/TG/TGRotVF.ttf +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-MediumItalic.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/meshPalettes-BJODHYrY.js +0 -892
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as e, M as t, N as n, U as r, W as i, X as a, Y as o, a as s, at as c, ct as l, d as u, f as d, g as f, h as p, j as m, ot as h, p as g, st as _, t as v, u as y } from "./OrbitControls-Cql8Rn2i.js";
|
|
2
2
|
//#region src/filters/gl/synthBase.js
|
|
3
3
|
var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position.xy, 0.0, 1.0);\n }\n", x = class {
|
|
4
4
|
constructor(e, { autoLoop: t = !1 } = {}) {
|
|
5
|
-
this.canvas = e, this.autoLoop = t, this.renderer = new
|
|
5
|
+
this.canvas = e, this.autoLoop = t, this.renderer = new s({
|
|
6
6
|
canvas: e,
|
|
7
7
|
antialias: !0,
|
|
8
8
|
preserveDrawingBuffer: !0,
|
|
@@ -11,8 +11,8 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
|
|
|
11
11
|
}
|
|
12
12
|
setSource(e) {
|
|
13
13
|
this.tex && this.tex.dispose();
|
|
14
|
-
let
|
|
15
|
-
|
|
14
|
+
let n = new g(e);
|
|
15
|
+
n.minFilter = t, n.magFilter = t, n.wrapS = p, n.wrapT = p, this.tex = n, this.imageAspect = (e.width || 1) / (e.height || 1), this._onImage?.();
|
|
16
16
|
}
|
|
17
17
|
touchSource() {
|
|
18
18
|
this.tex && (this.tex.needsUpdate = !0);
|
|
@@ -76,20 +76,20 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
|
|
|
76
76
|
this._raf && cancelAnimationFrame(this._raf), this._raf = null, this._dispose?.(), this.tex && this.tex.dispose(), this.renderer.dispose();
|
|
77
77
|
}
|
|
78
78
|
}, S = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uPrev;\n uniform sampler2D uImage;\n uniform vec2 uScale;\n uniform vec2 uOffset;\n uniform float uDecay;\n uniform float uTaps; // active heads (1..4)\n uniform float uZoom; // per-step feedback zoom\n uniform float uRot; // per-step rotation, rad\n uniform float uDrift; // per-step radial offset (chromatic convergence)\n uniform float uChroma; // per-head colour amount (0 = mono, 1 = full tint)\n uniform float uMix; // live source contribution (0 = pure feedback)\n uniform vec4 uGap; // per-head spacing multipliers (even/triplet/shift)\n uniform vec2 uOrigin; // feedback transform centre (the tunnel vanishing point)\n\n vec3 head(float g, vec3 tint, float on) {\n vec2 c = vUv - uOrigin;\n float a = uRot * g;\n float s = sin(a), co = cos(a);\n c = mat2(co, -s, s, co) * c;\n c *= pow(uZoom, g);\n c += normalize(c + 1e-4) * (uDrift * g);\n vec3 col = texture2D(uPrev, c + uOrigin).rgb;\n return mix(col, col * tint, uChroma) * on;\n }\n\n void main() {\n vec3 fbk = vec3(0.0);\n fbk += head(uGap.x, vec3(1.0, 0.25, 0.20), step(0.5, uTaps));\n fbk += head(uGap.y, vec3(0.30, 1.0, 0.35), step(1.5, uTaps));\n fbk += head(uGap.z, vec3(0.35, 0.50, 1.0), step(2.5, uTaps));\n fbk += head(uGap.w, vec3(1.0, 0.72, 0.25), step(3.5, uTaps));\n fbk = fbk / max(1.0, uTaps) * uDecay;\n vec3 src = texture2D(uImage, vUv * uScale + uOffset).rgb;\n gl_FragColor = vec4(clamp(max(fbk, src * uMix), 0.0, 1.0), 1.0);\n }\n", C = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uTex;\n uniform float uTime;\n uniform float uSat; // saturation boost (1 = none)\n uniform float uLock; // 70s palette colorize mix (0 = off)\n uniform float uHue; // hue cycle speed (0 = off)\n uniform float uGain; // output brightness (1 = none)\n vec3 satBoost(vec3 c, float s) { float l = dot(c, vec3(0.299, 0.587, 0.114)); return clamp(mix(vec3(l), c, s), 0.0, 1.0); }\n mat3 hueRot(float a) {\n float c = cos(a), s = sin(a);\n mat3 w = mat3(0.299, 0.299, 0.299, 0.587, 0.587, 0.587, 0.114, 0.114, 0.114);\n mat3 u = mat3(0.701, -0.299, -0.300, -0.587, 0.413, -0.588, -0.114, -0.114, 0.886);\n mat3 v = mat3(0.168, -0.328, 1.250, 0.330, 0.035, -1.050, -0.497, 0.292, -0.203);\n return w + u * c + v * s;\n }\n // Map luma → a vintage 70s ramp: rust · ochre · cream · teal · blue.\n vec3 pal70(float t) {\n t = clamp(t, 0.0, 1.0) * 4.0;\n vec3 a = vec3(0.75, 0.22, 0.17), b = vec3(0.88, 0.54, 0.12), c = vec3(0.95, 0.91, 0.84), d = vec3(0.16, 0.62, 0.56), e = vec3(0.17, 0.37, 0.54);\n if (t < 1.0) return mix(a, b, t);\n if (t < 2.0) return mix(b, c, t - 1.0);\n if (t < 3.0) return mix(c, d, t - 2.0);\n return mix(d, e, t - 3.0);\n }\n void main() {\n vec3 col = texture2D(uTex, vUv).rgb;\n if (uHue > 0.001) col = clamp(hueRot(uTime * uHue) * col, 0.0, 1.0);\n col = satBoost(col, uSat);\n col = mix(col, pal70(dot(col, vec3(0.299, 0.587, 0.114))), uLock);\n col = clamp(col * uGain, 0.0, 1.0);\n gl_FragColor = vec4(col, 1.0);\n }\n", w = {
|
|
79
|
-
minFilter:
|
|
80
|
-
magFilter:
|
|
79
|
+
minFilter: t,
|
|
80
|
+
magFilter: t,
|
|
81
81
|
depthBuffer: !1,
|
|
82
82
|
stencilBuffer: !1
|
|
83
83
|
}, T = class extends x {
|
|
84
84
|
_setup() {
|
|
85
|
-
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new
|
|
85
|
+
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.rtA = new l(2, 2, w), this.rtB = new l(2, 2, w), this.fbMat = new a({
|
|
86
86
|
vertexShader: b,
|
|
87
87
|
fragmentShader: S,
|
|
88
88
|
uniforms: {
|
|
89
89
|
uPrev: { value: null },
|
|
90
90
|
uImage: { value: null },
|
|
91
|
-
uScale: { value: new
|
|
92
|
-
uOffset: { value: new
|
|
91
|
+
uScale: { value: new c(1, 1) },
|
|
92
|
+
uOffset: { value: new c(0, 0) },
|
|
93
93
|
uDecay: { value: .92 },
|
|
94
94
|
uTaps: { value: 3 },
|
|
95
95
|
uZoom: { value: 1 },
|
|
@@ -97,10 +97,10 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
|
|
|
97
97
|
uDrift: { value: .02 },
|
|
98
98
|
uChroma: { value: .6 },
|
|
99
99
|
uMix: { value: 1 },
|
|
100
|
-
uGap: { value: new
|
|
101
|
-
uOrigin: { value: new
|
|
100
|
+
uGap: { value: new _(1, 2, 3, 4) },
|
|
101
|
+
uOrigin: { value: new c(.5, .5) }
|
|
102
102
|
}
|
|
103
|
-
}), this.copyMat = new
|
|
103
|
+
}), this.copyMat = new a({
|
|
104
104
|
vertexShader: b,
|
|
105
105
|
fragmentShader: C,
|
|
106
106
|
uniforms: {
|
|
@@ -111,7 +111,7 @@ var b = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position
|
|
|
111
111
|
uHue: { value: 0 },
|
|
112
112
|
uGain: { value: 1 }
|
|
113
113
|
}
|
|
114
|
-
}), this.quad = new
|
|
114
|
+
}), this.quad = new n(this.geo, this.fbMat), this.scene.add(this.quad);
|
|
115
115
|
}
|
|
116
116
|
_applyFit() {
|
|
117
117
|
let { sx: e, sy: t, ox: n, oy: r } = this.coverFit();
|
|
@@ -182,9 +182,9 @@ function E(e, t, n, r = [
|
|
|
182
182
|
//#region src/filters/gl/scanEngine.js
|
|
183
183
|
var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying vec3 vColor;\n varying float vLuma;\n void main() {\n vec3 c = texture2D(uImage, uv).rgb;\n float luma = dot(c, vec3(0.299, 0.587, 0.114));\n vColor = c;\n vLuma = luma;\n vec3 p = position;\n p.z += (luma - 0.5) * uDisplace;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(p, 1.0);\n }\n", O = "\n precision highp float;\n varying vec3 vColor;\n varying float vLuma;\n uniform float uMono;\n uniform float uOpacity;\n uniform vec3 uTint;\n void main() {\n vec3 col = mix(vColor, uTint * (0.25 + vLuma), uMono);\n gl_FragColor = vec4(col, uOpacity);\n }\n", k = Math.PI * 2, A = class extends x {
|
|
184
184
|
_setup() {
|
|
185
|
-
this.scene = new
|
|
186
|
-
let [e, t,
|
|
187
|
-
this.camera.position.set(e, t,
|
|
185
|
+
this.scene = new o(), this.camera = new i(45, 1, .1, 100);
|
|
186
|
+
let [e, t, n] = E(0, .4, 3);
|
|
187
|
+
this.camera.position.set(e, t, n), this.controls = new v(this.camera, this.canvas), this.controls.enableDamping = !0, this.controls.dampingFactor = .08, this.controls.enablePan = !1, this.controls.minDistance = 1.5, this.controls.maxDistance = 8, this.controls.target.set(0, 0, 0), this.controls.update(), this.mat = new a({
|
|
188
188
|
vertexShader: D,
|
|
189
189
|
fragmentShader: O,
|
|
190
190
|
transparent: !0,
|
|
@@ -193,20 +193,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
193
193
|
uDisplace: { value: 1 },
|
|
194
194
|
uMono: { value: 0 },
|
|
195
195
|
uOpacity: { value: 1 },
|
|
196
|
-
uTint: { value: new
|
|
196
|
+
uTint: { value: new f("#9fe7ff") }
|
|
197
197
|
}
|
|
198
|
-
}), this.mesh = null, this.rows = 140, this.cols = 220, this._camKey = "", this._bg = new
|
|
198
|
+
}), this.mesh = null, this.rows = 140, this.cols = 220, this._camKey = "", this._bg = new f("#0b0e13"), this._buildMesh();
|
|
199
199
|
}
|
|
200
200
|
_buildMesh() {
|
|
201
|
-
let e = Math.max(8, Math.round(this.cols)),
|
|
202
|
-
for (let
|
|
203
|
-
let s =
|
|
204
|
-
|
|
201
|
+
let e = Math.max(8, Math.round(this.cols)), t = Math.max(8, Math.round(this.rows)), n = this.imageAspect || 1, r = new Float32Array(e * t * 3), i = new Float32Array(e * t * 2);
|
|
202
|
+
for (let a = 0; a < t; a++) for (let o = 0; o < e; o++) {
|
|
203
|
+
let s = a * e + o, c = o / (e - 1), l = a / (t - 1);
|
|
204
|
+
r[s * 3] = (c - .5) * 2 * n, r[s * 3 + 1] = (.5 - l) * 2, r[s * 3 + 2] = 0, i[s * 2] = c, i[s * 2 + 1] = 1 - l;
|
|
205
205
|
}
|
|
206
|
-
let
|
|
207
|
-
for (let
|
|
208
|
-
let
|
|
209
|
-
|
|
206
|
+
let a = [];
|
|
207
|
+
for (let n = 0; n < t; n++) for (let t = 0; t < e - 1; t++) a.push(n * e + t, n * e + t + 1);
|
|
208
|
+
let o = new u();
|
|
209
|
+
o.setAttribute("position", new y(r, 3)), o.setAttribute("uv", new y(i, 2)), o.setIndex(a), this.mesh && (this.scene.remove(this.mesh), this.mesh.geometry.dispose()), this.mesh = new m(o, this.mat), this.scene.add(this.mesh);
|
|
210
210
|
}
|
|
211
211
|
_onImage() {
|
|
212
212
|
this.mat.uniforms.uImage.value = this.tex, this._buildMesh();
|
|
@@ -276,23 +276,23 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
276
276
|
this.controls.dispose(), this.mesh && this.mesh.geometry.dispose(), this.mat.dispose();
|
|
277
277
|
}
|
|
278
278
|
}, j = 160, M = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform vec2 uScale, uOffset;\n void main() { gl_FragColor = texture2D(uImage, vUv * uScale + uOffset); }\n", N = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform vec2 uScale, uOffset;\n uniform float uSlit;\n uniform int uAxis;\n void main() {\n float cross = (uAxis == 0) ? vUv.y : vUv.x;\n vec2 suv = (uAxis == 0) ? vec2(uSlit, cross) : vec2(cross, uSlit);\n gl_FragColor = texture2D(uImage, suv * uScale + uOffset);\n }\n", P = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uStrip, uImage;\n uniform vec2 uScale, uOffset;\n uniform float uHead, uDir, uOrig, uSmooth;\n uniform int uAxis, uMode; // uMode 0 = chop, 1 = finish\n vec2 sUV(float pos, float cross) { return (uAxis == 0) ? vec2(pos, cross) : vec2(cross, pos); }\n float toPos(float along) {\n if (uMode == 1) { float t = (uDir > 0.0) ? along : 1.0 - along; return fract(uHead - t); }\n return (uDir > 0.0) ? along : 1.0 - along;\n }\n void main() {\n float along = (uAxis == 0) ? vUv.x : vUv.y;\n float cross = (uAxis == 0) ? vUv.y : vUv.x;\n float r = uSmooth * 0.03;\n vec4 e = texture2D(uStrip, sUV(toPos(along), cross)) * 0.383\n + (texture2D(uStrip, sUV(toPos(along + r), cross)) + texture2D(uStrip, sUV(toPos(along - r), cross))) * 0.242\n + (texture2D(uStrip, sUV(toPos(along + 2.0 * r), cross)) + texture2D(uStrip, sUV(toPos(along - 2.0 * r), cross))) * 0.0665;\n vec4 s = texture2D(uImage, vUv * uScale + uOffset);\n gl_FragColor = mix(e, s, uOrig);\n }\n", F = {
|
|
279
|
-
minFilter:
|
|
280
|
-
magFilter:
|
|
279
|
+
minFilter: t,
|
|
280
|
+
magFilter: t,
|
|
281
281
|
depthBuffer: !1,
|
|
282
282
|
stencilBuffer: !1
|
|
283
283
|
}, I = class extends x {
|
|
284
284
|
_setup() {
|
|
285
|
-
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new
|
|
285
|
+
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.quad = new n(this.geo, null), this.scene.add(this.quad), this.scrollMul = 1, this._acc = 0, this.headPx = 0, this.strip = null;
|
|
286
286
|
let t = () => ({
|
|
287
287
|
uImage: { value: null },
|
|
288
|
-
uScale: { value: new
|
|
289
|
-
uOffset: { value: new
|
|
288
|
+
uScale: { value: new c(1, 1) },
|
|
289
|
+
uOffset: { value: new c(0, 0) }
|
|
290
290
|
});
|
|
291
|
-
this.srcMat = new
|
|
291
|
+
this.srcMat = new a({
|
|
292
292
|
vertexShader: b,
|
|
293
293
|
fragmentShader: M,
|
|
294
294
|
uniforms: t()
|
|
295
|
-
}), this.slitMat = new
|
|
295
|
+
}), this.slitMat = new a({
|
|
296
296
|
vertexShader: b,
|
|
297
297
|
fragmentShader: N,
|
|
298
298
|
uniforms: {
|
|
@@ -300,7 +300,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
300
300
|
uSlit: { value: .5 },
|
|
301
301
|
uAxis: { value: 0 }
|
|
302
302
|
}
|
|
303
|
-
}), this.dispMat = new
|
|
303
|
+
}), this.dispMat = new a({
|
|
304
304
|
vertexShader: b,
|
|
305
305
|
fragmentShader: P,
|
|
306
306
|
uniforms: {
|
|
@@ -386,20 +386,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
386
386
|
mirrorX: 2,
|
|
387
387
|
mirrorY: 3,
|
|
388
388
|
quad: 4
|
|
389
|
-
},
|
|
389
|
+
}, z = class extends x {
|
|
390
390
|
_setup() {
|
|
391
|
-
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new
|
|
391
|
+
this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.mat = new a({
|
|
392
392
|
vertexShader: b,
|
|
393
393
|
fragmentShader: L,
|
|
394
394
|
uniforms: {
|
|
395
395
|
uImage: { value: null },
|
|
396
|
-
uScale: { value: new
|
|
397
|
-
uOffset: { value: new
|
|
396
|
+
uScale: { value: new c(1, 1) },
|
|
397
|
+
uOffset: { value: new c(0, 0) },
|
|
398
398
|
uTime: { value: 0 },
|
|
399
|
-
uOrigin: { value: new
|
|
400
|
-
uZoomV: { value: new
|
|
401
|
-
uPan: { value: new
|
|
402
|
-
uDrift: { value: new
|
|
399
|
+
uOrigin: { value: new c(.5, .5) },
|
|
400
|
+
uZoomV: { value: new c(1, 1) },
|
|
401
|
+
uPan: { value: new c(0, 0) },
|
|
402
|
+
uDrift: { value: new c(0, 0) },
|
|
403
403
|
uRot: { value: 0 },
|
|
404
404
|
uSpin: { value: .1 },
|
|
405
405
|
uTwist: { value: 0 },
|
|
@@ -413,7 +413,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
413
413
|
uSat: { value: 1 },
|
|
414
414
|
uLock: { value: 0 }
|
|
415
415
|
}
|
|
416
|
-
}), this.quad = new
|
|
416
|
+
}), this.quad = new n(this.geo, this.mat), this.scene.add(this.quad);
|
|
417
417
|
}
|
|
418
418
|
_applyFit() {
|
|
419
419
|
let { sx: e, sy: t, ox: n, oy: r } = this.coverFit();
|
|
@@ -439,7 +439,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
439
439
|
_dispose() {
|
|
440
440
|
this.mat.dispose(), this.geo.dispose();
|
|
441
441
|
}
|
|
442
|
-
},
|
|
442
|
+
}, ee = Math.PI * 2, B = {
|
|
443
443
|
off: null,
|
|
444
444
|
orbit: (e, t) => [.5 + t * Math.cos(e), .5 + t * Math.sin(e)],
|
|
445
445
|
figure8: (e, t) => [.5 + t * Math.sin(e), .5 + t * Math.sin(2 * e) * .5],
|
|
@@ -450,67 +450,105 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
450
450
|
return [.5 + n * Math.cos(e), .5 + n * Math.sin(e)];
|
|
451
451
|
}
|
|
452
452
|
}, V = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position.xy, 0.0, 1.0);\n }\n", H = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uPrev;\n uniform vec2 uMouse;\n uniform float uRadius;\n uniform float uDecay;\n uniform float uAspect;\n uniform float uActive;\n void main() {\n float prev = texture2D(uPrev, vUv).r;\n vec2 d = vUv - uMouse;\n d.x *= uAspect;\n float blob = smoothstep(uRadius, 0.0, length(d)) * uActive;\n float v = max(prev * uDecay, blob);\n gl_FragColor = vec4(vec3(v), 1.0);\n }\n", U = "\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D uImage;\n uniform sampler2D uTrail;\n uniform vec2 uImageScale;\n uniform vec2 uImageOffset;\n uniform float uStrength;\n uniform float uRGBShift;\n uniform vec2 uTexel;\n void main() {\n // Trail intensity at this pixel, plus its gradient (points toward the\n // cursor's bright centre → the refraction direction).\n float t = texture2D(uTrail, vUv).r;\n float tL = texture2D(uTrail, vUv - vec2(uTexel.x, 0.0)).r;\n float tR = texture2D(uTrail, vUv + vec2(uTexel.x, 0.0)).r;\n float tD = texture2D(uTrail, vUv - vec2(0.0, uTexel.y)).r;\n float tU = texture2D(uTrail, vUv + vec2(0.0, uTexel.y)).r;\n vec2 grad = vec2(tR - tL, tU - tD);\n vec2 dir = length(grad) > 1e-5 ? normalize(grad) : vec2(0.0);\n\n vec2 disp = grad * uStrength;\n // Chromatic aberration — R/G/B read at positions offset along the trail\n // direction, magnitude = trail intensity x shift.\n vec2 chroma = dir * t * uRGBShift;\n\n vec2 base = vUv * uImageScale + uImageOffset;\n float r = texture2D(uImage, base + disp + chroma).r;\n float g = texture2D(uImage, base + disp).g;\n float b = texture2D(uImage, base + disp - chroma).b;\n gl_FragColor = vec4(r, g, b, 1.0);\n }\n", W = .5, G = class {
|
|
453
|
-
constructor(
|
|
454
|
-
this.canvas =
|
|
455
|
-
canvas:
|
|
453
|
+
constructor(i, { autoLoop: u = !1 } = {}) {
|
|
454
|
+
this.canvas = i, this.autoLoop = u, this.renderer = new s({
|
|
455
|
+
canvas: i,
|
|
456
456
|
antialias: !1,
|
|
457
457
|
alpha: !0,
|
|
458
458
|
preserveDrawingBuffer: !0
|
|
459
|
-
}), this.renderer.setClearColor(0, 0), this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new
|
|
459
|
+
}), this.renderer.setClearColor(0, 0), this.camera = new r(-1, 1, 1, -1, 0, 1), this.scene = new o(), this.geo = new e(2, 2), this.target = new c(.5, .5), this.eased = new c(.5, .5), this.active = 0, this.params = {
|
|
460
460
|
strength: .25,
|
|
461
461
|
radius: .18,
|
|
462
462
|
decay: .94,
|
|
463
463
|
rgbShift: .03
|
|
464
|
-
}, this.size = new
|
|
464
|
+
}, this.size = new c(1, 1), this.imageAspect = 1, this.texture = null, this._raf = null, this.paused = !1, this.timeScale = 1, this.motion = {
|
|
465
465
|
shape: "off",
|
|
466
466
|
speed: 1,
|
|
467
467
|
size: .6,
|
|
468
468
|
pulse: 0
|
|
469
|
-
}, this.time = 0, this.last = performance.now();
|
|
470
|
-
let
|
|
471
|
-
minFilter:
|
|
472
|
-
magFilter:
|
|
469
|
+
}, this.time = 0, this.last = performance.now(), this.cursorPath = [], this.cursorDur = 0, this.cursorReplay = !1, this._recording = !1, this._recBuf = null, this._recStart = 0, this._onCanvasMove = null, this._paramPathRef = void 0, this.onCursorPath = null;
|
|
470
|
+
let d = {
|
|
471
|
+
minFilter: t,
|
|
472
|
+
magFilter: t,
|
|
473
473
|
depthBuffer: !1,
|
|
474
474
|
stencilBuffer: !1
|
|
475
475
|
};
|
|
476
|
-
this.rtA = new l(2, 2,
|
|
476
|
+
this.rtA = new l(2, 2, d), this.rtB = new l(2, 2, d), this.trailMat = new a({
|
|
477
477
|
vertexShader: V,
|
|
478
478
|
fragmentShader: H,
|
|
479
479
|
uniforms: {
|
|
480
480
|
uPrev: { value: null },
|
|
481
|
-
uMouse: { value: new
|
|
481
|
+
uMouse: { value: new c(.5, .5) },
|
|
482
482
|
uRadius: { value: this.params.radius },
|
|
483
483
|
uDecay: { value: this.params.decay },
|
|
484
484
|
uAspect: { value: 1 },
|
|
485
485
|
uActive: { value: 0 }
|
|
486
486
|
}
|
|
487
|
-
}), this.displayMat = new
|
|
487
|
+
}), this.displayMat = new a({
|
|
488
488
|
vertexShader: V,
|
|
489
489
|
fragmentShader: U,
|
|
490
490
|
uniforms: {
|
|
491
491
|
uImage: { value: null },
|
|
492
492
|
uTrail: { value: null },
|
|
493
|
-
uImageScale: { value: new
|
|
494
|
-
uImageOffset: { value: new
|
|
493
|
+
uImageScale: { value: new c(1, 1) },
|
|
494
|
+
uImageOffset: { value: new c(0, 0) },
|
|
495
495
|
uStrength: { value: this.params.strength },
|
|
496
496
|
uRGBShift: { value: this.params.rgbShift },
|
|
497
|
-
uTexel: { value: new
|
|
497
|
+
uTexel: { value: new c(.5, .5) }
|
|
498
498
|
}
|
|
499
|
-
}), this.quad = new
|
|
499
|
+
}), this.quad = new n(this.geo, this.trailMat), this.scene.add(this.quad), this._clearTargets(), this.autoLoop && this.start();
|
|
500
500
|
}
|
|
501
501
|
_clearTargets() {
|
|
502
502
|
this.renderer.setRenderTarget(this.rtA), this.renderer.clear(), this.renderer.setRenderTarget(this.rtB), this.renderer.clear(), this.renderer.setRenderTarget(null);
|
|
503
503
|
}
|
|
504
504
|
setSource(e) {
|
|
505
505
|
this.texture && this.texture.dispose();
|
|
506
|
-
let
|
|
507
|
-
|
|
506
|
+
let n = new g(e);
|
|
507
|
+
n.minFilter = t, n.magFilter = t, n.wrapS = p, n.wrapT = p, this.texture = n, this.imageAspect = (e.width || 1) / (e.height || 1), this.displayMat.uniforms.uImage.value = n, this._updateFit();
|
|
508
508
|
}
|
|
509
509
|
touchSource() {
|
|
510
510
|
this.texture && (this.texture.needsUpdate = !0);
|
|
511
511
|
}
|
|
512
512
|
setParams(e) {
|
|
513
|
-
e.strength != null && (this.params.strength = e.strength), e.radius != null && (this.params.radius = e.radius), e.decay != null && (this.params.decay = e.decay), e.rgbShift != null && (this.params.rgbShift = e.rgbShift), e.speed != null && this.setTimeScale(e.speed), (e.px != null || e.py != null) && this.setPointer(e.px ?? this.target.x, e.py ?? this.target.y), e.motionShape != null && (this.motion.shape = e.motionShape), e.motionSpeed != null && (this.motion.speed = e.motionSpeed), e.motionSize != null && (this.motion.size = e.motionSize), e.motionPulse != null && (this.motion.pulse = e.motionPulse), this._apply();
|
|
513
|
+
e.strength != null && (this.params.strength = e.strength), e.radius != null && (this.params.radius = e.radius), e.decay != null && (this.params.decay = e.decay), e.rgbShift != null && (this.params.rgbShift = e.rgbShift), e.speed != null && this.setTimeScale(e.speed), (e.px != null || e.py != null) && this.setPointer(e.px ?? this.target.x, e.py ?? this.target.y), e.motionShape != null && (this.motion.shape = e.motionShape), e.motionSpeed != null && (this.motion.speed = e.motionSpeed), e.motionSize != null && (this.motion.size = e.motionSize), e.motionPulse != null && (this.motion.pulse = e.motionPulse), e.cursorReplay != null && (this.cursorReplay = !!e.cursorReplay), e.cursorDur != null && (this.cursorDur = e.cursorDur), e.cursorPath !== void 0 && e.cursorPath !== this._paramPathRef && !this._recording && (this._paramPathRef = e.cursorPath, this.cursorPath = Array.isArray(e.cursorPath) ? e.cursorPath : []), e.cursorRecord != null && (e.cursorRecord && !this._recording ? this.startCursorRecord() : !e.cursorRecord && this._recording && this.stopCursorRecord()), this._apply();
|
|
514
|
+
}
|
|
515
|
+
startCursorRecord() {
|
|
516
|
+
this.cursorReplay = !1, this._recBuf = [], this._recStart = performance.now(), this._recording = !0, !this._onCanvasMove && this.canvas && (this._onCanvasMove = (e) => {
|
|
517
|
+
let t = this.canvas.getBoundingClientRect();
|
|
518
|
+
if (!t.width || !t.height) return;
|
|
519
|
+
let n = (e.clientX - t.left) / t.width, r = 1 - (e.clientY - t.top) / t.height;
|
|
520
|
+
this.pushCursorSample(Math.min(1, Math.max(0, n)), Math.min(1, Math.max(0, r)));
|
|
521
|
+
}, this.canvas.addEventListener("pointermove", this._onCanvasMove));
|
|
522
|
+
}
|
|
523
|
+
pushCursorSample(e, t) {
|
|
524
|
+
this._recording && (this._recBuf.push({
|
|
525
|
+
t: performance.now() - this._recStart,
|
|
526
|
+
x: e,
|
|
527
|
+
y: t
|
|
528
|
+
}), this.setPointer(e, t));
|
|
529
|
+
}
|
|
530
|
+
stopCursorRecord() {
|
|
531
|
+
if (!this._recording) return this.cursorPath;
|
|
532
|
+
this._recording = !1, this._onCanvasMove && this.canvas && this.canvas.removeEventListener("pointermove", this._onCanvasMove), this._onCanvasMove = null;
|
|
533
|
+
let e = this._recBuf || [];
|
|
534
|
+
if (this._recBuf = null, e.length >= 2) {
|
|
535
|
+
let t = e[e.length - 1].t || 1;
|
|
536
|
+
this.cursorPath = e.map((e) => ({
|
|
537
|
+
t: e.t / t,
|
|
538
|
+
x: e.x,
|
|
539
|
+
y: e.y
|
|
540
|
+
})), this.cursorDur = t / 1e3;
|
|
541
|
+
}
|
|
542
|
+
return this.onCursorPath?.(this.cursorPath, this.cursorDur), this.cursorPath;
|
|
543
|
+
}
|
|
544
|
+
clearCursorPath() {
|
|
545
|
+
this.cursorPath = [], this.cursorDur = 0, this.cursorReplay = !1, this.onCursorPath?.(this.cursorPath, 0);
|
|
546
|
+
}
|
|
547
|
+
_sampleCursor(e) {
|
|
548
|
+
let t = this.cursorPath, n = 1;
|
|
549
|
+
for (; n < t.length && t[n].t < e;) n += 1;
|
|
550
|
+
let r = t[n - 1], i = t[Math.min(n, t.length - 1)], a = i.t - r.t || 1, o = Math.min(1, Math.max(0, (e - r.t) / a));
|
|
551
|
+
return [r.x + (i.x - r.x) * o, r.y + (i.y - r.y) * o];
|
|
514
552
|
}
|
|
515
553
|
_apply() {
|
|
516
554
|
this.trailMat.uniforms.uRadius.value = this.params.radius, this.trailMat.uniforms.uDecay.value = this.params.decay, this.displayMat.uniforms.uStrength.value = this.params.strength, this.displayMat.uniforms.uRGBShift.value = this.params.rgbShift;
|
|
@@ -553,15 +591,20 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
553
591
|
};
|
|
554
592
|
this._raf = requestAnimationFrame(e);
|
|
555
593
|
}
|
|
556
|
-
frame(e) {
|
|
594
|
+
frame(e, t) {
|
|
557
595
|
this.paused || (this.time += e * this.timeScale);
|
|
558
|
-
let
|
|
559
|
-
if (
|
|
560
|
-
let
|
|
561
|
-
this.target.set(
|
|
596
|
+
let n = !1;
|
|
597
|
+
if (this.cursorReplay && this.cursorPath.length >= 2) {
|
|
598
|
+
let e = t == null ? this.cursorDur ? (this.time % this.cursorDur + this.cursorDur) % this.cursorDur / this.cursorDur : 0 : (t % 1 + 1) % 1, [r, i] = this._sampleCursor(e);
|
|
599
|
+
this.target.set(r, i), this.active = 1, n = !0;
|
|
600
|
+
}
|
|
601
|
+
let r = n ? null : B[this.motion.shape];
|
|
602
|
+
if (r) {
|
|
603
|
+
let [e, t] = r(this.time * this.motion.speed, this.motion.size * .5);
|
|
604
|
+
this.target.set(e, t), this.active = 1;
|
|
562
605
|
}
|
|
563
|
-
let
|
|
564
|
-
if (this.trailMat.uniforms.uRadius.value = this.params.radius *
|
|
606
|
+
let i = this.motion.pulse ? 1 + this.motion.pulse * Math.sin(this.time * ee * .5 * this.motion.speed) : 1;
|
|
607
|
+
if (this.trailMat.uniforms.uRadius.value = this.params.radius * i, !this.paused && e > 0 || this.active > .001) {
|
|
565
608
|
this.eased.lerp(this.target, .12 * this.timeScale), this.quad.material = this.trailMat, this.trailMat.uniforms.uPrev.value = this.rtA.texture, this.trailMat.uniforms.uMouse.value.copy(this.eased), this.trailMat.uniforms.uActive.value = this.active, this.renderer.setRenderTarget(this.rtB), this.renderer.render(this.scene, this.camera);
|
|
566
609
|
let e = this.rtA;
|
|
567
610
|
this.rtA = this.rtB, this.rtB = e, this.active *= .9;
|
|
@@ -569,7 +612,7 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
569
612
|
this.renderer.setRenderTarget(null), this.texture ? (this.quad.material = this.displayMat, this.displayMat.uniforms.uTrail.value = this.rtA.texture, this.renderer.render(this.scene, this.camera)) : this.renderer.clear();
|
|
570
613
|
}
|
|
571
614
|
dispose() {
|
|
572
|
-
this._raf && cancelAnimationFrame(this._raf), this._raf = null, this.rtA.dispose(), this.rtB.dispose(), this.trailMat.dispose(), this.displayMat.dispose(), this.geo.dispose(), this.texture && this.texture.dispose(), this.renderer.dispose();
|
|
615
|
+
this._onCanvasMove && this.canvas && this.canvas.removeEventListener("pointermove", this._onCanvasMove), this._onCanvasMove = null, this._raf && cancelAnimationFrame(this._raf), this._raf = null, this.rtA.dispose(), this.rtB.dispose(), this.trailMat.dispose(), this.displayMat.dispose(), this.geo.dispose(), this.texture && this.texture.dispose(), this.renderer.dispose();
|
|
573
616
|
}
|
|
574
617
|
}, K = {
|
|
575
618
|
glass: 0,
|
|
@@ -582,15 +625,15 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
582
625
|
trails: T,
|
|
583
626
|
scan: A,
|
|
584
627
|
slitscan: I,
|
|
585
|
-
disco:
|
|
628
|
+
disco: z,
|
|
586
629
|
distort: G,
|
|
587
630
|
lens: class {
|
|
588
631
|
constructor(t, { autoLoop: r = !1 } = {}) {
|
|
589
|
-
this.canvas = t, this.autoLoop = r, this.playing = !0, this.time = 0, this.flow = 1, this._raf = null, this.last = performance.now(), this.renderer = new
|
|
632
|
+
this.canvas = t, this.autoLoop = r, this.playing = !0, this.time = 0, this.flow = 1, this._raf = null, this.last = performance.now(), this.renderer = new s({
|
|
590
633
|
canvas: t,
|
|
591
634
|
antialias: !0,
|
|
592
635
|
preserveDrawingBuffer: !0
|
|
593
|
-
}), this.scene = new
|
|
636
|
+
}), this.scene = new o(), this.cam = new d(), this.uniforms = {
|
|
594
637
|
uPhoto: { value: null },
|
|
595
638
|
uHasPhoto: { value: 0 },
|
|
596
639
|
uTime: { value: 0 },
|
|
@@ -601,26 +644,26 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
601
644
|
uFrost: { value: 0 },
|
|
602
645
|
uSheen: { value: .5 },
|
|
603
646
|
uLightAngle: { value: Math.PI * .25 },
|
|
604
|
-
uTint: { value: new
|
|
647
|
+
uTint: { value: new h(1, 1, 1) },
|
|
605
648
|
uTintAmt: { value: 0 },
|
|
606
649
|
uReflect: { value: 0 },
|
|
607
650
|
uFit: { value: 0 },
|
|
608
651
|
uZoom: { value: 1 },
|
|
609
|
-
uOffset: { value: new
|
|
610
|
-
uBg: { value: new
|
|
652
|
+
uOffset: { value: new c(0, 0) },
|
|
653
|
+
uBg: { value: new h(.02, .025, .04) },
|
|
611
654
|
uShape: { value: 0 },
|
|
612
655
|
uSize: { value: .45 },
|
|
613
656
|
uRadius: { value: .08 },
|
|
614
657
|
uEdge: { value: .02 },
|
|
615
658
|
uMagnify: { value: .1 },
|
|
616
|
-
uGlassPos: { value: new
|
|
659
|
+
uGlassPos: { value: new c(.5, .5) },
|
|
617
660
|
uViewAspect: { value: 1 },
|
|
618
661
|
uImgAspect: { value: 1 }
|
|
619
|
-
}, this.mat = new
|
|
662
|
+
}, this.mat = new a({
|
|
620
663
|
vertexShader: q,
|
|
621
664
|
fragmentShader: J,
|
|
622
665
|
uniforms: this.uniforms
|
|
623
|
-
}), this.geo = new e(2, 2), this.scene.add(new
|
|
666
|
+
}), this.geo = new e(2, 2), this.scene.add(new n(this.geo, this.mat)), this.autoLoop && this.start();
|
|
624
667
|
}
|
|
625
668
|
resize(e, t) {
|
|
626
669
|
!this.renderer || e < 1 || t < 1 || (this.renderer.setPixelRatio(Math.min(2, window.devicePixelRatio || 1)), this.renderer.setSize(e, t, !1), this.uniforms.uViewAspect.value = e / t);
|
|
@@ -631,8 +674,8 @@ var D = "\n uniform sampler2D uImage;\n uniform float uDisplace;\n varying ve
|
|
|
631
674
|
this.uniforms.uHasPhoto.value = 0;
|
|
632
675
|
return;
|
|
633
676
|
}
|
|
634
|
-
let
|
|
635
|
-
|
|
677
|
+
let n = new g(e);
|
|
678
|
+
n.minFilter = t, n.magFilter = t, n.wrapS = n.wrapT = p, this.tex && this.tex.dispose(), this.tex = n, this.uniforms.uPhoto.value = n, this.uniforms.uHasPhoto.value = 1, this.uniforms.uImgAspect.value = (e.width || 1) / (e.height || 1);
|
|
636
679
|
}
|
|
637
680
|
touchSource() {
|
|
638
681
|
this.tex && (this.tex.needsUpdate = !0);
|
|
@@ -704,15 +747,20 @@ function $(e, t) {
|
|
|
704
747
|
function te(e, t, n) {
|
|
705
748
|
t.setParams(n);
|
|
706
749
|
}
|
|
707
|
-
function ne(e, t, { dt: n }) {
|
|
708
|
-
t.frame(n);
|
|
750
|
+
function ne(e, t, { dt: n, u: r }) {
|
|
751
|
+
t.frame(n, r);
|
|
709
752
|
}
|
|
710
753
|
function re(e) {
|
|
711
|
-
if (e)
|
|
754
|
+
if (!e) return;
|
|
755
|
+
let t = e.renderer;
|
|
756
|
+
try {
|
|
712
757
|
typeof e.dispose == "function" ? e.dispose() : typeof e.destroy == "function" && e.destroy();
|
|
713
758
|
} catch (e) {
|
|
714
759
|
console.warn("[gl] engine dispose failed (ignored):", e?.message ?? e);
|
|
715
760
|
}
|
|
761
|
+
try {
|
|
762
|
+
t?.forceContextLoss?.();
|
|
763
|
+
} catch {}
|
|
716
764
|
}
|
|
717
765
|
//#endregion
|
|
718
766
|
export { te as applyParams, X as createEngine, re as destroyEngine, ne as driveEngine, Z as setCameraDrag, Q as setSource, $ as touchSource };
|