kmcom-nuxt-layers 1.7.9 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +4 -1
- package/layers/content/app/composables/useBlogPosts.ts +3 -1
- 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 +4 -1
- package/layers/content/app/composables/usePortfolioItems.ts +4 -1
- 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 +32 -6
- 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,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
1
4
|
// @ts-nocheck - TSL types are complex
|
|
2
5
|
import { DoubleSide } from 'three'
|
|
3
6
|
import {
|
|
@@ -21,12 +24,13 @@ import {
|
|
|
21
24
|
vec3,
|
|
22
25
|
} from 'three/tsl'
|
|
23
26
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
27
|
+
|
|
24
28
|
import {
|
|
25
|
-
simplexNoise2D,
|
|
26
|
-
simplexNoise3d,
|
|
27
29
|
fbm2D,
|
|
28
30
|
fbm3dSimplex,
|
|
29
31
|
ridgedFbm2d,
|
|
32
|
+
simplexNoise2D,
|
|
33
|
+
simplexNoise3d,
|
|
30
34
|
voronoi2D,
|
|
31
35
|
} from '../shaders/common/noise'
|
|
32
36
|
import { cosinePalette } from '../shaders/common/palette'
|
|
@@ -35,14 +39,14 @@ import { cosinePalette } from '../shaders/common/palette'
|
|
|
35
39
|
// Types
|
|
36
40
|
// ============================================
|
|
37
41
|
|
|
38
|
-
export
|
|
42
|
+
export type AmbientMaterialOptions = {
|
|
39
43
|
speed?: number
|
|
40
44
|
intensity?: number
|
|
41
45
|
colors?: string[]
|
|
42
46
|
mouseInteraction?: boolean
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
export
|
|
49
|
+
export type AmbientUniforms = {
|
|
46
50
|
speed: any
|
|
47
51
|
intensity: any
|
|
48
52
|
mouseX: any
|
|
@@ -50,12 +54,12 @@ export interface AmbientUniforms {
|
|
|
50
54
|
mouseStrength: any
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
export
|
|
57
|
+
export type AmbientMaterialResult = {
|
|
54
58
|
material: MeshBasicNodeMaterial
|
|
55
59
|
uniforms: AmbientUniforms
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
export
|
|
62
|
+
export type AmbientNodeResult = {
|
|
59
63
|
colorNode: any
|
|
60
64
|
uniforms: AmbientUniforms
|
|
61
65
|
}
|
|
@@ -80,7 +84,13 @@ export function createAmbientUniforms(options: AmbientMaterialOptions = {}): Amb
|
|
|
80
84
|
// ============================================
|
|
81
85
|
|
|
82
86
|
export function createAuroraColorNode(uniforms: AmbientUniforms): any {
|
|
83
|
-
const {
|
|
87
|
+
const {
|
|
88
|
+
speed: uSpeed,
|
|
89
|
+
intensity: uIntensity,
|
|
90
|
+
mouseX: uMouseX,
|
|
91
|
+
mouseY: uMouseY,
|
|
92
|
+
mouseStrength: uMouseStrength,
|
|
93
|
+
} = uniforms
|
|
84
94
|
|
|
85
95
|
return Fn(() => {
|
|
86
96
|
const t = mul(time, uSpeed, 0.2)
|
|
@@ -98,15 +108,24 @@ export function createAuroraColorNode(uniforms: AmbientUniforms): any {
|
|
|
98
108
|
)
|
|
99
109
|
|
|
100
110
|
const curtain1 = simplexNoise2D(curtainCoord).mul(0.5).add(0.5)
|
|
101
|
-
const curtain2 = simplexNoise2D(add(mul(curtainCoord, 1.5), vec2(mul(t, -0.2), 5.0)))
|
|
102
|
-
|
|
111
|
+
const curtain2 = simplexNoise2D(add(mul(curtainCoord, 1.5), vec2(mul(t, -0.2), 5.0)))
|
|
112
|
+
.mul(0.5)
|
|
113
|
+
.add(0.5)
|
|
114
|
+
const curtain3 = simplexNoise2D(add(mul(curtainCoord, 0.7), vec2(mul(t, 0.4), 12.0)))
|
|
115
|
+
.mul(0.5)
|
|
116
|
+
.add(0.5)
|
|
103
117
|
const detail = fbm2D(curtainCoord, { octaves: 4, frequency: 2.0 }).mul(0.5).add(0.5)
|
|
104
|
-
const curtain = mul(
|
|
118
|
+
const curtain = mul(
|
|
119
|
+
add(mul(curtain1, 0.4), mul(curtain2, 0.25), mul(curtain3, 0.2), mul(detail, 0.15)),
|
|
120
|
+
1.0
|
|
121
|
+
)
|
|
105
122
|
|
|
106
123
|
const fade = mul(pow(sub(1.0, uvCoord.y), 1.2), smoothstep(0.0, 0.3, uvCoord.y))
|
|
107
124
|
const aurora = mul(smoothstep(0.2, 0.8, mul(curtain, fade)), uIntensity)
|
|
108
125
|
|
|
109
|
-
const shimmer = simplexNoise2D(add(mul(curtainCoord, 8.0), mul(t, 3.0)))
|
|
126
|
+
const shimmer = simplexNoise2D(add(mul(curtainCoord, 8.0), mul(t, 3.0)))
|
|
127
|
+
.mul(0.5)
|
|
128
|
+
.add(0.5)
|
|
110
129
|
const shimmerMask = mul(shimmer, aurora, 0.15)
|
|
111
130
|
|
|
112
131
|
const colorDriver = add(mul(curtain2, 0.6), mul(curtain3, 0.4))
|
|
@@ -124,7 +143,13 @@ export function createAuroraColorNode(uniforms: AmbientUniforms): any {
|
|
|
124
143
|
}
|
|
125
144
|
|
|
126
145
|
export function createNebulaColorNode(uniforms: AmbientUniforms): any {
|
|
127
|
-
const {
|
|
146
|
+
const {
|
|
147
|
+
speed: uSpeed,
|
|
148
|
+
intensity: uIntensity,
|
|
149
|
+
mouseX: uMouseX,
|
|
150
|
+
mouseY: uMouseY,
|
|
151
|
+
mouseStrength: uMouseStrength,
|
|
152
|
+
} = uniforms
|
|
128
153
|
|
|
129
154
|
return Fn(() => {
|
|
130
155
|
const t = mul(time, uSpeed, 0.15)
|
|
@@ -136,12 +161,21 @@ export function createNebulaColorNode(uniforms: AmbientUniforms): any {
|
|
|
136
161
|
)
|
|
137
162
|
const adjustedUV = add(uvCoord, mouseOffset)
|
|
138
163
|
|
|
139
|
-
const cloud1 = fbm3dSimplex(vec3(mul(adjustedUV, 2.0), t), { octaves: 5 })
|
|
140
|
-
|
|
141
|
-
|
|
164
|
+
const cloud1 = fbm3dSimplex(vec3(mul(adjustedUV, 2.0), t), { octaves: 5 })
|
|
165
|
+
.mul(0.5)
|
|
166
|
+
.add(0.5)
|
|
167
|
+
const cloud2 = fbm3dSimplex(vec3(mul(adjustedUV, 3.0), add(mul(t, -0.3), 10.0)), { octaves: 4 })
|
|
168
|
+
.mul(0.5)
|
|
169
|
+
.add(0.5)
|
|
170
|
+
const filaments = ridgedFbm2d(add(adjustedUV, vec2(mul(t, 0.1), mul(t, -0.05))), {
|
|
171
|
+
octaves: 5,
|
|
172
|
+
frequency: 3.0,
|
|
173
|
+
})
|
|
142
174
|
const { distance: starDist } = voronoi2D(adjustedUV, 20.0)
|
|
143
175
|
const stars = pow(smoothstep(0.15, 0.0, starDist), 3.0)
|
|
144
|
-
const dust = simplexNoise2D(add(mul(adjustedUV, 12.0), mul(t, 0.5)))
|
|
176
|
+
const dust = simplexNoise2D(add(mul(adjustedUV, 12.0), mul(t, 0.5)))
|
|
177
|
+
.mul(0.5)
|
|
178
|
+
.add(0.5)
|
|
145
179
|
|
|
146
180
|
const colorDriver = add(mul(cloud1, 0.5), mul(filaments, 0.3), mul(cloud2, 0.2))
|
|
147
181
|
const nebulaColor = cosinePalette(
|
|
@@ -177,7 +211,13 @@ export function createNebulaColorNode(uniforms: AmbientUniforms): any {
|
|
|
177
211
|
}
|
|
178
212
|
|
|
179
213
|
export function createFlowColorNode(uniforms: AmbientUniforms): any {
|
|
180
|
-
const {
|
|
214
|
+
const {
|
|
215
|
+
speed: uSpeed,
|
|
216
|
+
intensity: uIntensity,
|
|
217
|
+
mouseX: uMouseX,
|
|
218
|
+
mouseY: uMouseY,
|
|
219
|
+
mouseStrength: uMouseStrength,
|
|
220
|
+
} = uniforms
|
|
181
221
|
|
|
182
222
|
return Fn(() => {
|
|
183
223
|
const t = mul(time, uSpeed, 0.15)
|
|
@@ -232,7 +272,13 @@ export function createFlowColorNode(uniforms: AmbientUniforms): any {
|
|
|
232
272
|
}
|
|
233
273
|
|
|
234
274
|
export function createGradientMeshColorNode(uniforms: AmbientUniforms): any {
|
|
235
|
-
const {
|
|
275
|
+
const {
|
|
276
|
+
speed: uSpeed,
|
|
277
|
+
intensity: uIntensity,
|
|
278
|
+
mouseX: uMouseX,
|
|
279
|
+
mouseY: uMouseY,
|
|
280
|
+
mouseStrength: uMouseStrength,
|
|
281
|
+
} = uniforms
|
|
236
282
|
|
|
237
283
|
return Fn(() => {
|
|
238
284
|
const t = mul(time, uSpeed, 0.2)
|
|
@@ -244,20 +290,52 @@ export function createGradientMeshColorNode(uniforms: AmbientUniforms): any {
|
|
|
244
290
|
)
|
|
245
291
|
const adjustedUV = add(uvCoord, mouseOffset)
|
|
246
292
|
|
|
247
|
-
const p1 = vec2(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
const
|
|
293
|
+
const p1 = vec2(
|
|
294
|
+
add(0.2, mul(sin(mul(t, 0.5)), 0.15)),
|
|
295
|
+
add(0.3, mul(sin(add(mul(t, 0.4), 1.57)), 0.15))
|
|
296
|
+
)
|
|
297
|
+
const p2 = vec2(
|
|
298
|
+
add(0.8, mul(sin(add(mul(t, 0.6), 1.57)), 0.1)),
|
|
299
|
+
add(0.2, mul(sin(mul(t, 0.5)), 0.1))
|
|
300
|
+
)
|
|
301
|
+
const p3 = vec2(
|
|
302
|
+
add(0.3, mul(sin(mul(t, 0.7)), 0.15)),
|
|
303
|
+
add(0.8, mul(sin(add(mul(t, 0.3), 1.57)), 0.1))
|
|
304
|
+
)
|
|
305
|
+
const p4 = vec2(
|
|
306
|
+
add(0.7, mul(sin(add(mul(t, 0.4), 1.57)), 0.15)),
|
|
307
|
+
add(0.7, mul(sin(mul(t, 0.6)), 0.15))
|
|
308
|
+
)
|
|
256
309
|
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const
|
|
310
|
+
const noiseModulate1 = simplexNoise2D(add(mul(adjustedUV, 3.0), mul(t, 0.3)))
|
|
311
|
+
.mul(0.5)
|
|
312
|
+
.add(0.5)
|
|
313
|
+
const noiseModulate2 = simplexNoise2D(add(mul(adjustedUV, 4.5), mul(t, -0.2), 8.0))
|
|
314
|
+
.mul(0.5)
|
|
315
|
+
.add(0.5)
|
|
316
|
+
const fbmModulate = fbm2D(add(adjustedUV, mul(t, 0.1)), { octaves: 3, frequency: 2.0 })
|
|
317
|
+
.mul(0.5)
|
|
318
|
+
.add(0.5)
|
|
319
|
+
const detailNoise = simplexNoise2D(add(mul(adjustedUV, 7.0), mul(t, 0.5)))
|
|
320
|
+
.mul(0.5)
|
|
321
|
+
.add(0.5)
|
|
322
|
+
|
|
323
|
+
const d1 = mul(
|
|
324
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p1)))),
|
|
325
|
+
add(0.7, mul(noiseModulate1, 0.3))
|
|
326
|
+
)
|
|
327
|
+
const d2 = mul(
|
|
328
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p2)))),
|
|
329
|
+
add(0.7, mul(noiseModulate2, 0.3))
|
|
330
|
+
)
|
|
331
|
+
const d3 = mul(
|
|
332
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p3)))),
|
|
333
|
+
add(0.7, mul(fbmModulate, 0.3))
|
|
334
|
+
)
|
|
335
|
+
const d4 = mul(
|
|
336
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p4)))),
|
|
337
|
+
add(0.7, mul(detailNoise, 0.3))
|
|
338
|
+
)
|
|
261
339
|
|
|
262
340
|
const color1 = vec3(0.4, 0.494, 0.918)
|
|
263
341
|
const color2 = vec3(0.463, 0.294, 0.635)
|
|
@@ -279,8 +357,8 @@ export function createGradientMeshColorNode(uniforms: AmbientUniforms): any {
|
|
|
279
357
|
})()
|
|
280
358
|
}
|
|
281
359
|
|
|
282
|
-
export
|
|
283
|
-
color1: any
|
|
360
|
+
export type ThemeColorUniforms = {
|
|
361
|
+
color1: any // TSL uniform node wrapping a THREE.Color
|
|
284
362
|
color2: any
|
|
285
363
|
color3: any
|
|
286
364
|
color4: any
|
|
@@ -288,10 +366,15 @@ export interface ThemeColorUniforms {
|
|
|
288
366
|
|
|
289
367
|
export function createThemeGradientColorNode(
|
|
290
368
|
uniforms: AmbientUniforms,
|
|
291
|
-
colors: ThemeColorUniforms
|
|
369
|
+
colors: ThemeColorUniforms
|
|
292
370
|
): any {
|
|
293
|
-
const {
|
|
294
|
-
|
|
371
|
+
const {
|
|
372
|
+
speed: uSpeed,
|
|
373
|
+
intensity: uIntensity,
|
|
374
|
+
mouseX: uMouseX,
|
|
375
|
+
mouseY: uMouseY,
|
|
376
|
+
mouseStrength: uMouseStrength,
|
|
377
|
+
} = uniforms
|
|
295
378
|
|
|
296
379
|
return Fn(() => {
|
|
297
380
|
const t = mul(time, uSpeed, 0.2)
|
|
@@ -300,28 +383,60 @@ export function createThemeGradientColorNode(
|
|
|
300
383
|
// Gentle UV shift for p2-p4 area
|
|
301
384
|
const mouseOffset = vec2(
|
|
302
385
|
mul(sub(uMouseX, 0.5), uMouseStrength, 0.05),
|
|
303
|
-
mul(sub(uMouseY, 0.5), uMouseStrength, 0.05)
|
|
386
|
+
mul(sub(uMouseY, 0.5), uMouseStrength, 0.05)
|
|
304
387
|
)
|
|
305
388
|
const adjustedUV = add(uvCoord, mouseOffset)
|
|
306
389
|
|
|
307
390
|
// p1 attracted toward mouse cursor
|
|
308
|
-
const p1Base = vec2(
|
|
391
|
+
const p1Base = vec2(
|
|
392
|
+
add(0.2, mul(sin(mul(t, 0.5)), 0.15)),
|
|
393
|
+
add(0.3, mul(sin(add(mul(t, 0.4), 1.57)), 0.15))
|
|
394
|
+
)
|
|
309
395
|
const mousePos = vec2(uMouseX, uMouseY)
|
|
310
396
|
const p1 = mix(p1Base, mousePos, mul(uMouseStrength, 0.5))
|
|
311
397
|
|
|
312
|
-
const p2 = vec2(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
398
|
+
const p2 = vec2(
|
|
399
|
+
add(0.8, mul(sin(add(mul(t, 0.6), 1.57)), 0.1)),
|
|
400
|
+
add(0.2, mul(sin(mul(t, 0.5)), 0.1))
|
|
401
|
+
)
|
|
402
|
+
const p3 = vec2(
|
|
403
|
+
add(0.3, mul(sin(mul(t, 0.7)), 0.15)),
|
|
404
|
+
add(0.8, mul(sin(add(mul(t, 0.3), 1.57)), 0.1))
|
|
405
|
+
)
|
|
406
|
+
const p4 = vec2(
|
|
407
|
+
add(0.7, mul(sin(add(mul(t, 0.4), 1.57)), 0.15)),
|
|
408
|
+
add(0.7, mul(sin(mul(t, 0.6)), 0.15))
|
|
409
|
+
)
|
|
320
410
|
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const
|
|
411
|
+
const nm1 = simplexNoise2D(add(mul(adjustedUV, 3.0), mul(t, 0.3)))
|
|
412
|
+
.mul(0.5)
|
|
413
|
+
.add(0.5)
|
|
414
|
+
const nm2 = simplexNoise2D(add(mul(adjustedUV, 4.5), mul(t, -0.2), 8.0))
|
|
415
|
+
.mul(0.5)
|
|
416
|
+
.add(0.5)
|
|
417
|
+
const nm3 = fbm2D(add(adjustedUV, mul(t, 0.1)), { octaves: 3, frequency: 2.0 })
|
|
418
|
+
.mul(0.5)
|
|
419
|
+
.add(0.5)
|
|
420
|
+
const nm4 = simplexNoise2D(add(mul(adjustedUV, 7.0), mul(t, 0.5)))
|
|
421
|
+
.mul(0.5)
|
|
422
|
+
.add(0.5)
|
|
423
|
+
|
|
424
|
+
const d1 = mul(
|
|
425
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p1)))),
|
|
426
|
+
add(0.7, mul(nm1, 0.3))
|
|
427
|
+
)
|
|
428
|
+
const d2 = mul(
|
|
429
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p2)))),
|
|
430
|
+
add(0.7, mul(nm2, 0.3))
|
|
431
|
+
)
|
|
432
|
+
const d3 = mul(
|
|
433
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p3)))),
|
|
434
|
+
add(0.7, mul(nm3, 0.3))
|
|
435
|
+
)
|
|
436
|
+
const d4 = mul(
|
|
437
|
+
sub(1.0, smoothstep(0.0, 0.7, length(sub(adjustedUV, p4)))),
|
|
438
|
+
add(0.7, mul(nm4, 0.3))
|
|
439
|
+
)
|
|
325
440
|
|
|
326
441
|
let colorNode = mul(colors.color1, d1)
|
|
327
442
|
colorNode = add(colorNode, mul(colors.color2, d2))
|
|
@@ -342,9 +457,15 @@ export function createThemeGradientColorNode(
|
|
|
342
457
|
|
|
343
458
|
export function createThemeFlowColorNode(
|
|
344
459
|
uniforms: AmbientUniforms,
|
|
345
|
-
colors: ThemeColorUniforms
|
|
460
|
+
colors: ThemeColorUniforms
|
|
346
461
|
): any {
|
|
347
|
-
const {
|
|
462
|
+
const {
|
|
463
|
+
speed: uSpeed,
|
|
464
|
+
intensity: uIntensity,
|
|
465
|
+
mouseX: uMouseX,
|
|
466
|
+
mouseY: uMouseY,
|
|
467
|
+
mouseStrength: uMouseStrength,
|
|
468
|
+
} = uniforms
|
|
348
469
|
|
|
349
470
|
return Fn(() => {
|
|
350
471
|
const t = mul(time, uSpeed, 0.15)
|
|
@@ -352,7 +473,7 @@ export function createThemeFlowColorNode(
|
|
|
352
473
|
|
|
353
474
|
const mouseOffset = vec2(
|
|
354
475
|
mul(sub(uMouseX, 0.5), uMouseStrength, 0.3),
|
|
355
|
-
mul(sub(uMouseY, 0.5), uMouseStrength, 0.3)
|
|
476
|
+
mul(sub(uMouseY, 0.5), uMouseStrength, 0.3)
|
|
356
477
|
)
|
|
357
478
|
|
|
358
479
|
const warpCoarse1 = simplexNoise2D(add(mul(uvCoord, 1.5), t))
|
|
@@ -389,9 +510,15 @@ export function createThemeFlowColorNode(
|
|
|
389
510
|
|
|
390
511
|
export function createThemeAuroraColorNode(
|
|
391
512
|
uniforms: AmbientUniforms,
|
|
392
|
-
colors: ThemeColorUniforms
|
|
513
|
+
colors: ThemeColorUniforms
|
|
393
514
|
): any {
|
|
394
|
-
const {
|
|
515
|
+
const {
|
|
516
|
+
speed: uSpeed,
|
|
517
|
+
intensity: uIntensity,
|
|
518
|
+
mouseX: uMouseX,
|
|
519
|
+
mouseY: uMouseY,
|
|
520
|
+
mouseStrength: uMouseStrength,
|
|
521
|
+
} = uniforms
|
|
395
522
|
|
|
396
523
|
return Fn(() => {
|
|
397
524
|
const t = mul(time, uSpeed, 0.2)
|
|
@@ -399,25 +526,34 @@ export function createThemeAuroraColorNode(
|
|
|
399
526
|
|
|
400
527
|
const mouseOffset = vec2(
|
|
401
528
|
mul(sub(uMouseX, 0.5), uMouseStrength),
|
|
402
|
-
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
529
|
+
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
403
530
|
)
|
|
404
531
|
|
|
405
532
|
const curtainCoord = add(
|
|
406
533
|
vec2(mul(uvCoord.x, 3.0), mul(uvCoord.y, 0.5)),
|
|
407
534
|
vec2(t, mul(t, 0.3)),
|
|
408
|
-
mouseOffset
|
|
535
|
+
mouseOffset
|
|
409
536
|
)
|
|
410
537
|
|
|
411
538
|
const curtain1 = simplexNoise2D(curtainCoord).mul(0.5).add(0.5)
|
|
412
|
-
const curtain2 = simplexNoise2D(add(mul(curtainCoord, 1.5), vec2(mul(t, -0.2), 5.0)))
|
|
413
|
-
|
|
539
|
+
const curtain2 = simplexNoise2D(add(mul(curtainCoord, 1.5), vec2(mul(t, -0.2), 5.0)))
|
|
540
|
+
.mul(0.5)
|
|
541
|
+
.add(0.5)
|
|
542
|
+
const curtain3 = simplexNoise2D(add(mul(curtainCoord, 0.7), vec2(mul(t, 0.4), 12.0)))
|
|
543
|
+
.mul(0.5)
|
|
544
|
+
.add(0.5)
|
|
414
545
|
const detail = fbm2D(curtainCoord, { octaves: 4, frequency: 2.0 }).mul(0.5).add(0.5)
|
|
415
|
-
const curtain = mul(
|
|
546
|
+
const curtain = mul(
|
|
547
|
+
add(mul(curtain1, 0.4), mul(curtain2, 0.25), mul(curtain3, 0.2), mul(detail, 0.15)),
|
|
548
|
+
1.0
|
|
549
|
+
)
|
|
416
550
|
|
|
417
551
|
const fade = mul(pow(sub(1.0, uvCoord.y), 1.2), smoothstep(0.0, 0.3, uvCoord.y))
|
|
418
552
|
const aurora = mul(smoothstep(0.2, 0.8, mul(curtain, fade)), uIntensity)
|
|
419
553
|
|
|
420
|
-
const shimmer = simplexNoise2D(add(mul(curtainCoord, 8.0), mul(t, 3.0)))
|
|
554
|
+
const shimmer = simplexNoise2D(add(mul(curtainCoord, 8.0), mul(t, 3.0)))
|
|
555
|
+
.mul(0.5)
|
|
556
|
+
.add(0.5)
|
|
421
557
|
|
|
422
558
|
const colorDriver = add(mul(curtain2, 0.6), mul(curtain3, 0.4))
|
|
423
559
|
const auroraColor = mix(colors.color1, colors.color2, colorDriver)
|
|
@@ -431,21 +567,32 @@ export function createThemeAuroraColorNode(
|
|
|
431
567
|
|
|
432
568
|
export function createThemeWaveColorNode(
|
|
433
569
|
uniforms: AmbientUniforms,
|
|
434
|
-
colors: ThemeColorUniforms
|
|
570
|
+
colors: ThemeColorUniforms
|
|
435
571
|
): any {
|
|
436
|
-
const {
|
|
572
|
+
const {
|
|
573
|
+
speed: uSpeed,
|
|
574
|
+
intensity: uIntensity,
|
|
575
|
+
mouseX: uMouseX,
|
|
576
|
+
mouseY: uMouseY,
|
|
577
|
+
mouseStrength: uMouseStrength,
|
|
578
|
+
} = uniforms
|
|
437
579
|
|
|
438
580
|
return Fn(() => {
|
|
439
581
|
const t = mul(time, uSpeed, 0.1)
|
|
440
582
|
const mouseOff = vec2(
|
|
441
583
|
mul(sub(uMouseX, 0.5), uMouseStrength),
|
|
442
|
-
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
584
|
+
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
443
585
|
)
|
|
444
586
|
const uvCoord = add(sub(uv(), 0.5), mouseOff)
|
|
445
587
|
|
|
446
588
|
// Noise-driven rotation
|
|
447
|
-
const degree = simplexNoise2D(vec2(t, uvCoord.x.mul(uvCoord.y)))
|
|
448
|
-
|
|
589
|
+
const degree = simplexNoise2D(vec2(t, uvCoord.x.mul(uvCoord.y)))
|
|
590
|
+
.mul(0.5)
|
|
591
|
+
.add(0.5)
|
|
592
|
+
const angle = degree
|
|
593
|
+
.sub(0.5)
|
|
594
|
+
.mul((720.0 * Math.PI) / 180.0)
|
|
595
|
+
.add(Math.PI)
|
|
449
596
|
const cosA = angle.cos()
|
|
450
597
|
const sinA = angle.sin()
|
|
451
598
|
const rx = uvCoord.x.mul(cosA).sub(uvCoord.y.mul(sinA))
|
|
@@ -457,8 +604,8 @@ export function createThemeWaveColorNode(
|
|
|
457
604
|
const wy = ry.add(sin(wx.mul(7.5).add(waveSpeed)).div(15.0))
|
|
458
605
|
|
|
459
606
|
// -5° rotation for layer blend
|
|
460
|
-
const COS5 = Math.cos(-5 * Math.PI / 180)
|
|
461
|
-
const SIN5 = Math.sin(-5 * Math.PI / 180)
|
|
607
|
+
const COS5 = Math.cos((-5 * Math.PI) / 180)
|
|
608
|
+
const SIN5 = Math.sin((-5 * Math.PI) / 180)
|
|
462
609
|
const rotated5x = wx.mul(COS5).sub(wy.mul(SIN5))
|
|
463
610
|
|
|
464
611
|
const layer1 = mix(colors.color1, colors.color2, smoothstep(-0.3, 0.2, rotated5x))
|
|
@@ -470,29 +617,50 @@ export function createThemeWaveColorNode(
|
|
|
470
617
|
|
|
471
618
|
export function createThemeLavaLampColorNode(
|
|
472
619
|
uniforms: AmbientUniforms,
|
|
473
|
-
colors: ThemeColorUniforms
|
|
620
|
+
colors: ThemeColorUniforms
|
|
474
621
|
): any {
|
|
475
|
-
const {
|
|
622
|
+
const {
|
|
623
|
+
speed: uSpeed,
|
|
624
|
+
intensity: uIntensity,
|
|
625
|
+
mouseX: uMouseX,
|
|
626
|
+
mouseY: uMouseY,
|
|
627
|
+
mouseStrength: uMouseStrength,
|
|
628
|
+
} = uniforms
|
|
476
629
|
|
|
477
630
|
return Fn(() => {
|
|
478
631
|
const t = mul(time, uSpeed, 0.2)
|
|
479
632
|
const mouseOff = vec2(
|
|
480
633
|
mul(sub(uMouseX, 0.5), uMouseStrength),
|
|
481
|
-
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
634
|
+
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
482
635
|
)
|
|
483
636
|
const uvCoord = add(sub(uv(), 0.5), mouseOff)
|
|
484
637
|
|
|
485
638
|
// 4 blobs anchored to quadrants, oscillation wide enough to cross center and intersect
|
|
486
|
-
const b1 = vec2(sin(mul(t, 0.9)).mul(0.22).sub(0.
|
|
487
|
-
const b2 = vec2(
|
|
488
|
-
|
|
489
|
-
|
|
639
|
+
const b1 = vec2(sin(mul(t, 0.9)).mul(0.22).sub(0.2), sin(mul(t, 0.7)).mul(0.22).sub(0.18))
|
|
640
|
+
const b2 = vec2(
|
|
641
|
+
sin(mul(t, 0.8).add(2.1)).mul(0.22).add(0.2),
|
|
642
|
+
sin(mul(t, 1.0).add(1.5)).mul(0.22).sub(0.18)
|
|
643
|
+
)
|
|
644
|
+
const b3 = vec2(
|
|
645
|
+
sin(mul(t, 0.6).add(4.2)).mul(0.22).sub(0.2),
|
|
646
|
+
sin(mul(t, 0.9).add(3.1)).mul(0.22).add(0.18)
|
|
647
|
+
)
|
|
648
|
+
const b4 = vec2(
|
|
649
|
+
sin(mul(t, 1.1).add(1.0)).mul(0.22).add(0.2),
|
|
650
|
+
sin(mul(t, 0.5).add(2.8)).mul(0.22).add(0.18)
|
|
651
|
+
)
|
|
490
652
|
|
|
491
653
|
// Per-blob breathing k: oscillates between -3.5 (large) and -6.5 (tight)
|
|
492
654
|
const k1 = sin(mul(t, 0.4)).mul(1.5).sub(5.0)
|
|
493
|
-
const k2 = sin(add(mul(t, 0.35), 2.1))
|
|
494
|
-
|
|
495
|
-
|
|
655
|
+
const k2 = sin(add(mul(t, 0.35), 2.1))
|
|
656
|
+
.mul(1.5)
|
|
657
|
+
.sub(5.0)
|
|
658
|
+
const k3 = sin(add(mul(t, 0.45), 4.2))
|
|
659
|
+
.mul(1.5)
|
|
660
|
+
.sub(5.0)
|
|
661
|
+
const k4 = sin(add(mul(t, 0.3), 1.0))
|
|
662
|
+
.mul(1.5)
|
|
663
|
+
.sub(5.0)
|
|
496
664
|
|
|
497
665
|
const w1 = exp(length(sub(uvCoord, b1)).mul(k1))
|
|
498
666
|
const w2 = exp(length(sub(uvCoord, b2)).mul(k2))
|
|
@@ -505,7 +673,7 @@ export function createThemeLavaLampColorNode(
|
|
|
505
673
|
mul(colors.color1, w1),
|
|
506
674
|
mul(colors.color2, w2),
|
|
507
675
|
mul(colors.color3, w3),
|
|
508
|
-
mul(colors.color4, w4)
|
|
676
|
+
mul(colors.color4, w4)
|
|
509
677
|
).div(wTotal.add(0.001))
|
|
510
678
|
|
|
511
679
|
// Darken space between blobs
|
|
@@ -517,22 +685,32 @@ export function createThemeLavaLampColorNode(
|
|
|
517
685
|
|
|
518
686
|
export function createThemeBubbleColorNode(
|
|
519
687
|
uniforms: AmbientUniforms,
|
|
520
|
-
colors: ThemeColorUniforms
|
|
688
|
+
colors: ThemeColorUniforms
|
|
521
689
|
): any {
|
|
522
|
-
const {
|
|
690
|
+
const {
|
|
691
|
+
speed: uSpeed,
|
|
692
|
+
intensity: uIntensity,
|
|
693
|
+
mouseX: uMouseX,
|
|
694
|
+
mouseY: uMouseY,
|
|
695
|
+
mouseStrength: uMouseStrength,
|
|
696
|
+
} = uniforms
|
|
523
697
|
|
|
524
698
|
return Fn(() => {
|
|
525
699
|
const t = mul(time, uSpeed, 0.06)
|
|
526
700
|
const mouseOff = vec2(
|
|
527
701
|
mul(sub(uMouseX, 0.5), uMouseStrength),
|
|
528
|
-
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
702
|
+
mul(sub(uMouseY, 0.5), uMouseStrength)
|
|
529
703
|
)
|
|
530
704
|
const uvCoord = add(uv(), mouseOff)
|
|
531
705
|
|
|
532
|
-
const n1 = simplexNoise3d(vec3(uvCoord.x.mul(1.5), uvCoord.y.mul(1.5), t))
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
706
|
+
const n1 = simplexNoise3d(vec3(uvCoord.x.mul(1.5), uvCoord.y.mul(1.5), t))
|
|
707
|
+
.mul(0.5)
|
|
708
|
+
.add(0.5)
|
|
709
|
+
const n2 = simplexNoise3d(
|
|
710
|
+
vec3(uvCoord.x.mul(2.5).add(1.3), uvCoord.y.mul(2.5).add(0.7), t.mul(0.8))
|
|
711
|
+
)
|
|
712
|
+
.mul(0.5)
|
|
713
|
+
.add(0.5)
|
|
536
714
|
|
|
537
715
|
const blend1 = mix(colors.color1, colors.color2, smoothstep(0.3, 0.7, n1))
|
|
538
716
|
const blend2 = mix(colors.color3, colors.color4, smoothstep(0.3, 0.7, n2))
|
|
@@ -542,15 +720,21 @@ export function createThemeBubbleColorNode(
|
|
|
542
720
|
|
|
543
721
|
export function createThemePlasmaColorNode(
|
|
544
722
|
uniforms: AmbientUniforms,
|
|
545
|
-
colors: ThemeColorUniforms
|
|
723
|
+
colors: ThemeColorUniforms
|
|
546
724
|
): any {
|
|
547
|
-
const {
|
|
725
|
+
const {
|
|
726
|
+
speed: uSpeed,
|
|
727
|
+
intensity: uIntensity,
|
|
728
|
+
mouseX: uMouseX,
|
|
729
|
+
mouseY: uMouseY,
|
|
730
|
+
mouseStrength: uMouseStrength,
|
|
731
|
+
} = uniforms
|
|
548
732
|
|
|
549
733
|
return Fn(() => {
|
|
550
734
|
const t = mul(time, uSpeed, 0.03)
|
|
551
735
|
const mouseOff = vec2(
|
|
552
736
|
mul(sub(uMouseX, 0.5), uMouseStrength, 0.2),
|
|
553
|
-
mul(sub(uMouseY, 0.5), uMouseStrength, 0.2)
|
|
737
|
+
mul(sub(uMouseY, 0.5), uMouseStrength, 0.2)
|
|
554
738
|
)
|
|
555
739
|
const uvMut = add(sub(uv(), 0.5).mul(1.2), mouseOff).toVar()
|
|
556
740
|
|
|
@@ -559,17 +743,25 @@ export function createThemePlasmaColorNode(
|
|
|
559
743
|
// Unrolled distortion loop (n = 1..4)
|
|
560
744
|
for (let n = 1; n < 5; n++) {
|
|
561
745
|
const i = float(n)
|
|
562
|
-
uvMut.subAssign(
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
746
|
+
uvMut.subAssign(
|
|
747
|
+
vec2(
|
|
748
|
+
float(0.7)
|
|
749
|
+
.div(i)
|
|
750
|
+
.mul(sin(i.mul(uvMut.y).add(i).add(t.mul(1.5)).add(h.mul(i)))),
|
|
751
|
+
float(0.4)
|
|
752
|
+
.div(i)
|
|
753
|
+
.mul(sin(uvMut.x.add(4.0).sub(i).add(h).add(t.mul(1.5)).add(i.mul(0.3))))
|
|
754
|
+
)
|
|
755
|
+
)
|
|
566
756
|
}
|
|
567
757
|
|
|
568
758
|
// Final UV shift
|
|
569
|
-
uvMut.subAssign(
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
759
|
+
uvMut.subAssign(
|
|
760
|
+
vec2(
|
|
761
|
+
float(1.2).mul(sin(uvMut.x.add(t).add(h))),
|
|
762
|
+
float(0.4).mul(sin(uvMut.y.add(t).add(h.mul(0.3))))
|
|
763
|
+
)
|
|
764
|
+
)
|
|
573
765
|
|
|
574
766
|
const cx = sin(uvMut.x.mul(2.0)).mul(0.5).add(0.5)
|
|
575
767
|
const cxy = sin(uvMut.x.add(uvMut.y).mul(1.5)).mul(0.5).add(0.5)
|
|
@@ -584,7 +776,13 @@ export function createThemePlasmaColorNode(
|
|
|
584
776
|
}
|
|
585
777
|
|
|
586
778
|
export function createOceanColorNode(uniforms: AmbientUniforms): any {
|
|
587
|
-
const {
|
|
779
|
+
const {
|
|
780
|
+
speed: uSpeed,
|
|
781
|
+
intensity: uIntensity,
|
|
782
|
+
mouseX: uMouseX,
|
|
783
|
+
mouseY: uMouseY,
|
|
784
|
+
mouseStrength: uMouseStrength,
|
|
785
|
+
} = uniforms
|
|
588
786
|
|
|
589
787
|
return Fn(() => {
|
|
590
788
|
const t = mul(time, uSpeed, 0.3)
|
|
@@ -600,11 +798,20 @@ export function createOceanColorNode(uniforms: AmbientUniforms): any {
|
|
|
600
798
|
)
|
|
601
799
|
|
|
602
800
|
const wave1 = mul(sin(add(mul(uvCoord.x, 8.0), t, mul(ripple, 2.0))), 0.5).add(0.5)
|
|
603
|
-
const wave2 = mul(
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
const
|
|
801
|
+
const wave2 = mul(
|
|
802
|
+
sin(add(sub(mul(uvCoord.x, 12.0), mul(t, 0.7)), mul(uvCoord.y, 3.0))),
|
|
803
|
+
0.5
|
|
804
|
+
).add(0.5)
|
|
805
|
+
const waveNoise = simplexNoise2D(add(mul(uvCoord, vec2(4.0, 2.0)), vec2(t, mul(t, 0.3))))
|
|
806
|
+
.mul(0.5)
|
|
807
|
+
.add(0.5)
|
|
808
|
+
|
|
809
|
+
const caustic1 = simplexNoise2D(add(mul(uvCoord, 8.0), mul(t, 0.4)))
|
|
810
|
+
.mul(0.5)
|
|
811
|
+
.add(0.5)
|
|
812
|
+
const caustic2 = simplexNoise2D(add(mul(uvCoord, 12.0), mul(t, -0.3), 5.0))
|
|
813
|
+
.mul(0.5)
|
|
814
|
+
.add(0.5)
|
|
608
815
|
const caustics = pow(mul(caustic1, caustic2), 2.0)
|
|
609
816
|
|
|
610
817
|
const depth = add(mul(uvCoord.y, 0.5), 0.3)
|
|
@@ -621,7 +828,9 @@ export function createOceanColorNode(uniforms: AmbientUniforms): any {
|
|
|
621
828
|
colorNode = add(colorNode, mul(vec3(1.0, 1.0, 1.0), foam, 0.2))
|
|
622
829
|
|
|
623
830
|
const shimmer = mul(
|
|
624
|
-
simplexNoise2D(add(mul(uvCoord, 25.0), mul(t, 1.5)))
|
|
831
|
+
simplexNoise2D(add(mul(uvCoord, 25.0), mul(t, 1.5)))
|
|
832
|
+
.mul(0.5)
|
|
833
|
+
.add(0.5),
|
|
625
834
|
0.05,
|
|
626
835
|
uIntensity
|
|
627
836
|
)
|
|
@@ -665,7 +874,9 @@ export function createFlowMaterial(options: AmbientMaterialOptions = {}): Ambien
|
|
|
665
874
|
return { material: mat, uniforms }
|
|
666
875
|
}
|
|
667
876
|
|
|
668
|
-
export function createGradientMeshMaterial(
|
|
877
|
+
export function createGradientMeshMaterial(
|
|
878
|
+
options: AmbientMaterialOptions = {}
|
|
879
|
+
): AmbientMaterialResult {
|
|
669
880
|
const uniforms = createAmbientUniforms(options)
|
|
670
881
|
const colorNode = createGradientMeshColorNode(uniforms)
|
|
671
882
|
const mat = new MeshBasicNodeMaterial()
|