kmcom-nuxt-layers 1.7.9 → 2.1.6
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/layers/animations/nuxt.config.ts +17 -0
- package/layers/animations/package.json +6 -0
- package/layers/animations/tsconfig.json +7 -0
- package/layers/canvas/app/components/ShaderCanvas.vue +125 -0
- package/layers/{shader → canvas}/app/composables/useRendererCapabilities.ts +10 -2
- package/layers/{shader → canvas}/app/composables/useShaderTime.ts +3 -3
- package/layers/canvas/app/types/renderer.ts +50 -0
- package/layers/canvas/nuxt.config.ts +189 -0
- package/layers/canvas/package.json +22 -0
- package/layers/canvas/tsconfig.json +7 -0
- package/layers/content/app/components/Blog/Article.vue +12 -6
- package/layers/content/app/components/Blog/Card.vue +24 -24
- package/layers/content/app/components/Blog/List.vue +8 -11
- package/layers/content/app/components/Gallery/AmbientImage.vue +15 -15
- package/layers/content/app/components/Gallery/Card.vue +19 -19
- package/layers/content/app/components/Gallery/Detail.vue +29 -20
- package/layers/content/app/components/Gallery/Grid.vue +8 -11
- package/layers/content/app/components/Gallery/ImageDetail.vue +18 -17
- package/layers/content/app/components/Gallery/ImagePage.vue +8 -9
- package/layers/content/app/components/Gallery/Lightbox.vue +38 -33
- package/layers/content/app/components/Gallery/Page.vue +8 -8
- package/layers/content/app/components/Gallery/SlugPage.vue +7 -8
- package/layers/content/app/components/NuxtContent/Detail.vue +29 -27
- package/layers/content/app/components/NuxtContent/List.vue +10 -9
- package/layers/content/app/components/NuxtContent/Renderer.vue +4 -4
- package/layers/content/app/components/NuxtContent/Surround.vue +3 -3
- package/layers/content/app/components/NuxtContent/Toc.vue +5 -5
- package/layers/content/app/components/Portfolio/Card.vue +17 -17
- package/layers/content/app/components/Portfolio/ColorPalette.vue +11 -11
- package/layers/content/app/components/Portfolio/Detail.vue +9 -13
- package/layers/content/app/components/Portfolio/ItemPage.vue +8 -9
- package/layers/content/app/components/Portfolio/List.vue +10 -13
- package/layers/content/app/components/Portfolio/Page.vue +8 -8
- package/layers/content/app/components/Portfolio/Typography.vue +4 -4
- package/layers/content/app/components/content/Figure.vue +14 -14
- package/layers/content/app/composables/createPortfolioComposables.ts +1 -0
- package/layers/content/app/composables/useCollectionItem.ts +4 -1
- package/layers/content/app/composables/useCollectionSurround.ts +1 -0
- package/layers/content/app/composables/useContentPage.ts +1 -0
- package/layers/content/app/composables/useGalleryItems.ts +1 -0
- package/layers/content/app/composables/usePortfolioItems.ts +1 -0
- package/layers/content/app/types/app-config.d.ts +1 -1
- package/layers/content/app/types/content.ts +27 -30
- package/layers/content/nuxt.config.ts +4 -3
- package/layers/content/package.json +4 -4
- package/layers/core/app/components/DiagnosticsPage.vue +203 -203
- package/layers/core/app/components/ErrorBoundary.vue +51 -49
- package/layers/core/app/components/LoadingScreen.vue +112 -111
- package/layers/core/app/composables/useBrowser.ts +2 -1
- package/layers/core/app/composables/useCache.ts +4 -2
- package/layers/core/app/composables/useErrorLog.ts +7 -10
- package/layers/core/app/composables/useFeatures.ts +4 -2
- package/layers/core/app/composables/useLoading.ts +1 -0
- package/layers/core/app/composables/useNetworkInfo.ts +1 -0
- package/layers/core/app/composables/usePWAInfo.ts +4 -3
- package/layers/core/app/composables/useRendering.ts +1 -0
- package/layers/core/app/composables/useScreen.ts +1 -0
- package/layers/core/app/composables/useScrollGuard.ts +2 -1
- package/layers/core/app/pages/[...slug].vue +99 -99
- package/layers/core/app/plugins/error-handler.ts +1 -1
- package/layers/core/app/plugins/feature-detection.client.ts +2 -1
- package/layers/core/app/plugins/init.ts +8 -19
- package/layers/core/app/plugins/loading.client.ts +4 -2
- package/layers/core/app/plugins/scroll-guard.client.ts +4 -4
- package/layers/core/app/types/app-config.d.ts +5 -1
- package/layers/core/app/types/detection.ts +8 -8
- package/layers/core/app/types/index.ts +5 -4
- package/layers/core/app/types/loading.ts +3 -3
- package/layers/core/app/types/runtime-config.ts +2 -2
- package/layers/core/app/types/scroll-guard.ts +2 -2
- package/layers/core/app/types/site.ts +43 -0
- package/layers/core/app/utils/helpers.ts +4 -0
- package/layers/core/nuxt.config.ts +1 -0
- package/layers/core/package.json +1 -1
- package/layers/feeds/app/app.config.ts +23 -0
- package/layers/feeds/app/assets/css/feeds.css +66 -0
- package/layers/feeds/app/plugins/feed-head.ts +73 -0
- package/layers/feeds/nuxt.config.ts +36 -0
- package/layers/feeds/package.json +23 -0
- package/layers/feeds/tsconfig.json +7 -0
- package/layers/forms/app/components/Form/Contact.vue +1 -0
- package/layers/forms/app/components/Form/Field.vue +70 -74
- package/layers/forms/app/composables/useFormSchema.ts +2 -0
- package/layers/forms/app/config/fields.ts +1 -0
- package/layers/forms/app/types/app-config.d.ts +1 -1
- package/layers/forms/app/types/fields.ts +1 -1
- package/layers/forms/nuxt.config.ts +4 -9
- package/layers/forms/package.json +4 -9
- package/layers/layout/app/assets/css/layout/grids.css +12 -12
- package/layers/layout/app/assets/css/layout/modes/fluid.css +10 -10
- package/layers/layout/app/components/Layout/Container.vue +34 -34
- package/layers/layout/app/components/Layout/Grid/Debug.vue +55 -55
- package/layers/layout/app/components/Layout/Grid/Item.vue +239 -231
- package/layers/layout/app/components/Layout/Main.vue +27 -23
- package/layers/layout/app/components/Layout/Page/Container.vue +71 -67
- package/layers/layout/app/components/Layout/Page/Header.vue +22 -21
- package/layers/layout/app/components/Layout/Page/index.vue +1 -0
- package/layers/layout/app/components/Layout/Section/Gallery.vue +49 -48
- package/layers/layout/app/components/Layout/Section/Grid.vue +29 -29
- package/layers/layout/app/components/Layout/Section/Hero.vue +31 -29
- package/layers/layout/app/components/Layout/Section/Sidebar.vue +48 -48
- package/layers/layout/app/components/Layout/Section/Split.vue +28 -28
- package/layers/layout/app/components/Layout/Section/Stack.vue +39 -37
- package/layers/layout/app/components/Layout/Section/Title.vue +21 -20
- package/layers/layout/app/composables/GridPlacement.ts +1 -1
- package/layers/layout/app/composables/useGridConfig.ts +2 -1
- package/layers/layout/app/types/app-config.d.ts +2 -1
- package/layers/layout/app/types/layouts.ts +4 -4
- package/layers/layout/nuxt.config.ts +4 -1
- package/layers/mailer/nuxt.config.ts +26 -0
- package/layers/mailer/package.json +15 -0
- package/layers/mailer/tsconfig.json +7 -0
- package/layers/motion/app/components/Motion/index.vue +5 -5
- package/layers/motion/nuxt.config.ts +6 -22
- package/layers/motion/package.json +0 -5
- package/layers/navigation/app/app.config.ts +38 -0
- package/layers/navigation/app/assets/css/navigation.css +3 -0
- package/layers/navigation/app/components/Links/Group.vue +49 -0
- package/layers/navigation/app/components/Links/Named.vue +33 -0
- package/layers/navigation/app/components/Mast/Footer.vue +13 -0
- package/layers/{ui → navigation}/app/components/Mast/Header.vue +2 -2
- package/layers/{ui → navigation}/app/components/Mast/Nav.vue +2 -2
- package/layers/navigation/app/components/Mast/NavModal.vue +76 -0
- package/layers/{ui → navigation}/app/composables/mastNav.ts +7 -4
- package/layers/{ui → navigation}/app/composables/toast.ts +1 -0
- package/layers/{ui → navigation}/app/composables/useSite.ts +1 -0
- package/layers/navigation/app/types/nav.ts +11 -0
- package/layers/{ui → navigation}/app/utils/createModal.ts +2 -1
- package/layers/navigation/nuxt.config.ts +19 -0
- package/layers/navigation/package.json +6 -0
- package/layers/navigation/tsconfig.json +7 -0
- package/layers/page-transitions/app/app.config.ts +15 -0
- package/layers/page-transitions/app/composables/usePageTransition.ts +32 -0
- package/layers/page-transitions/app/plugins/page-transitions.client.ts +14 -0
- package/layers/page-transitions/nuxt.config.ts +17 -0
- package/layers/page-transitions/package.json +6 -0
- package/layers/page-transitions/tsconfig.json +7 -0
- package/layers/routing/app/composables/{useFeatures.ts → useFeatureFlags.ts} +1 -1
- package/layers/routing/app/composables/useRoutingConfig.ts +5 -6
- package/layers/routing/app/middleware/01.maintenance.global.ts +1 -1
- package/layers/routing/app/middleware/02.governance.global.ts +2 -2
- package/layers/routing/app/plugins/feature-flags.client.ts +4 -4
- package/layers/routing/app/plugins/scroll-routing.client.ts +4 -3
- package/layers/routing/app/types/app-config.d.ts +2 -1
- package/layers/routing/app/types/route-meta.d.ts +1 -1
- package/layers/routing/app/types/routing.ts +5 -2
- package/layers/routing/app/utils/resolveRoute.ts +2 -2
- package/layers/routing/nuxt.config.ts +6 -2
- package/layers/scripts/app/app.config.ts +44 -0
- package/layers/scripts/app/composables/useAnalytics.ts +49 -0
- package/layers/scripts/app/composables/useGtm.ts +21 -0
- package/layers/scripts/app/composables/useScriptLoader.ts +31 -0
- package/layers/scripts/app/composables/useScriptsConsent.ts +23 -0
- package/layers/scripts/app/composables/useYoutubeEmbed.ts +14 -0
- package/layers/scripts/nuxt.config.ts +22 -0
- package/layers/scripts/package.json +14 -0
- package/layers/scripts/tsconfig.json +7 -0
- package/layers/{motion/app/types/app-config.d.ts → scroll/app/app.config.ts} +16 -1
- package/layers/scroll/app/components/Motion/HorizontalScroll.vue +61 -0
- package/layers/scroll/app/components/Motion/Parallax.vue +76 -0
- package/layers/scroll/app/components/Motion/PinnedSection.vue +77 -0
- package/layers/scroll/app/components/Motion/ScrollLink.vue +50 -0
- package/layers/scroll/app/components/Motion/ScrollProgress.vue +85 -0
- package/layers/scroll/app/components/Motion/ScrollScene.vue +121 -0
- package/layers/{motion → scroll}/app/components/Motion/ScrollStats.vue +51 -50
- package/layers/scroll/app/components/Motion/ScrollStep.vue +44 -0
- package/layers/{motion → scroll}/app/composables/useGsap.ts +0 -6
- package/layers/{motion → scroll}/app/composables/useScrollSteps.ts +2 -5
- package/layers/{motion → scroll}/app/composables/useSectionProgress.ts +14 -7
- package/layers/{motion → scroll}/app/composables/useSmoothScroll.ts +6 -37
- package/layers/{motion → scroll}/app/plugins/locomotive-scroll.client.ts +3 -2
- package/layers/scroll/nuxt.config.ts +33 -0
- package/layers/scroll/package.json +11 -0
- package/layers/scroll/tsconfig.json +7 -0
- package/layers/seo/app/app.config.ts +30 -0
- package/layers/seo/app/composables/useSeoConfig.ts +14 -0
- package/layers/seo/nuxt.config.ts +34 -0
- package/layers/seo/package.json +14 -0
- package/layers/seo/tsconfig.json +7 -0
- package/layers/shader/app/components/Effect/Bloom.vue +2 -2
- package/layers/shader/app/components/Effect/ChromaticAberration.vue +2 -2
- package/layers/shader/app/components/Effect/PostProcessing.vue +14 -10
- package/layers/shader/app/components/Material/AmbientAurora.client.vue +162 -158
- package/layers/shader/app/components/Material/AmbientFlow.client.vue +165 -161
- package/layers/shader/app/components/Material/AmbientGradientMesh.client.vue +179 -162
- package/layers/shader/app/components/Material/AmbientNebula.client.vue +167 -163
- package/layers/shader/app/components/Material/AmbientOcean.client.vue +154 -150
- package/layers/shader/app/components/Material/Fresnel.client.vue +78 -75
- package/layers/shader/app/components/Material/Gradient.client.vue +175 -173
- package/layers/shader/app/components/Material/Image.client.vue +228 -225
- package/layers/shader/app/components/Material/Node.client.vue +66 -63
- package/layers/shader/app/components/Material/Noise.client.vue +128 -124
- package/layers/shader/app/components/Mesh/Plane.vue +20 -18
- package/layers/shader/app/components/Node/Color.client.vue +47 -45
- package/layers/shader/app/components/Node/Fresnel.client.vue +47 -47
- package/layers/shader/app/components/Node/Gradient.client.vue +120 -70
- package/layers/shader/app/components/Node/Mix.client.vue +41 -39
- package/layers/shader/app/components/Node/Noise.client.vue +91 -83
- package/layers/shader/app/components/Pipeline/ACESTonemap.client.vue +7 -10
- package/layers/shader/app/components/Pipeline/AddBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/AgedFilm.client.vue +61 -40
- package/layers/shader/app/components/Pipeline/Aurora.client.vue +92 -56
- package/layers/shader/app/components/Pipeline/BilinearGradient.client.vue +65 -34
- package/layers/shader/app/components/Pipeline/BillowNoise.client.vue +56 -32
- package/layers/shader/app/components/Pipeline/BrightnessContrast.client.vue +36 -20
- package/layers/shader/app/components/Pipeline/CellularNoise.client.vue +55 -31
- package/layers/shader/app/components/Pipeline/ChannelMixer.client.vue +62 -34
- package/layers/shader/app/components/Pipeline/ChebyshevNoiseField.client.vue +77 -50
- package/layers/shader/app/components/Pipeline/Checkerboard.client.vue +50 -31
- package/layers/shader/app/components/Pipeline/ChromaticAberration.client.vue +49 -33
- package/layers/shader/app/components/Pipeline/ChromaticScreenWaves.client.vue +61 -36
- package/layers/shader/app/components/Pipeline/Circle.client.vue +53 -30
- package/layers/shader/app/components/Pipeline/Clouds.client.vue +86 -48
- package/layers/shader/app/components/Pipeline/ColorBurnBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/ColorDodgeBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/ColourRamp.client.vue +76 -46
- package/layers/shader/app/components/Pipeline/ComplexPlaneField.client.vue +80 -50
- package/layers/shader/app/components/Pipeline/ConicGradient.client.vue +46 -28
- package/layers/shader/app/components/Pipeline/CosinePalette.client.vue +80 -53
- package/layers/shader/app/components/Pipeline/CoverageAlpha.client.vue +12 -14
- package/layers/shader/app/components/Pipeline/Cross.client.vue +66 -37
- package/layers/shader/app/components/Pipeline/CurlNoise.client.vue +58 -35
- package/layers/shader/app/components/Pipeline/DarkenBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DayNightCycle.client.vue +65 -39
- package/layers/shader/app/components/Pipeline/Desaturate.client.vue +23 -16
- package/layers/shader/app/components/Pipeline/DiagonalGradient.client.vue +50 -29
- package/layers/shader/app/components/Pipeline/DiamondGradient.client.vue +47 -29
- package/layers/shader/app/components/Pipeline/DifferenceBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DivideBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DomainWarpedNoise.client.vue +79 -37
- package/layers/shader/app/components/Pipeline/Dots.client.vue +70 -34
- package/layers/shader/app/components/Pipeline/DuoTone.client.vue +40 -26
- package/layers/shader/app/components/Pipeline/ExclusionBlend.client.vue +38 -19
- package/layers/shader/app/components/Pipeline/ExponentialFog.client.vue +52 -35
- package/layers/shader/app/components/Pipeline/Exposure.client.vue +22 -16
- package/layers/shader/app/components/Pipeline/FBMNoise.client.vue +62 -39
- package/layers/shader/app/components/Pipeline/FilmBurn.client.vue +60 -38
- package/layers/shader/app/components/Pipeline/FilmGrain.client.vue +53 -31
- package/layers/shader/app/components/Pipeline/FisheyeRay.client.vue +39 -28
- package/layers/shader/app/components/Pipeline/Flame.client.vue +59 -35
- package/layers/shader/app/components/Pipeline/FocalGradient.client.vue +56 -33
- package/layers/shader/app/components/Pipeline/Gamma.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/GodRays.client.vue +76 -42
- package/layers/shader/app/components/Pipeline/GradientNoise.client.vue +57 -32
- package/layers/shader/app/components/Pipeline/Grain.client.vue +84 -47
- package/layers/shader/app/components/Pipeline/Grid.client.vue +56 -33
- package/layers/shader/app/components/Pipeline/Halation.client.vue +52 -34
- package/layers/shader/app/components/Pipeline/Halftone.client.vue +34 -23
- package/layers/shader/app/components/Pipeline/HardLightBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/Haze.client.vue +57 -36
- package/layers/shader/app/components/Pipeline/Hexagon.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/Hue.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/Invert.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/LensFlare.client.vue +56 -37
- package/layers/shader/app/components/Pipeline/LightenBlend.client.vue +31 -19
- package/layers/shader/app/components/Pipeline/LinearGradient.client.vue +36 -28
- package/layers/shader/app/components/Pipeline/LinearGradient4.client.vue +65 -43
- package/layers/shader/app/components/Pipeline/LinearToSRGB.client.vue +26 -20
- package/layers/shader/app/components/Pipeline/Marble.client.vue +97 -57
- package/layers/shader/app/components/Pipeline/MixBlend.client.vue +45 -35
- package/layers/shader/app/components/Pipeline/MonochromeTint.client.vue +40 -25
- package/layers/shader/app/components/Pipeline/MultiplyBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/NoisyGradient.client.vue +83 -42
- package/layers/shader/app/components/Pipeline/NoisyGradientBlend.client.vue +141 -81
- package/layers/shader/app/components/Pipeline/OverlayBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/PaperTexture.client.vue +47 -30
- package/layers/shader/app/components/Pipeline/Polygon.client.vue +74 -37
- package/layers/shader/app/components/Pipeline/Posterise.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/RadialGradient.client.vue +45 -30
- package/layers/shader/app/components/Pipeline/RayAutoOrbit.client.vue +43 -30
- package/layers/shader/app/components/Pipeline/RayMouseOrbit.client.vue +60 -47
- package/layers/shader/app/components/Pipeline/RayRotateX.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayRotateY.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayRotateZ.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayTiltBasis.client.vue +55 -34
- package/layers/shader/app/components/Pipeline/RaymarchTunnel.client.vue +132 -88
- package/layers/shader/app/components/Pipeline/Rectangle.client.vue +78 -37
- package/layers/shader/app/components/Pipeline/ReinhardTonemap.client.vue +12 -14
- package/layers/shader/app/components/Pipeline/RidgedNoise.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/Ring.client.vue +69 -34
- package/layers/shader/app/components/Pipeline/RingField.client.vue +63 -43
- package/layers/shader/app/components/Pipeline/RisographGrain.client.vue +66 -32
- package/layers/shader/app/components/Pipeline/RotatedGradientBlend.client.vue +73 -48
- package/layers/shader/app/components/Pipeline/SDFColourMask.client.vue +31 -25
- package/layers/shader/app/components/Pipeline/SDFRadialMask.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/SRGBToLinear.client.vue +25 -20
- package/layers/shader/app/components/Pipeline/Saturation.client.vue +22 -16
- package/layers/shader/app/components/Pipeline/Scanlines.client.vue +42 -26
- package/layers/shader/app/components/Pipeline/ScreenBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/ShaderDebugger.client.vue +58 -45
- package/layers/shader/app/components/Pipeline/SimplexNoise.client.vue +59 -37
- package/layers/shader/app/components/Pipeline/SkyAtmosphere.client.vue +87 -54
- package/layers/shader/app/components/Pipeline/SoftLightBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/SolidColour.client.vue +24 -16
- package/layers/shader/app/components/Pipeline/SplitTone.client.vue +58 -34
- package/layers/shader/app/components/Pipeline/Star.client.vue +73 -37
- package/layers/shader/app/components/Pipeline/Starfield.client.vue +68 -34
- package/layers/shader/app/components/Pipeline/Stripes.client.vue +64 -36
- package/layers/shader/app/components/Pipeline/SubtractBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/TanhTonemap.client.vue +25 -19
- package/layers/shader/app/components/Pipeline/Threshold.client.vue +23 -17
- package/layers/shader/app/components/Pipeline/Tint.client.vue +36 -25
- package/layers/shader/app/components/Pipeline/Triangle.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/UVAspectCorrect.client.vue +5 -10
- package/layers/shader/app/components/Pipeline/UVBreath.client.vue +44 -31
- package/layers/shader/app/components/Pipeline/UVBulge.client.vue +35 -21
- package/layers/shader/app/components/Pipeline/UVClamp.client.vue +14 -14
- package/layers/shader/app/components/Pipeline/UVColumnOffset.client.vue +36 -23
- package/layers/shader/app/components/Pipeline/UVFlipX.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFlipXY.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFlipY.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFractBand.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/UVMousePull.client.vue +41 -33
- package/layers/shader/app/components/Pipeline/UVNoiseRotate.client.vue +65 -46
- package/layers/shader/app/components/Pipeline/UVNoiseWarp.client.vue +49 -30
- package/layers/shader/app/components/Pipeline/UVOrbit.client.vue +37 -29
- package/layers/shader/app/components/Pipeline/UVParallax.client.vue +41 -33
- package/layers/shader/app/components/Pipeline/UVPixelate.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/UVPulse.client.vue +41 -28
- package/layers/shader/app/components/Pipeline/UVRipple.client.vue +53 -29
- package/layers/shader/app/components/Pipeline/UVRotate.client.vue +40 -32
- package/layers/shader/app/components/Pipeline/UVScale.client.vue +33 -25
- package/layers/shader/app/components/Pipeline/UVScroll.client.vue +26 -22
- package/layers/shader/app/components/Pipeline/UVScrollX.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/UVScrollY.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/UVShear.client.vue +33 -20
- package/layers/shader/app/components/Pipeline/UVSineWarpXY.client.vue +58 -40
- package/layers/shader/app/components/Pipeline/UVSwapAxes.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVTile.client.vue +26 -22
- package/layers/shader/app/components/Pipeline/UVTwirl.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/UVWarp.client.vue +44 -25
- package/layers/shader/app/components/Pipeline/VHSBleed.client.vue +63 -43
- package/layers/shader/app/components/Pipeline/ValueNoise.client.vue +57 -32
- package/layers/shader/app/components/Pipeline/Vibrance.client.vue +25 -19
- package/layers/shader/app/components/Pipeline/Vignette.client.vue +35 -24
- package/layers/shader/app/components/Pipeline/VoronoiEdges.client.vue +66 -38
- package/layers/shader/app/components/Pipeline/Water.client.vue +78 -39
- package/layers/shader/app/components/Pipeline/WaveBendLayer.client.vue +74 -46
- package/layers/shader/app/components/Pipeline/WaveColourLayer.client.vue +76 -43
- package/layers/shader/app/components/Pipeline/WhiteBalance.client.vue +38 -27
- package/layers/shader/app/components/Pipeline/Wood.client.vue +85 -50
- package/layers/shader/app/components/Preset/Aurora.client.vue +69 -52
- package/layers/shader/app/components/Preset/Flow.client.vue +63 -47
- package/layers/shader/app/components/Preset/GradientMesh.client.vue +63 -47
- package/layers/shader/app/components/Preset/Nebula.client.vue +65 -47
- package/layers/shader/app/components/Preset/Ocean.client.vue +64 -47
- package/layers/shader/app/components/Preset/ThemeAurora.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeBubble.client.vue +108 -71
- package/layers/shader/app/components/Preset/ThemeFlow.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeGradient.client.vue +108 -71
- package/layers/shader/app/components/Preset/ThemeLavaLamp.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemePlasma.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeWave.client.vue +107 -70
- package/layers/shader/app/components/Shader/Background.client.vue +169 -163
- package/layers/shader/app/components/Shader/Debug.vue +45 -40
- package/layers/shader/app/components/Shader/Host.client.vue +120 -121
- package/layers/shader/app/components/Shader/Material.client.vue +42 -36
- package/layers/shader/app/components/Shader/Pipeline.client.vue +55 -46
- package/layers/shader/app/components/Shader/PipelineContext.vue +12 -12
- package/layers/shader/app/components/Shader/Runtime.client.vue +42 -37
- package/layers/shader/app/composables/useAmbientMaterials.ts +316 -105
- package/layers/shader/app/composables/useCSSColourUniform.ts +7 -6
- package/layers/shader/app/composables/useCSSFloatUniform.ts +4 -5
- package/layers/shader/app/composables/useMousePosition.ts +1 -1
- package/layers/shader/app/composables/useShader.ts +5 -3
- package/layers/shader/app/composables/useShaderColor.ts +8 -1
- package/layers/shader/app/composables/useShaderFloat.ts +3 -1
- package/layers/shader/app/composables/useShaderGraph.ts +6 -3
- package/layers/shader/app/composables/useShaderPerf.ts +2 -3
- package/layers/shader/app/composables/useShaderPipeline.ts +14 -6
- package/layers/shader/app/composables/useShaderRuntime.ts +7 -4
- package/layers/shader/app/composables/useShaderVec2.ts +4 -0
- package/layers/shader/app/composables/useSunDirectionUniform.ts +7 -6
- package/layers/shader/app/composables/useTSLNodes.ts +1 -0
- package/layers/shader/app/composables/useThemeColors.ts +14 -10
- package/layers/shader/app/composables/useUniforms.ts +5 -2
- package/layers/shader/app/plugins/shader.client.ts +3 -2
- package/layers/shader/app/shaders/common/blend.ts +3 -0
- package/layers/shader/app/shaders/common/complex.ts +4 -5
- package/layers/shader/app/shaders/common/effects.ts +10 -6
- package/layers/shader/app/shaders/common/grain.ts +4 -0
- package/layers/shader/app/shaders/common/lighting.ts +4 -1
- package/layers/shader/app/shaders/common/math.ts +3 -0
- package/layers/shader/app/shaders/common/noise.ts +7 -4
- package/layers/shader/app/shaders/common/noiseHelpers.ts +2 -0
- package/layers/shader/app/shaders/common/palette.ts +6 -1
- package/layers/shader/app/shaders/common/patterns.ts +7 -4
- package/layers/shader/app/shaders/common/sdf.ts +3 -1
- package/layers/shader/app/shaders/common/shapes.ts +3 -0
- package/layers/shader/app/shaders/common/tonemapping.ts +2 -0
- package/layers/shader/app/shaders/common/uv.ts +8 -1
- package/layers/shader/app/shaders/createMaterial.ts +6 -2
- package/layers/shader/app/shaders/layers/aurora.ts +6 -3
- package/layers/shader/app/shaders/layers/meshGradient.ts +6 -3
- package/layers/shader/app/shaders/layers/paperShading.ts +6 -2
- package/layers/shader/app/shaders/layers/shaderGradient.ts +5 -0
- package/layers/shader/app/shaders/layers/stripe.ts +6 -3
- package/layers/shader/app/shaders/types.ts +1 -0
- package/layers/shader/app/types/app-config.d.ts +1 -1
- package/layers/shader/app/types/index.ts +4 -4
- package/layers/shader/app/types/materials.ts +5 -4
- package/layers/shader/app/types/renderer.ts +1 -50
- package/layers/shader/app/types/tsl.ts +4 -3
- package/layers/shader/app/types/uniforms.ts +3 -2
- package/layers/shader/app/utils/tsl/animation.ts +2 -0
- package/layers/shader/app/utils/tsl/color.ts +5 -2
- package/layers/shader/app/utils/tsl/math.ts +1 -0
- package/layers/shader/app/utils/tsl/noise.ts +2 -0
- package/layers/shader/app/utils/tsl/oklch.ts +2 -0
- package/layers/shader/app/utils/tsl/patterns.ts +2 -0
- package/layers/shader/app/utils/tsl/tween.ts +4 -2
- package/layers/shader/app/utils/tsl/uv.ts +2 -0
- package/layers/shader/nuxt.config.ts +8 -115
- package/layers/shader/package.json +3 -9
- package/layers/theme/app/assets/css/theme.css +2 -2
- package/layers/theme/app/components/ThemePicker/AccentButton.vue +32 -30
- package/layers/theme/app/components/ThemePicker/Colors.vue +6 -5
- package/layers/theme/app/components/ThemePicker/Menu.vue +23 -23
- package/layers/theme/app/composables/useAccentColor.ts +2 -1
- package/layers/theme/app/composables/useThemeContrast.ts +1 -1
- package/layers/theme/app/composables/useThemeMotion.ts +1 -1
- package/layers/theme/app/composables/useThemeTransparency.ts +1 -4
- package/layers/theme/app/plugins/theme.client.ts +33 -15
- package/layers/theme/app/types/app-config.d.ts +3 -2
- package/layers/theme/app/types/theme.ts +1 -1
- package/layers/theme/nuxt.config.ts +4 -1
- package/layers/transitions/app/components/Motion/Transition.vue +76 -0
- package/layers/transitions/nuxt.config.ts +19 -0
- package/layers/transitions/package.json +6 -0
- package/layers/transitions/tsconfig.json +7 -0
- package/layers/typography/app/components/Typography/CodeBlock.vue +44 -0
- package/layers/typography/app/components/Typography/Headline.vue +90 -0
- package/layers/typography/app/components/Typography/HeadlineScreen.vue +75 -0
- package/layers/typography/app/components/Typography/QuoteBlock.vue +21 -0
- package/layers/{ui → typography}/app/components/Typography/TextStroke.vue +33 -32
- package/layers/typography/app/components/Typography/index.vue +54 -0
- package/layers/{ui → typography}/app/composables/typography.ts +1 -0
- package/layers/{ui → typography}/app/types/typography.ts +1 -1
- package/layers/typography/nuxt.config.ts +17 -0
- package/layers/typography/package.json +6 -0
- package/layers/typography/tsconfig.json +7 -0
- package/layers/ui/app/assets/css/ui.css +0 -20
- package/layers/ui/nuxt.config.ts +5 -21
- package/layers/visual/app/app.config.ts +115 -0
- package/layers/visual/app/assets/css/visual.css +15 -0
- package/layers/visual/app/components/Accent/Blob.vue +32 -0
- package/layers/{ui → visual}/app/components/Accent/Scene.vue +26 -23
- package/layers/visual/app/components/Base/Modal.vue +123 -0
- package/layers/visual/app/components/Gradient/Background.vue +24 -0
- package/layers/visual/app/components/Gradient/Text.vue +24 -0
- package/layers/visual/app/components/Media/Picture.vue +51 -0
- package/layers/visual/app/components/Progress/Bar.vue +36 -0
- package/layers/{ui → visual}/app/components/Progress/Circular.vue +26 -25
- package/layers/visual/app/components/Tint/Overlay.vue +27 -0
- package/layers/{ui → visual}/app/composables/accent.ts +1 -0
- package/layers/{ui → visual}/app/composables/gradient.ts +3 -0
- package/layers/{ui → visual}/app/composables/picture.ts +2 -0
- package/layers/{ui → visual}/app/composables/tint.ts +3 -2
- package/layers/{ui → visual}/app/types/accent.ts +2 -2
- package/layers/{ui → visual}/app/types/gradient.ts +2 -2
- package/layers/{ui → visual}/app/types/media.ts +4 -3
- package/layers/{ui → visual}/app/types/tint.ts +1 -1
- package/layers/visual/nuxt.config.ts +19 -0
- package/layers/visual/package.json +6 -0
- package/layers/visual/tsconfig.json +7 -0
- package/package.json +29 -4
- package/layers/motion/app/app.config.ts +0 -27
- package/layers/motion/app/components/Motion/HorizontalScroll.vue +0 -61
- package/layers/motion/app/components/Motion/Parallax.vue +0 -75
- package/layers/motion/app/components/Motion/PinnedSection.vue +0 -77
- package/layers/motion/app/components/Motion/ScrollLink.vue +0 -49
- package/layers/motion/app/components/Motion/ScrollProgress.vue +0 -82
- package/layers/motion/app/components/Motion/ScrollScene.vue +0 -121
- package/layers/motion/app/components/Motion/ScrollStep.vue +0 -45
- package/layers/motion/app/components/Motion/Transition.vue +0 -76
- package/layers/shader/app/components/Shader/Canvas.vue +0 -121
- package/layers/ui/app/app.config.ts +0 -57
- package/layers/ui/app/components/Accent/Blob.vue +0 -29
- package/layers/ui/app/components/Base/Modal.vue +0 -111
- package/layers/ui/app/components/Gradient/Background.vue +0 -22
- package/layers/ui/app/components/Gradient/Text.vue +0 -22
- package/layers/ui/app/components/Links/Group.vue +0 -47
- package/layers/ui/app/components/Links/Named.vue +0 -31
- package/layers/ui/app/components/Mast/Footer.vue +0 -15
- package/layers/ui/app/components/Mast/NavModal.vue +0 -72
- package/layers/ui/app/components/Media/Picture.vue +0 -50
- package/layers/ui/app/components/Progress/Bar.vue +0 -35
- package/layers/ui/app/components/Tint/Overlay.vue +0 -25
- package/layers/ui/app/components/Typography/CodeBlock.vue +0 -42
- package/layers/ui/app/components/Typography/Headline.vue +0 -88
- package/layers/ui/app/components/Typography/HeadlineScreen.vue +0 -77
- package/layers/ui/app/components/Typography/QuoteBlock.vue +0 -20
- package/layers/ui/app/components/Typography/index.vue +0 -52
- package/layers/ui/app/types/app-config.d.ts +0 -22
- package/layers/ui/app/types/nav.ts +0 -5
- /package/layers/{motion → animations}/app/components/Motion/CountUp.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Cursor.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Magnetic.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Marquee.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/MarqueeText.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Staggered.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/TextReveal.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Tilt.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/VelocityEffect.vue +0 -0
- /package/layers/{motion → animations}/app/composables/useCountUp.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useCursorFollower.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMagneticElement.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMarqueeCopies.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMarqueeVelocity.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useTiltEffect.ts +0 -0
- /package/layers/{ui → navigation}/app/components/Mast/Main.vue +0 -0
- /package/layers/{ui → navigation}/app/components/Site/Subtitle.vue +0 -0
- /package/layers/{ui → navigation}/app/components/Site/Title.vue +0 -0
- /package/layers/{ui → navigation}/app/utils/regex.ts +0 -0
- /package/layers/{motion/app/assets/css/motion.css → transitions/app/assets/css/transitions.css} +0 -0
- /package/layers/{ui → typography}/app/composables/color.ts +0 -0
- /package/layers/{ui → typography}/app/types/colors.ts +0 -0
- /package/layers/{ui → visual}/app/types/breakpoints.ts +0 -0
|
@@ -1,101 +1,145 @@
|
|
|
1
|
+
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
4
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { Color, Vector3 } from 'three'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
import { Color, Vector3 } from 'three'
|
|
7
|
+
import {
|
|
8
|
+
abs,
|
|
9
|
+
Break,
|
|
10
|
+
clamp,
|
|
11
|
+
cos,
|
|
12
|
+
float,
|
|
13
|
+
Fn,
|
|
14
|
+
If,
|
|
15
|
+
Loop,
|
|
16
|
+
mix,
|
|
17
|
+
sin,
|
|
18
|
+
time,
|
|
19
|
+
uniform,
|
|
20
|
+
vec3,
|
|
21
|
+
vec4,
|
|
22
|
+
} from 'three/tsl'
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<{
|
|
26
|
+
/** Tunnel inner radius */
|
|
27
|
+
radius?: number
|
|
28
|
+
/** How fast the camera flies forward */
|
|
29
|
+
speed?: number
|
|
30
|
+
/** Wall colour A */
|
|
31
|
+
colorA?: string
|
|
32
|
+
/** Wall colour B */
|
|
33
|
+
colorB?: string
|
|
34
|
+
/** Number of march steps (fixed at shader compile) */
|
|
35
|
+
steps?: number
|
|
36
|
+
order?: number
|
|
37
|
+
}>(),
|
|
38
|
+
{
|
|
39
|
+
radius: 0.8,
|
|
40
|
+
speed: 1,
|
|
41
|
+
colorA: '#1a0a3a',
|
|
42
|
+
colorB: '#ff4488',
|
|
43
|
+
steps: 64,
|
|
44
|
+
order: 0,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
const radiusNode = uniform(props.radius)
|
|
49
|
+
const speedNode = uniform(props.speed)
|
|
50
|
+
|
|
51
|
+
function toVec3Node(hex: string) {
|
|
52
|
+
const c = new Color(hex)
|
|
53
|
+
return uniform(new Vector3(c.r, c.g, c.b))
|
|
54
|
+
}
|
|
55
|
+
const colorANode = toVec3Node(props.colorA)
|
|
56
|
+
const colorBNode = toVec3Node(props.colorB)
|
|
57
|
+
|
|
58
|
+
watch(
|
|
59
|
+
() => props.radius,
|
|
60
|
+
(v) => {
|
|
61
|
+
radiusNode.value = v
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
watch(
|
|
65
|
+
() => props.speed,
|
|
66
|
+
(v) => {
|
|
67
|
+
speedNode.value = v
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
watch(
|
|
71
|
+
() => props.colorA,
|
|
72
|
+
(v) => {
|
|
73
|
+
const c = new Color(v)
|
|
74
|
+
colorANode.value.set(c.r, c.g, c.b)
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
watch(
|
|
78
|
+
() => props.colorB,
|
|
79
|
+
(v) => {
|
|
80
|
+
const c = new Color(v)
|
|
81
|
+
colorBNode.value.set(c.r, c.g, c.b)
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
const pipeline = useShaderPipelineContext()
|
|
86
|
+
|
|
87
|
+
// Fn defined once at setup — Loop/If/Break/toVar/addAssign require a Fn() stack at compile time
|
|
88
|
+
const raymarchFn = Fn(([ray]) => {
|
|
89
|
+
// Three.js calls Fn bodies with null args during type-inference — bail out safely
|
|
90
|
+
if (!ray) return vec4(0, 0, 0, 0)
|
|
91
|
+
|
|
92
|
+
// Camera flies forward along Z
|
|
93
|
+
const camZ = time.mul(speedNode)
|
|
94
|
+
const ro = vec3(float(0), float(0), camZ)
|
|
95
|
+
const rd = ray.normalize()
|
|
96
|
+
|
|
97
|
+
const t = float(0).toVar()
|
|
98
|
+
const colour = vec3(0, 0, 0).toVar()
|
|
99
|
+
const hit = float(0).toVar()
|
|
100
|
+
|
|
101
|
+
Loop(props.steps, () => {
|
|
102
|
+
const p = ro.add(rd.mul(t))
|
|
103
|
+
|
|
104
|
+
// Tunnel SDF: cylinder with twisted walls
|
|
105
|
+
const twist = sin(p.z.mul(0.3).add(camZ.mul(0.1))).mul(0.15)
|
|
106
|
+
const d = p.xy
|
|
107
|
+
.add(vec3(twist, twist, float(0)).xy)
|
|
108
|
+
.length()
|
|
109
|
+
.sub(radiusNode)
|
|
110
|
+
|
|
111
|
+
If(d.lessThan(float(0.001)), () => {
|
|
112
|
+
// Pattern on wall: mix colours by angle around tunnel
|
|
113
|
+
const angle = p.y.atan(p.x).mul(0.5).add(0.5)
|
|
114
|
+
const stripe = sin(p.z.mul(4.0).add(time)).mul(0.5).add(0.5)
|
|
115
|
+
const band = mix(colorANode, colorBNode, clamp(angle.add(stripe.mul(0.3)), 0, 1))
|
|
116
|
+
colour.assign(band)
|
|
117
|
+
hit.assign(float(1))
|
|
118
|
+
Break()
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
t.addAssign(abs(d).max(float(0.01)))
|
|
122
|
+
|
|
123
|
+
If(t.greaterThan(float(20.0)), () => {
|
|
124
|
+
Break()
|
|
125
|
+
})
|
|
73
126
|
})
|
|
74
127
|
|
|
75
|
-
|
|
128
|
+
// Fog out the far end of the tunnel
|
|
129
|
+
const fog = clamp(float(1).sub(t.div(20.0)), 0, 1)
|
|
130
|
+
const finalColour = colour.mul(fog).mul(hit)
|
|
76
131
|
|
|
77
|
-
|
|
132
|
+
return vec4(finalColour, hit)
|
|
78
133
|
})
|
|
79
134
|
|
|
80
|
-
|
|
81
|
-
const fog = clamp(float(1).sub(t.div(20.0)), 0, 1)
|
|
82
|
-
const finalColour = colour.mul(fog).mul(hit)
|
|
83
|
-
|
|
84
|
-
return vec4(finalColour, hit)
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
useShaderStage(
|
|
88
|
-
() => {
|
|
135
|
+
useShaderStage(() => {
|
|
89
136
|
// Fall back to a simple perspective ray from UV when no ray node is set
|
|
90
137
|
const provided = pipeline.rayNode.value
|
|
91
138
|
const uvc = pipeline.uvNode.value
|
|
92
139
|
// Use +1 for Z so the ray points forward into the tunnel (matching Pipeline.client.vue screenRayNode)
|
|
93
|
-
const ray =
|
|
140
|
+
const ray =
|
|
141
|
+
provided ?? (uvc ? vec3(uvc.sub(0.5).mul(2).x, uvc.sub(0.5).mul(2).y, float(1)) : null)
|
|
94
142
|
if (!ray) return vec4(0, 0, 0, 0)
|
|
95
143
|
return raymarchFn([ray])
|
|
96
|
-
},
|
|
97
|
-
props.order,
|
|
98
|
-
)
|
|
144
|
+
}, props.order)
|
|
99
145
|
</script>
|
|
100
|
-
|
|
101
|
-
<template><!-- --></template>
|
|
@@ -1,47 +1,88 @@
|
|
|
1
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
3
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { Color, Vector3 } from 'three'
|
|
4
|
-
import {
|
|
5
|
-
import { roundedRect } from '../../shaders/common/shapes'
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Color, Vector3 } from 'three'
|
|
6
|
+
import { float, mix, uniform, vec4 } from 'three/tsl'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
colorA?: string
|
|
9
|
-
colorB?: string
|
|
10
|
-
width?: number
|
|
11
|
-
height?: number
|
|
12
|
-
cornerRadius?: number
|
|
13
|
-
softness?: number
|
|
14
|
-
order?: number
|
|
15
|
-
}>(), { colorA: '#000000', colorB: '#ffffff', width: 0.6, height: 0.4, cornerRadius: 0.05, softness: 0.01, order: 0 })
|
|
8
|
+
import { roundedRect } from '../../shaders/common/shapes'
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<{
|
|
12
|
+
colorA?: string
|
|
13
|
+
colorB?: string
|
|
14
|
+
width?: number
|
|
15
|
+
height?: number
|
|
16
|
+
cornerRadius?: number
|
|
17
|
+
softness?: number
|
|
18
|
+
order?: number
|
|
19
|
+
}>(),
|
|
20
|
+
{
|
|
21
|
+
colorA: '#000000',
|
|
22
|
+
colorB: '#ffffff',
|
|
23
|
+
width: 0.6,
|
|
24
|
+
height: 0.4,
|
|
25
|
+
cornerRadius: 0.05,
|
|
26
|
+
softness: 0.01,
|
|
27
|
+
order: 0,
|
|
28
|
+
}
|
|
29
|
+
)
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const cornerNode = uniform(props.cornerRadius)
|
|
27
|
-
const softnessNode = uniform(props.softness)
|
|
28
|
-
watch(() => props.colorA, v => { const c = new Color(v); colorANode.value.set(c.r, c.g, c.b) })
|
|
29
|
-
watch(() => props.colorB, v => { const c = new Color(v); colorBNode.value.set(c.r, c.g, c.b) })
|
|
30
|
-
watch(() => props.width, v => { widthNode.value = v })
|
|
31
|
-
watch(() => props.height, v => { heightNode.value = v })
|
|
32
|
-
watch(() => props.cornerRadius, v => { cornerNode.value = v })
|
|
33
|
-
watch(() => props.softness, v => { softnessNode.value = v })
|
|
31
|
+
function toVec3Node(hex: string) {
|
|
32
|
+
const c = new Color(hex)
|
|
33
|
+
return uniform(new Vector3(c.r, c.g, c.b))
|
|
34
|
+
}
|
|
34
35
|
|
|
35
|
-
const
|
|
36
|
+
const colorANode = toVec3Node(props.colorA)
|
|
37
|
+
const colorBNode = toVec3Node(props.colorB)
|
|
38
|
+
const widthNode = uniform(props.width)
|
|
39
|
+
const heightNode = uniform(props.height)
|
|
40
|
+
const cornerNode = uniform(props.cornerRadius)
|
|
41
|
+
const softnessNode = uniform(props.softness)
|
|
42
|
+
watch(
|
|
43
|
+
() => props.colorA,
|
|
44
|
+
(v) => {
|
|
45
|
+
const c = new Color(v)
|
|
46
|
+
colorANode.value.set(c.r, c.g, c.b)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
watch(
|
|
50
|
+
() => props.colorB,
|
|
51
|
+
(v) => {
|
|
52
|
+
const c = new Color(v)
|
|
53
|
+
colorBNode.value.set(c.r, c.g, c.b)
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
watch(
|
|
57
|
+
() => props.width,
|
|
58
|
+
(v) => {
|
|
59
|
+
widthNode.value = v
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
watch(
|
|
63
|
+
() => props.height,
|
|
64
|
+
(v) => {
|
|
65
|
+
heightNode.value = v
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
watch(
|
|
69
|
+
() => props.cornerRadius,
|
|
70
|
+
(v) => {
|
|
71
|
+
cornerNode.value = v
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
watch(
|
|
75
|
+
() => props.softness,
|
|
76
|
+
(v) => {
|
|
77
|
+
softnessNode.value = v
|
|
78
|
+
}
|
|
79
|
+
)
|
|
36
80
|
|
|
37
|
-
|
|
38
|
-
|
|
81
|
+
const pipeline = useShaderPipelineContext()
|
|
82
|
+
|
|
83
|
+
useShaderStage(() => {
|
|
39
84
|
const uv = pipeline.uvNode.value
|
|
40
85
|
const mask = roundedRect(uv, [0.5, 0.5], widthNode, cornerNode, softnessNode)
|
|
41
86
|
return vec4(mix(colorANode, colorBNode, mask), float(1))
|
|
42
|
-
},
|
|
43
|
-
props.order,
|
|
44
|
-
)
|
|
87
|
+
}, props.order)
|
|
45
88
|
</script>
|
|
46
|
-
|
|
47
|
-
<template><!-- --></template>
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
3
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { vec4 } from 'three/tsl'
|
|
4
|
-
import { reinhardTonemap } from '../../shaders/common/tonemapping'
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { vec4 } from 'three/tsl'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
* Simple Reinhard tone mapping: col / (col + 1).
|
|
8
|
-
* Compresses HDR values with no hard clip — highlights desaturate toward white.
|
|
9
|
-
*/
|
|
10
|
-
const { order = 0 } = defineProps<{ order?: number }>()
|
|
7
|
+
import { reinhardTonemap } from '../../shaders/common/tonemapping'
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Simple Reinhard tone mapping: col / (col + 1).
|
|
11
|
+
* Compresses HDR values with no hard clip — highlights desaturate toward white.
|
|
12
|
+
*/
|
|
13
|
+
const { order = 0 } = defineProps<{ order?: number }>()
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
useShaderStage((prev) => vec4(reinhardTonemap(prev.xyz), prev.w), order)
|
|
16
|
+
</script>
|
|
@@ -1,41 +1,64 @@
|
|
|
1
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
3
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { Color, Vector3 } from 'three'
|
|
4
|
-
import {
|
|
5
|
-
import { ridgedFbm2d } from '../../shaders/common/noise'
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Color, Vector3 } from 'three'
|
|
6
|
+
import { float, mix, time, uniform, vec4 } from 'three/tsl'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
colorA?: string
|
|
9
|
-
colorB?: string
|
|
10
|
-
scale?: number
|
|
11
|
-
speed?: number
|
|
12
|
-
order?: number
|
|
13
|
-
}>(), { colorA: '#000000', colorB: '#ffffff', scale: 2, speed: 0.1, order: 0 })
|
|
8
|
+
import { ridgedFbm2d } from '../../shaders/common/noise'
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<{
|
|
12
|
+
colorA?: string
|
|
13
|
+
colorB?: string
|
|
14
|
+
scale?: number
|
|
15
|
+
speed?: number
|
|
16
|
+
order?: number
|
|
17
|
+
}>(),
|
|
18
|
+
{ colorA: '#000000', colorB: '#ffffff', scale: 2, speed: 0.1, order: 0 }
|
|
19
|
+
)
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
watch(() => props.colorA, v => { const c = new Color(v); colorANode.value.set(c.r, c.g, c.b) })
|
|
25
|
-
watch(() => props.colorB, v => { const c = new Color(v); colorBNode.value.set(c.r, c.g, c.b) })
|
|
26
|
-
watch(() => props.scale, v => { scaleNode.value = v })
|
|
27
|
-
watch(() => props.speed, v => { speedNode.value = v })
|
|
21
|
+
function toVec3Node(hex: string) {
|
|
22
|
+
const c = new Color(hex)
|
|
23
|
+
return uniform(new Vector3(c.r, c.g, c.b))
|
|
24
|
+
}
|
|
28
25
|
|
|
29
|
-
const
|
|
26
|
+
const colorANode = toVec3Node(props.colorA)
|
|
27
|
+
const colorBNode = toVec3Node(props.colorB)
|
|
28
|
+
const scaleNode = uniform(props.scale)
|
|
29
|
+
const speedNode = uniform(props.speed)
|
|
30
|
+
watch(
|
|
31
|
+
() => props.colorA,
|
|
32
|
+
(v) => {
|
|
33
|
+
const c = new Color(v)
|
|
34
|
+
colorANode.value.set(c.r, c.g, c.b)
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
watch(
|
|
38
|
+
() => props.colorB,
|
|
39
|
+
(v) => {
|
|
40
|
+
const c = new Color(v)
|
|
41
|
+
colorBNode.value.set(c.r, c.g, c.b)
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
watch(
|
|
45
|
+
() => props.scale,
|
|
46
|
+
(v) => {
|
|
47
|
+
scaleNode.value = v
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
watch(
|
|
51
|
+
() => props.speed,
|
|
52
|
+
(v) => {
|
|
53
|
+
speedNode.value = v
|
|
54
|
+
}
|
|
55
|
+
)
|
|
30
56
|
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
const pipeline = useShaderPipelineContext()
|
|
58
|
+
|
|
59
|
+
useShaderStage(() => {
|
|
33
60
|
const uv = pipeline.uvNode.value
|
|
34
61
|
const n = ridgedFbm2d(uv.mul(scaleNode).add(time.mul(speedNode)))
|
|
35
62
|
return vec4(mix(colorANode, colorBNode, n), float(1))
|
|
36
|
-
},
|
|
37
|
-
props.order,
|
|
38
|
-
)
|
|
63
|
+
}, props.order)
|
|
39
64
|
</script>
|
|
40
|
-
|
|
41
|
-
<template><!-- --></template>
|
|
@@ -1,44 +1,79 @@
|
|
|
1
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
3
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { Color, Vector3 } from 'three'
|
|
4
|
-
import {
|
|
5
|
-
import { ring } from '../../shaders/common/shapes'
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Color, Vector3 } from 'three'
|
|
6
|
+
import { float, mix, uniform, vec4 } from 'three/tsl'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
colorA?: string
|
|
9
|
-
colorB?: string
|
|
10
|
-
innerRadius?: number
|
|
11
|
-
outerRadius?: number
|
|
12
|
-
softness?: number
|
|
13
|
-
order?: number
|
|
14
|
-
}>(), { colorA: '#000000', colorB: '#ffffff', innerRadius: 0.25, outerRadius: 0.4, softness: 0.01, order: 0 })
|
|
8
|
+
import { ring } from '../../shaders/common/shapes'
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<{
|
|
12
|
+
colorA?: string
|
|
13
|
+
colorB?: string
|
|
14
|
+
innerRadius?: number
|
|
15
|
+
outerRadius?: number
|
|
16
|
+
softness?: number
|
|
17
|
+
order?: number
|
|
18
|
+
}>(),
|
|
19
|
+
{
|
|
20
|
+
colorA: '#000000',
|
|
21
|
+
colorB: '#ffffff',
|
|
22
|
+
innerRadius: 0.25,
|
|
23
|
+
outerRadius: 0.4,
|
|
24
|
+
softness: 0.01,
|
|
25
|
+
order: 0,
|
|
26
|
+
}
|
|
27
|
+
)
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const softnessNode = uniform(props.softness)
|
|
26
|
-
watch(() => props.colorA, v => { const c = new Color(v); colorANode.value.set(c.r, c.g, c.b) })
|
|
27
|
-
watch(() => props.colorB, v => { const c = new Color(v); colorBNode.value.set(c.r, c.g, c.b) })
|
|
28
|
-
watch(() => props.innerRadius, v => { innerNode.value = v })
|
|
29
|
-
watch(() => props.outerRadius, v => { outerNode.value = v })
|
|
30
|
-
watch(() => props.softness, v => { softnessNode.value = v })
|
|
29
|
+
function toVec3Node(hex: string) {
|
|
30
|
+
const c = new Color(hex)
|
|
31
|
+
return uniform(new Vector3(c.r, c.g, c.b))
|
|
32
|
+
}
|
|
31
33
|
|
|
32
|
-
const
|
|
34
|
+
const colorANode = toVec3Node(props.colorA)
|
|
35
|
+
const colorBNode = toVec3Node(props.colorB)
|
|
36
|
+
const innerNode = uniform(props.innerRadius)
|
|
37
|
+
const outerNode = uniform(props.outerRadius)
|
|
38
|
+
const softnessNode = uniform(props.softness)
|
|
39
|
+
watch(
|
|
40
|
+
() => props.colorA,
|
|
41
|
+
(v) => {
|
|
42
|
+
const c = new Color(v)
|
|
43
|
+
colorANode.value.set(c.r, c.g, c.b)
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
watch(
|
|
47
|
+
() => props.colorB,
|
|
48
|
+
(v) => {
|
|
49
|
+
const c = new Color(v)
|
|
50
|
+
colorBNode.value.set(c.r, c.g, c.b)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
watch(
|
|
54
|
+
() => props.innerRadius,
|
|
55
|
+
(v) => {
|
|
56
|
+
innerNode.value = v
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
watch(
|
|
60
|
+
() => props.outerRadius,
|
|
61
|
+
(v) => {
|
|
62
|
+
outerNode.value = v
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
watch(
|
|
66
|
+
() => props.softness,
|
|
67
|
+
(v) => {
|
|
68
|
+
softnessNode.value = v
|
|
69
|
+
}
|
|
70
|
+
)
|
|
33
71
|
|
|
34
|
-
|
|
35
|
-
|
|
72
|
+
const pipeline = useShaderPipelineContext()
|
|
73
|
+
|
|
74
|
+
useShaderStage(() => {
|
|
36
75
|
const uv = pipeline.uvNode.value
|
|
37
76
|
const mask = ring(uv, [0.5, 0.5], innerNode, outerNode, softnessNode)
|
|
38
77
|
return vec4(mix(colorANode, colorBNode, mask), float(1))
|
|
39
|
-
},
|
|
40
|
-
props.order,
|
|
41
|
-
)
|
|
78
|
+
}, props.order)
|
|
42
79
|
</script>
|
|
43
|
-
|
|
44
|
-
<template><!-- --></template>
|