kmcom-nuxt-layers 2.1.6 → 2.2.1
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/app/components/Motion/CountUp.vue +30 -30
- package/layers/animations/app/components/Motion/Magnetic.vue +14 -14
- package/layers/animations/app/components/Motion/Marquee.vue +59 -62
- package/layers/animations/app/components/Motion/MarqueeText.vue +2 -2
- package/layers/animations/app/components/Motion/Staggered.vue +45 -49
- package/layers/animations/app/components/Motion/TextReveal.vue +21 -19
- package/layers/animations/app/components/Motion/Tilt.vue +13 -13
- package/layers/animations/app/components/Motion/VelocityEffect.vue +80 -80
- package/layers/animations/app/composables/useCountUp.ts +1 -1
- package/layers/animations/app/composables/useMarqueeVelocity.ts +2 -2
- package/layers/canvas/app/components/ShaderCanvas.vue +42 -49
- package/layers/canvas/app/composables/useRendererCapabilities.ts +29 -21
- package/layers/canvas/app/composables/useShaderTime.ts +4 -5
- package/layers/canvas/app/types/renderer.ts +5 -0
- package/layers/content/app/components/Blog/Article.vue +10 -7
- package/layers/content/app/components/Blog/Card.vue +0 -1
- package/layers/content/app/components/Blog/List.vue +2 -4
- package/layers/content/app/components/Gallery/AmbientImage.vue +0 -1
- package/layers/content/app/components/Gallery/Card.vue +0 -1
- package/layers/content/app/components/Gallery/Detail.vue +0 -2
- package/layers/content/app/components/Gallery/Grid.vue +0 -2
- package/layers/content/app/components/Gallery/ImageDetail.vue +0 -2
- package/layers/content/app/components/Gallery/Lightbox.vue +1 -6
- package/layers/content/app/components/NuxtContent/Detail.vue +3 -4
- package/layers/content/app/components/NuxtContent/List.vue +0 -1
- package/layers/content/app/components/NuxtContent/Surround.vue +0 -1
- package/layers/content/app/components/NuxtContent/Toc.vue +0 -1
- package/layers/content/app/components/Portfolio/Card.vue +0 -1
- package/layers/content/app/components/Portfolio/ColorPalette.vue +0 -1
- package/layers/content/app/components/Portfolio/Detail.vue +2 -4
- package/layers/content/app/components/Portfolio/ItemPage.vue +3 -1
- package/layers/content/app/components/Portfolio/List.vue +20 -5
- package/layers/content/app/components/Portfolio/Typography.vue +0 -1
- package/layers/content/app/components/content/Figure.vue +0 -1
- package/layers/content/app/composables/createPortfolioComposables.ts +22 -6
- package/layers/content/app/composables/useBlogPosts.ts +3 -1
- package/layers/content/app/composables/useCollectionItem.ts +2 -3
- package/layers/content/app/composables/useCollectionSurround.ts +2 -3
- package/layers/content/app/composables/useContentPage.ts +0 -2
- package/layers/content/app/composables/useGalleryItems.ts +3 -3
- package/layers/content/app/composables/usePortfolioItems.ts +3 -3
- package/layers/content/app/types/app-config.d.ts +3 -1
- package/layers/content/app/types/collections.d.ts +46 -0
- package/layers/content/nuxt.config.ts +0 -1
- package/layers/core/app/components/ErrorBoundary.vue +0 -3
- package/layers/core/app/composables/useBrowser.ts +0 -1
- package/layers/core/app/composables/useCache.ts +0 -3
- package/layers/core/app/composables/useErrorLog.ts +0 -2
- package/layers/core/app/composables/useFeatures.ts +0 -3
- package/layers/core/app/composables/useLoading.ts +16 -15
- package/layers/core/app/composables/useNetworkInfo.ts +0 -2
- package/layers/core/app/composables/usePWAInfo.ts +0 -1
- package/layers/core/app/composables/useRendering.ts +0 -2
- package/layers/core/app/composables/useScreen.ts +0 -2
- package/layers/core/app/composables/useScrollGuard.ts +44 -44
- package/layers/core/app/layouts/default.vue +0 -1
- package/layers/core/app/plugins/error-handler.ts +4 -2
- package/layers/core/app/plugins/feature-detection.client.ts +4 -4
- package/layers/core/app/plugins/init.ts +4 -6
- package/layers/core/app/plugins/loading.client.ts +4 -3
- package/layers/core/app/plugins/scroll-guard.client.ts +4 -4
- package/layers/core/app/types/app-config.d.ts +1 -1
- package/layers/core/app/types/runtime-config.ts +13 -1
- package/layers/core/app/utils/helpers.ts +0 -4
- package/layers/feeds/app/app.config.ts +1 -1
- package/layers/feeds/app/plugins/feed-head.ts +4 -3
- package/layers/feeds/package.json +1 -1
- package/layers/forms/app/components/Form/Contact.vue +0 -2
- package/layers/forms/app/components/Form/Field.vue +0 -1
- package/layers/forms/app/composables/useFormSchema.ts +0 -1
- package/layers/forms/app/types/app-config.d.ts +1 -1
- package/layers/layout/app/components/Layout/Grid/Item.vue +0 -3
- package/layers/layout/app/components/Layout/Page/Container.vue +0 -4
- package/layers/layout/app/components/Layout/Page/Header.vue +0 -1
- package/layers/layout/app/components/Layout/Page/index.vue +0 -1
- package/layers/layout/app/components/Layout/Section/Gallery.vue +0 -1
- package/layers/layout/app/components/Layout/Section/Hero.vue +0 -3
- package/layers/layout/app/components/Layout/Section/Stack.vue +0 -3
- package/layers/layout/app/components/Layout/Section/Title.vue +0 -1
- package/layers/layout/app/composables/useGridConfig.ts +0 -1
- package/layers/layout/app/types/app-config.d.ts +6 -3
- package/layers/navigation/app/app.config.ts +1 -2
- package/layers/navigation/app/components/Links/Group.vue +0 -4
- package/layers/navigation/app/components/Links/Named.vue +0 -4
- package/layers/navigation/app/composables/mastNav.ts +0 -1
- package/layers/navigation/app/composables/toast.ts +0 -1
- package/layers/navigation/app/composables/useSite.ts +0 -1
- package/layers/navigation/app/utils/createModal.ts +0 -1
- package/layers/page-transitions/app/app.config.ts +1 -1
- package/layers/page-transitions/app/plugins/page-transitions.client.ts +4 -2
- package/layers/routing/app/composables/useRoutingConfig.ts +0 -1
- package/layers/routing/app/plugins/feature-flags.client.ts +4 -2
- package/layers/routing/app/plugins/scroll-routing.client.ts +4 -2
- package/layers/routing/app/types/app-config.d.ts +1 -2
- package/layers/routing/nuxt.config.ts +0 -1
- package/layers/scripts/app/app.config.ts +1 -2
- package/layers/scripts/app/composables/useAnalytics.ts +6 -6
- package/layers/scripts/app/composables/useGtm.ts +4 -4
- package/layers/scripts/app/composables/useScriptLoader.ts +12 -1
- package/layers/scroll/app/components/Motion/HorizontalScroll.vue +6 -3
- package/layers/scroll/app/components/Motion/Parallax.vue +38 -42
- package/layers/scroll/app/components/Motion/PinnedSection.vue +6 -3
- package/layers/scroll/app/components/Motion/ScrollLink.vue +26 -29
- package/layers/scroll/app/components/Motion/ScrollProgress.vue +38 -44
- package/layers/scroll/app/components/Motion/ScrollScene.vue +1 -2
- package/layers/scroll/app/components/Motion/ScrollStats.vue +19 -23
- package/layers/scroll/app/composables/useSmoothScroll.ts +21 -24
- package/layers/scroll/app/plugins/locomotive-scroll.client.ts +5 -2
- package/layers/seo/app/app.config.ts +1 -2
- package/layers/seo/app/composables/useSeoConfig.ts +0 -1
- package/layers/shader/app/components/Effect/PostProcessing.vue +3 -13
- package/layers/shader/app/components/Material/AmbientAurora.client.vue +41 -47
- package/layers/shader/app/components/Material/AmbientFlow.client.vue +47 -56
- package/layers/shader/app/components/Material/AmbientGradientMesh.client.vue +45 -51
- package/layers/shader/app/components/Material/AmbientNebula.client.vue +47 -53
- package/layers/shader/app/components/Material/AmbientOcean.client.vue +40 -46
- package/layers/shader/app/components/Material/Fresnel.client.vue +24 -29
- package/layers/shader/app/components/Material/Gradient.client.vue +61 -67
- package/layers/shader/app/components/Material/Image.client.vue +65 -71
- package/layers/shader/app/components/Material/Node.client.vue +46 -46
- package/layers/shader/app/components/Material/Noise.client.vue +48 -54
- package/layers/shader/app/components/Mesh/Plane.vue +15 -20
- package/layers/shader/app/components/Node/Color.client.vue +3 -4
- package/layers/shader/app/components/Node/Fresnel.client.vue +17 -26
- package/layers/shader/app/components/Node/Gradient.client.vue +36 -42
- package/layers/shader/app/components/Node/Mix.client.vue +13 -19
- package/layers/shader/app/components/Node/Noise.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/ACESTonemap.client.vue +0 -2
- package/layers/shader/app/components/Pipeline/AddBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/AgedFilm.client.vue +27 -28
- package/layers/shader/app/components/Pipeline/Aurora.client.vue +37 -44
- package/layers/shader/app/components/Pipeline/BilinearGradient.client.vue +26 -33
- package/layers/shader/app/components/Pipeline/BillowNoise.client.vue +22 -23
- package/layers/shader/app/components/Pipeline/BrightnessContrast.client.vue +16 -20
- package/layers/shader/app/components/Pipeline/CellularNoise.client.vue +22 -23
- package/layers/shader/app/components/Pipeline/ChannelMixer.client.vue +28 -35
- package/layers/shader/app/components/Pipeline/ChebyshevNoiseField.client.vue +31 -31
- package/layers/shader/app/components/Pipeline/Checkerboard.client.vue +21 -23
- package/layers/shader/app/components/Pipeline/ChromaticAberration.client.vue +21 -23
- package/layers/shader/app/components/Pipeline/ChromaticScreenWaves.client.vue +31 -30
- package/layers/shader/app/components/Pipeline/Circle.client.vue +22 -23
- package/layers/shader/app/components/Pipeline/Clouds.client.vue +36 -43
- package/layers/shader/app/components/Pipeline/ColorBurnBlend.client.vue +15 -17
- package/layers/shader/app/components/Pipeline/ColorDodgeBlend.client.vue +15 -17
- package/layers/shader/app/components/Pipeline/ColourRamp.client.vue +28 -35
- package/layers/shader/app/components/Pipeline/ComplexPlaneField.client.vue +31 -38
- package/layers/shader/app/components/Pipeline/ConicGradient.client.vue +19 -21
- package/layers/shader/app/components/Pipeline/CosinePalette.client.vue +42 -49
- package/layers/shader/app/components/Pipeline/CoverageAlpha.client.vue +0 -4
- package/layers/shader/app/components/Pipeline/Cross.client.vue +28 -28
- package/layers/shader/app/components/Pipeline/CurlNoise.client.vue +26 -27
- package/layers/shader/app/components/Pipeline/DarkenBlend.client.vue +15 -17
- package/layers/shader/app/components/Pipeline/DayNightCycle.client.vue +26 -27
- package/layers/shader/app/components/Pipeline/Desaturate.client.vue +8 -15
- package/layers/shader/app/components/Pipeline/DiagonalGradient.client.vue +19 -21
- package/layers/shader/app/components/Pipeline/DiamondGradient.client.vue +19 -21
- package/layers/shader/app/components/Pipeline/DifferenceBlend.client.vue +15 -17
- package/layers/shader/app/components/Pipeline/DivideBlend.client.vue +14 -17
- package/layers/shader/app/components/Pipeline/DomainWarpedNoise.client.vue +30 -37
- package/layers/shader/app/components/Pipeline/Dots.client.vue +26 -33
- package/layers/shader/app/components/Pipeline/DuoTone.client.vue +16 -19
- package/layers/shader/app/components/Pipeline/ExclusionBlend.client.vue +14 -17
- package/layers/shader/app/components/Pipeline/ExponentialFog.client.vue +21 -23
- package/layers/shader/app/components/Pipeline/Exposure.client.vue +8 -15
- package/layers/shader/app/components/Pipeline/FBMNoise.client.vue +28 -36
- package/layers/shader/app/components/Pipeline/FilmBurn.client.vue +27 -28
- package/layers/shader/app/components/Pipeline/FilmGrain.client.vue +29 -29
- package/layers/shader/app/components/Pipeline/FisheyeRay.client.vue +11 -18
- package/layers/shader/app/components/Pipeline/Flame.client.vue +26 -27
- package/layers/shader/app/components/Pipeline/FocalGradient.client.vue +24 -25
- package/layers/shader/app/components/Pipeline/Gamma.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/GodRays.client.vue +32 -39
- package/layers/shader/app/components/Pipeline/GradientNoise.client.vue +22 -22
- package/layers/shader/app/components/Pipeline/Grain.client.vue +34 -41
- package/layers/shader/app/components/Pipeline/Grid.client.vue +24 -24
- package/layers/shader/app/components/Pipeline/Halation.client.vue +22 -24
- package/layers/shader/app/components/Pipeline/Halftone.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/HardLightBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/Haze.client.vue +22 -24
- package/layers/shader/app/components/Pipeline/Hexagon.client.vue +22 -22
- package/layers/shader/app/components/Pipeline/Hue.client.vue +8 -12
- package/layers/shader/app/components/Pipeline/Invert.client.vue +0 -1
- package/layers/shader/app/components/Pipeline/LensFlare.client.vue +27 -25
- package/layers/shader/app/components/Pipeline/LightenBlend.client.vue +15 -14
- package/layers/shader/app/components/Pipeline/LinearGradient.client.vue +17 -21
- package/layers/shader/app/components/Pipeline/LinearGradient4.client.vue +29 -33
- package/layers/shader/app/components/Pipeline/LinearToSRGB.client.vue +8 -12
- package/layers/shader/app/components/Pipeline/Marble.client.vue +41 -47
- package/layers/shader/app/components/Pipeline/MixBlend.client.vue +21 -27
- package/layers/shader/app/components/Pipeline/MonochromeTint.client.vue +16 -21
- package/layers/shader/app/components/Pipeline/MultiplyBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/NoisyGradient.client.vue +34 -40
- package/layers/shader/app/components/Pipeline/NoisyGradientBlend.client.vue +54 -60
- package/layers/shader/app/components/Pipeline/OverlayBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/PaperTexture.client.vue +22 -24
- package/layers/shader/app/components/Pipeline/Polygon.client.vue +32 -39
- package/layers/shader/app/components/Pipeline/Posterise.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/RadialGradient.client.vue +18 -24
- package/layers/shader/app/components/Pipeline/RayAutoOrbit.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/RayMouseOrbit.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/RayRotateX.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/RayRotateY.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/RayRotateZ.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/RayTiltBasis.client.vue +21 -22
- package/layers/shader/app/components/Pipeline/RaymarchTunnel.client.vue +34 -40
- package/layers/shader/app/components/Pipeline/Rectangle.client.vue +30 -36
- package/layers/shader/app/components/Pipeline/ReinhardTonemap.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/RidgedNoise.client.vue +22 -22
- package/layers/shader/app/components/Pipeline/Ring.client.vue +26 -32
- package/layers/shader/app/components/Pipeline/RingField.client.vue +36 -33
- package/layers/shader/app/components/Pipeline/RisographGrain.client.vue +29 -35
- package/layers/shader/app/components/Pipeline/RotatedGradientBlend.client.vue +29 -35
- package/layers/shader/app/components/Pipeline/SDFColourMask.client.vue +15 -18
- package/layers/shader/app/components/Pipeline/SDFRadialMask.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/SRGBToLinear.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/Saturation.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/Scanlines.client.vue +21 -22
- package/layers/shader/app/components/Pipeline/ScreenBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/ShaderDebugger.client.vue +28 -29
- package/layers/shader/app/components/Pipeline/SimplexNoise.client.vue +25 -32
- package/layers/shader/app/components/Pipeline/SkyAtmosphere.client.vue +37 -44
- package/layers/shader/app/components/Pipeline/SoftLightBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/SolidColour.client.vue +7 -16
- package/layers/shader/app/components/Pipeline/SplitTone.client.vue +27 -28
- package/layers/shader/app/components/Pipeline/Star.client.vue +31 -37
- package/layers/shader/app/components/Pipeline/Starfield.client.vue +29 -27
- package/layers/shader/app/components/Pipeline/Stripes.client.vue +28 -27
- package/layers/shader/app/components/Pipeline/SubtractBlend.client.vue +15 -16
- package/layers/shader/app/components/Pipeline/TanhTonemap.client.vue +8 -17
- package/layers/shader/app/components/Pipeline/Threshold.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/Tint.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/Triangle.client.vue +22 -22
- package/layers/shader/app/components/Pipeline/UVAspectCorrect.client.vue +0 -2
- package/layers/shader/app/components/Pipeline/UVBreath.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVBulge.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVClamp.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/UVColumnOffset.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVFlipX.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/UVFlipXY.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/UVFlipY.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/UVFractBand.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVMousePull.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/UVNoiseRotate.client.vue +21 -27
- package/layers/shader/app/components/Pipeline/UVNoiseWarp.client.vue +21 -22
- package/layers/shader/app/components/Pipeline/UVOrbit.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/UVParallax.client.vue +8 -18
- package/layers/shader/app/components/Pipeline/UVPixelate.client.vue +7 -14
- package/layers/shader/app/components/Pipeline/UVPulse.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVRipple.client.vue +26 -26
- package/layers/shader/app/components/Pipeline/UVRotate.client.vue +16 -22
- package/layers/shader/app/components/Pipeline/UVScale.client.vue +16 -22
- package/layers/shader/app/components/Pipeline/UVScroll.client.vue +12 -18
- package/layers/shader/app/components/Pipeline/UVScrollX.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/UVScrollY.client.vue +8 -14
- package/layers/shader/app/components/Pipeline/UVShear.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVSineWarpXY.client.vue +18 -24
- package/layers/shader/app/components/Pipeline/UVSwapAxes.client.vue +0 -3
- package/layers/shader/app/components/Pipeline/UVTile.client.vue +12 -18
- package/layers/shader/app/components/Pipeline/UVTwirl.client.vue +16 -18
- package/layers/shader/app/components/Pipeline/UVWarp.client.vue +21 -22
- package/layers/shader/app/components/Pipeline/VHSBleed.client.vue +27 -28
- package/layers/shader/app/components/Pipeline/ValueNoise.client.vue +22 -22
- package/layers/shader/app/components/Pipeline/Vibrance.client.vue +11 -17
- package/layers/shader/app/components/Pipeline/Vignette.client.vue +14 -20
- package/layers/shader/app/components/Pipeline/VoronoiEdges.client.vue +29 -28
- package/layers/shader/app/components/Pipeline/Water.client.vue +31 -37
- package/layers/shader/app/components/Pipeline/WaveBendLayer.client.vue +26 -32
- package/layers/shader/app/components/Pipeline/WaveColourLayer.client.vue +37 -36
- package/layers/shader/app/components/Pipeline/WhiteBalance.client.vue +23 -26
- package/layers/shader/app/components/Pipeline/Wood.client.vue +34 -40
- package/layers/shader/app/components/Preset/Aurora.client.vue +0 -7
- package/layers/shader/app/components/Preset/Flow.client.vue +15 -23
- package/layers/shader/app/components/Preset/GradientMesh.client.vue +15 -23
- package/layers/shader/app/components/Preset/Nebula.client.vue +15 -25
- package/layers/shader/app/components/Preset/Ocean.client.vue +15 -24
- package/layers/shader/app/components/Preset/ThemeAurora.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemeBubble.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemeFlow.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemeGradient.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemeLavaLamp.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemePlasma.client.vue +38 -47
- package/layers/shader/app/components/Preset/ThemeWave.client.vue +38 -47
- package/layers/shader/app/components/Shader/Background.client.vue +110 -76
- package/layers/shader/app/components/Shader/Debug.vue +4 -14
- package/layers/shader/app/components/Shader/Host.client.vue +7 -9
- package/layers/shader/app/components/Shader/Material.client.vue +8 -20
- package/layers/shader/app/components/Shader/Pipeline.client.vue +0 -6
- package/layers/shader/app/components/Shader/Runtime.client.vue +0 -5
- package/layers/shader/app/composables/useAmbientMaterials.ts +4 -9
- package/layers/shader/app/composables/useCSSColourUniform.ts +0 -4
- package/layers/shader/app/composables/useCSSFloatUniform.ts +0 -3
- package/layers/shader/app/composables/useShader.ts +1 -4
- package/layers/shader/app/composables/useShaderColor.ts +4 -6
- package/layers/shader/app/composables/useShaderFloat.ts +1 -3
- package/layers/shader/app/composables/useShaderGraph.ts +4 -5
- package/layers/shader/app/composables/useShaderRuntime.ts +0 -5
- package/layers/shader/app/composables/useShaderVec2.ts +4 -8
- package/layers/shader/app/composables/useSunDirectionUniform.ts +0 -6
- package/layers/shader/app/composables/useThemeColors.ts +0 -1
- package/layers/shader/app/composables/useUniforms.ts +25 -9
- package/layers/shader/app/plugins/shader.client.ts +4 -3
- package/layers/shader/app/shaders/common/blend.ts +2 -4
- package/layers/shader/app/shaders/common/complex.ts +0 -2
- package/layers/shader/app/shaders/common/effects.ts +5 -13
- package/layers/shader/app/shaders/common/grain.ts +2 -7
- package/layers/shader/app/shaders/common/lighting.ts +0 -3
- package/layers/shader/app/shaders/common/math.ts +12 -8
- package/layers/shader/app/shaders/common/noise.ts +48 -48
- package/layers/shader/app/shaders/common/noiseHelpers.ts +6 -6
- package/layers/shader/app/shaders/common/palette.ts +10 -11
- package/layers/shader/app/shaders/common/patterns.ts +1 -4
- package/layers/shader/app/shaders/common/sdf.ts +11 -7
- package/layers/shader/app/shaders/common/shapes.ts +25 -15
- package/layers/shader/app/shaders/common/tonemapping.ts +0 -2
- package/layers/shader/app/shaders/common/uv.ts +20 -29
- package/layers/shader/app/shaders/createMaterial.ts +2 -5
- package/layers/shader/app/shaders/layers/aurora.ts +14 -17
- package/layers/shader/app/shaders/layers/meshGradient.ts +13 -16
- package/layers/shader/app/shaders/layers/paperShading.ts +15 -19
- package/layers/shader/app/shaders/layers/shaderGradient.ts +18 -23
- package/layers/shader/app/shaders/layers/stripe.ts +14 -17
- package/layers/shader/app/shaders/types.ts +9 -1
- package/layers/shader/app/types/app-config.d.ts +1 -1
- package/layers/shader/app/types/tsl.ts +0 -1
- package/layers/shader/app/types/uniforms.ts +0 -1
- package/layers/shader/app/utils/tsl/animation.ts +50 -52
- package/layers/shader/app/utils/tsl/color.ts +20 -19
- package/layers/shader/app/utils/tsl/noise.ts +10 -12
- package/layers/shader/app/utils/tsl/oklch.ts +6 -7
- package/layers/shader/app/utils/tsl/patterns.ts +4 -6
- package/layers/shader/app/utils/tsl/tween.ts +2 -4
- package/layers/shader/app/utils/tsl/uv.ts +6 -6
- package/layers/theme/app/components/ThemePicker/AccentButton.vue +1 -3
- package/layers/theme/app/components/ThemePicker/Colors.vue +0 -1
- package/layers/theme/app/composables/useAccentColor.ts +0 -1
- package/layers/theme/app/plugins/theme.client.ts +4 -3
- package/layers/theme/app/types/app-config.d.ts +1 -2
- package/layers/transitions/app/components/Motion/Transition.vue +15 -22
- package/layers/typography/app/components/Typography/CodeBlock.vue +16 -19
- package/layers/typography/app/components/Typography/Headline.vue +46 -49
- package/layers/typography/app/components/Typography/HeadlineScreen.vue +36 -40
- package/layers/typography/app/components/Typography/QuoteBlock.vue +3 -4
- package/layers/typography/app/components/Typography/TextStroke.vue +15 -20
- package/layers/typography/app/components/Typography/index.vue +0 -4
- package/layers/typography/app/composables/typography.ts +9 -11
- package/layers/visual/app/app.config.ts +1 -2
- package/layers/visual/app/components/Accent/Blob.vue +0 -3
- package/layers/visual/app/components/Accent/Scene.vue +12 -17
- package/layers/visual/app/components/Base/Modal.vue +0 -1
- package/layers/visual/app/components/Gradient/Background.vue +10 -13
- package/layers/visual/app/components/Gradient/Text.vue +10 -13
- package/layers/visual/app/components/Media/Picture.vue +0 -1
- package/layers/visual/app/components/Progress/Bar.vue +0 -1
- package/layers/visual/app/components/Progress/Circular.vue +0 -1
- package/layers/visual/app/components/Tint/Overlay.vue +0 -2
- package/layers/visual/app/composables/gradient.ts +6 -11
- package/layers/visual/app/composables/picture.ts +0 -1
- package/layers/visual/app/composables/tint.ts +0 -1
- package/layers/visual/app/types/media.ts +0 -1
- package/package.json +7 -5
|
@@ -1,45 +1,39 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck - TSL types
|
|
5
2
|
import { cosinePalette } from '#layers/shader/app/shaders/common/palette'
|
|
6
3
|
import { add, mul, time, uniform, uv } from 'three/tsl'
|
|
7
4
|
|
|
8
|
-
const
|
|
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
|
-
opacity: 1.0,
|
|
37
|
-
}
|
|
38
|
-
)
|
|
5
|
+
const {
|
|
6
|
+
id = 'gradient',
|
|
7
|
+
type = 'rainbow',
|
|
8
|
+
speed = 0.1,
|
|
9
|
+
brightness = [0.5, 0.5, 0.5],
|
|
10
|
+
contrast = [0.5, 0.5, 0.5],
|
|
11
|
+
frequency = [1.0, 1.0, 1.0],
|
|
12
|
+
phase = [0.0, 0.33, 0.67],
|
|
13
|
+
order = 0,
|
|
14
|
+
blend = 'normal',
|
|
15
|
+
opacity = 1.0,
|
|
16
|
+
} = defineProps<{
|
|
17
|
+
id?: string
|
|
18
|
+
/** Cosine palette type or 'linear' for UV-based gradient */
|
|
19
|
+
type?: 'rainbow' | 'sunset' | 'ocean' | 'fire' | 'ice' | 'neon' | 'pastel' | 'custom'
|
|
20
|
+
speed?: number
|
|
21
|
+
/** Custom brightness for cosine palette [r,g,b] */
|
|
22
|
+
brightness?: [number, number, number]
|
|
23
|
+
/** Custom contrast for cosine palette [r,g,b] */
|
|
24
|
+
contrast?: [number, number, number]
|
|
25
|
+
/** Custom frequency for cosine palette [r,g,b] */
|
|
26
|
+
frequency?: [number, number, number]
|
|
27
|
+
/** Custom phase for cosine palette [r,g,b] */
|
|
28
|
+
phase?: [number, number, number]
|
|
29
|
+
order?: number
|
|
30
|
+
blend?: 'normal' | 'add' | 'multiply' | 'screen' | 'overlay' | 'mix'
|
|
31
|
+
opacity?: number
|
|
32
|
+
}>()
|
|
39
33
|
|
|
40
34
|
const graph = useShaderGraphContext()
|
|
41
35
|
|
|
42
|
-
const uSpeed = uniform(
|
|
36
|
+
const uSpeed = uniform(speed)
|
|
43
37
|
|
|
44
38
|
// Palette presets
|
|
45
39
|
const palettePresets: Record<
|
|
@@ -99,20 +93,20 @@
|
|
|
99
93
|
const uvCoord = uv()
|
|
100
94
|
const t = add(uvCoord.x, mul(time, uSpeed))
|
|
101
95
|
|
|
102
|
-
const preset = palettePresets[
|
|
96
|
+
const preset = palettePresets[type]
|
|
103
97
|
if (preset) {
|
|
104
98
|
return cosinePalette(t, preset[0], preset[1], preset[2], preset[3])
|
|
105
99
|
}
|
|
106
100
|
|
|
107
101
|
// Custom
|
|
108
|
-
return cosinePalette(t,
|
|
102
|
+
return cosinePalette(t, brightness, contrast, frequency, phase)
|
|
109
103
|
}
|
|
110
104
|
|
|
111
105
|
let node = buildNode()
|
|
112
|
-
graph.register(
|
|
106
|
+
graph.register(id, node, order, blend, opacity)
|
|
113
107
|
|
|
114
108
|
watch(
|
|
115
|
-
() =>
|
|
109
|
+
() => speed,
|
|
116
110
|
(v) => {
|
|
117
111
|
uSpeed.value = v
|
|
118
112
|
}
|
|
@@ -120,15 +114,15 @@
|
|
|
120
114
|
|
|
121
115
|
// Rebuild on type or custom param changes
|
|
122
116
|
watch(
|
|
123
|
-
() => [
|
|
117
|
+
() => [type, brightness, contrast, frequency, phase] as const,
|
|
124
118
|
() => {
|
|
125
119
|
node = buildNode()
|
|
126
|
-
graph.update(
|
|
120
|
+
graph.update(id, node)
|
|
127
121
|
}
|
|
128
122
|
)
|
|
129
123
|
|
|
130
124
|
onUnmounted(() => {
|
|
131
|
-
graph.unregister(
|
|
125
|
+
graph.unregister(id)
|
|
132
126
|
})
|
|
133
127
|
</script>
|
|
134
128
|
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck - TSL types
|
|
5
2
|
/**
|
|
6
3
|
* Mix node -- combines child nodes registered in a nested shader graph.
|
|
7
4
|
* Children register into this component's own sub-graph, which is then
|
|
@@ -9,20 +6,17 @@
|
|
|
9
6
|
*/
|
|
10
7
|
import { vec3 } from 'three/tsl'
|
|
11
8
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
opacity: 1.0,
|
|
24
|
-
}
|
|
25
|
-
)
|
|
9
|
+
const {
|
|
10
|
+
id = 'mix',
|
|
11
|
+
order = 0,
|
|
12
|
+
blend = 'normal',
|
|
13
|
+
opacity = 1.0,
|
|
14
|
+
} = defineProps<{
|
|
15
|
+
id?: string
|
|
16
|
+
order?: number
|
|
17
|
+
blend?: 'normal' | 'add' | 'multiply' | 'screen' | 'overlay' | 'mix'
|
|
18
|
+
opacity?: number
|
|
19
|
+
}>()
|
|
26
20
|
|
|
27
21
|
const parentGraph = useShaderGraphContext()
|
|
28
22
|
|
|
@@ -36,14 +30,14 @@
|
|
|
36
30
|
const node = subGraph.finalNode.value || vec3(0, 0, 0)
|
|
37
31
|
if (parentGraph) {
|
|
38
32
|
// Re-register with updated composite node
|
|
39
|
-
parentGraph.register(
|
|
33
|
+
parentGraph.register(id, node, order, blend, opacity)
|
|
40
34
|
}
|
|
41
35
|
},
|
|
42
36
|
{ immediate: true }
|
|
43
37
|
)
|
|
44
38
|
|
|
45
39
|
onUnmounted(() => {
|
|
46
|
-
parentGraph.unregister(
|
|
40
|
+
parentGraph.unregister(id)
|
|
47
41
|
})
|
|
48
42
|
</script>
|
|
49
43
|
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck
|
|
5
2
|
import { Color } from 'three'
|
|
6
3
|
import { clamp, uniform, vec4 } from 'three/tsl'
|
|
7
4
|
|
|
8
5
|
import { blendAdd } from '../../shaders/common/blend'
|
|
6
|
+
import type { TSLNode } from '../../shaders/types'
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const {
|
|
9
|
+
color = '#808080',
|
|
10
|
+
opacity = 1,
|
|
11
|
+
order = 0,
|
|
12
|
+
} = defineProps<{
|
|
13
|
+
color?: string
|
|
14
|
+
opacity?: number
|
|
15
|
+
order?: number
|
|
16
|
+
}>()
|
|
18
17
|
|
|
19
|
-
const colorNode = uniform(new Color(
|
|
20
|
-
const opacityNode = uniform(
|
|
18
|
+
const colorNode: TSLNode = uniform(new Color(color))
|
|
19
|
+
const opacityNode = uniform(opacity)
|
|
21
20
|
watch(
|
|
22
|
-
() =>
|
|
21
|
+
() => color,
|
|
23
22
|
(v) => {
|
|
24
23
|
colorNode.value.set(v)
|
|
25
24
|
}
|
|
26
25
|
)
|
|
27
26
|
watch(
|
|
28
|
-
() =>
|
|
27
|
+
() => opacity,
|
|
29
28
|
(v) => {
|
|
30
29
|
opacityNode.value = v
|
|
31
30
|
}
|
|
@@ -33,6 +32,6 @@
|
|
|
33
32
|
|
|
34
33
|
useShaderStage(
|
|
35
34
|
(prev) => clamp(vec4(blendAdd(prev.xyz, colorNode, opacityNode), prev.w), 0, 1),
|
|
36
|
-
|
|
35
|
+
order
|
|
37
36
|
)
|
|
38
37
|
</script>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
|
|
6
|
-
import { clamp, float, floor, fract, sin, time, uniform, vec3, vec4 } from 'three/tsl'
|
|
2
|
+
import { clamp, float, floor, time, uniform, vec3, vec4 } from 'three/tsl'
|
|
7
3
|
|
|
8
4
|
import { luminance } from '../../shaders/common/blend'
|
|
9
5
|
import { grain, vignette } from '../../shaders/common/grain'
|
|
@@ -12,45 +8,48 @@
|
|
|
12
8
|
* Preset: combines grain + warm tone shift + vignette + slight fade.
|
|
13
9
|
* A convenient one-stop aged film look.
|
|
14
10
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
const {
|
|
12
|
+
intensity = 1,
|
|
13
|
+
grainStrength = 0.04,
|
|
14
|
+
vignetteStrength = 0.5,
|
|
15
|
+
warmth = 0.15,
|
|
16
|
+
order = 0,
|
|
17
|
+
} = defineProps<{
|
|
18
|
+
/** Overall intensity: 0 = no effect, 1 = full aged look */
|
|
19
|
+
intensity?: number
|
|
20
|
+
/** Grain strength */
|
|
21
|
+
grainStrength?: number
|
|
22
|
+
/** Vignette darkness */
|
|
23
|
+
vignetteStrength?: number
|
|
24
|
+
/** Warm shadow tint amount */
|
|
25
|
+
warmth?: number
|
|
26
|
+
order?: number
|
|
27
|
+
}>()
|
|
29
28
|
|
|
30
|
-
const intensityNode = uniform(
|
|
31
|
-
const grainNode = uniform(
|
|
32
|
-
const vigNode = uniform(
|
|
33
|
-
const warmthNode = uniform(
|
|
29
|
+
const intensityNode = uniform(intensity)
|
|
30
|
+
const grainNode = uniform(grainStrength)
|
|
31
|
+
const vigNode = uniform(vignetteStrength)
|
|
32
|
+
const warmthNode = uniform(warmth)
|
|
34
33
|
watch(
|
|
35
|
-
() =>
|
|
34
|
+
() => intensity,
|
|
36
35
|
(v) => {
|
|
37
36
|
intensityNode.value = v
|
|
38
37
|
}
|
|
39
38
|
)
|
|
40
39
|
watch(
|
|
41
|
-
() =>
|
|
40
|
+
() => grainStrength,
|
|
42
41
|
(v) => {
|
|
43
42
|
grainNode.value = v
|
|
44
43
|
}
|
|
45
44
|
)
|
|
46
45
|
watch(
|
|
47
|
-
() =>
|
|
46
|
+
() => vignetteStrength,
|
|
48
47
|
(v) => {
|
|
49
48
|
vigNode.value = v
|
|
50
49
|
}
|
|
51
50
|
)
|
|
52
51
|
watch(
|
|
53
|
-
() =>
|
|
52
|
+
() => warmth,
|
|
54
53
|
(v) => {
|
|
55
54
|
warmthNode.value = v
|
|
56
55
|
}
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
|
|
80
79
|
const result = clamp(faded.mul(vig).add(g), 0, 1)
|
|
81
80
|
return vec4(result.mix(prev.xyz, float(1).sub(intensityNode)), prev.w)
|
|
82
|
-
},
|
|
81
|
+
}, order)
|
|
83
82
|
</script>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { Color, Vector3 } from 'three'
|
|
7
|
-
import { clamp, float, mix,
|
|
3
|
+
import { clamp, float, mix, time, uniform, vec2, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
import { fbm2D } from '../../shaders/common/noise'
|
|
10
6
|
|
|
@@ -12,78 +8,75 @@
|
|
|
12
8
|
* Aurora borealis — layered animated colour bands across the upper screen.
|
|
13
9
|
* Uses FBM noise to create organic ribbon-like curtains of light.
|
|
14
10
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
order: 0,
|
|
39
|
-
}
|
|
40
|
-
)
|
|
11
|
+
const {
|
|
12
|
+
colorA = '#00ff88',
|
|
13
|
+
colorB = '#8844ff',
|
|
14
|
+
bandY = 0.7,
|
|
15
|
+
bandHeight = 0.3,
|
|
16
|
+
speed = 0.3,
|
|
17
|
+
intensity = 0.7,
|
|
18
|
+
order = 0,
|
|
19
|
+
} = defineProps<{
|
|
20
|
+
/** Primary aurora colour */
|
|
21
|
+
colorA?: string
|
|
22
|
+
/** Secondary aurora colour */
|
|
23
|
+
colorB?: string
|
|
24
|
+
/** Vertical position of aurora band centre */
|
|
25
|
+
bandY?: number
|
|
26
|
+
/** Vertical band height */
|
|
27
|
+
bandHeight?: number
|
|
28
|
+
/** Animation speed */
|
|
29
|
+
speed?: number
|
|
30
|
+
/** Effect intensity */
|
|
31
|
+
intensity?: number
|
|
32
|
+
order?: number
|
|
33
|
+
}>()
|
|
41
34
|
|
|
42
35
|
function toVec3Node(hex: string) {
|
|
43
36
|
const c = new Color(hex)
|
|
44
37
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
45
38
|
}
|
|
46
39
|
|
|
47
|
-
const colorANode = toVec3Node(
|
|
48
|
-
const colorBNode = toVec3Node(
|
|
49
|
-
const bandYNode = uniform(
|
|
50
|
-
const bandHNode = uniform(
|
|
51
|
-
const speedNode = uniform(
|
|
52
|
-
const intensityNode = uniform(
|
|
40
|
+
const colorANode = toVec3Node(colorA)
|
|
41
|
+
const colorBNode = toVec3Node(colorB)
|
|
42
|
+
const bandYNode = uniform(bandY)
|
|
43
|
+
const bandHNode = uniform(bandHeight)
|
|
44
|
+
const speedNode = uniform(speed)
|
|
45
|
+
const intensityNode = uniform(intensity)
|
|
53
46
|
watch(
|
|
54
|
-
() =>
|
|
47
|
+
() => colorA,
|
|
55
48
|
(v) => {
|
|
56
49
|
const c = new Color(v)
|
|
57
50
|
colorANode.value.set(c.r, c.g, c.b)
|
|
58
51
|
}
|
|
59
52
|
)
|
|
60
53
|
watch(
|
|
61
|
-
() =>
|
|
54
|
+
() => colorB,
|
|
62
55
|
(v) => {
|
|
63
56
|
const c = new Color(v)
|
|
64
57
|
colorBNode.value.set(c.r, c.g, c.b)
|
|
65
58
|
}
|
|
66
59
|
)
|
|
67
60
|
watch(
|
|
68
|
-
() =>
|
|
61
|
+
() => bandY,
|
|
69
62
|
(v) => {
|
|
70
63
|
bandYNode.value = v
|
|
71
64
|
}
|
|
72
65
|
)
|
|
73
66
|
watch(
|
|
74
|
-
() =>
|
|
67
|
+
() => bandHeight,
|
|
75
68
|
(v) => {
|
|
76
69
|
bandHNode.value = v
|
|
77
70
|
}
|
|
78
71
|
)
|
|
79
72
|
watch(
|
|
80
|
-
() =>
|
|
73
|
+
() => speed,
|
|
81
74
|
(v) => {
|
|
82
75
|
speedNode.value = v
|
|
83
76
|
}
|
|
84
77
|
)
|
|
85
78
|
watch(
|
|
86
|
-
() =>
|
|
79
|
+
() => intensity,
|
|
87
80
|
(v) => {
|
|
88
81
|
intensityNode.value = v
|
|
89
82
|
}
|
|
@@ -113,5 +106,5 @@
|
|
|
113
106
|
|
|
114
107
|
const contribution = aurora.mul(bandMask.pow(2)).mul(intensityNode)
|
|
115
108
|
return vec4(prev.xyz.add(contribution), prev.w)
|
|
116
|
-
},
|
|
109
|
+
}, order)
|
|
117
110
|
</script>
|
|
@@ -1,64 +1,57 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { Color, Vector3 } from 'three'
|
|
7
3
|
import { mix, uniform, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
order: 0,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
5
|
+
const {
|
|
6
|
+
bottomLeft = '#000000',
|
|
7
|
+
bottomRight = '#ff0000',
|
|
8
|
+
topLeft = '#0000ff',
|
|
9
|
+
topRight = '#ffffff',
|
|
10
|
+
order = 0,
|
|
11
|
+
} = defineProps<{
|
|
12
|
+
/** Bottom-left corner colour */
|
|
13
|
+
bottomLeft?: string
|
|
14
|
+
/** Bottom-right corner colour */
|
|
15
|
+
bottomRight?: string
|
|
16
|
+
/** Top-left corner colour */
|
|
17
|
+
topLeft?: string
|
|
18
|
+
/** Top-right corner colour */
|
|
19
|
+
topRight?: string
|
|
20
|
+
order?: number
|
|
21
|
+
}>()
|
|
29
22
|
|
|
30
23
|
function toVec3Node(hex: string) {
|
|
31
24
|
const c = new Color(hex)
|
|
32
25
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
33
26
|
}
|
|
34
27
|
|
|
35
|
-
const blNode = toVec3Node(
|
|
36
|
-
const brNode = toVec3Node(
|
|
37
|
-
const tlNode = toVec3Node(
|
|
38
|
-
const trNode = toVec3Node(
|
|
28
|
+
const blNode = toVec3Node(bottomLeft)
|
|
29
|
+
const brNode = toVec3Node(bottomRight)
|
|
30
|
+
const tlNode = toVec3Node(topLeft)
|
|
31
|
+
const trNode = toVec3Node(topRight)
|
|
39
32
|
watch(
|
|
40
|
-
() =>
|
|
33
|
+
() => bottomLeft,
|
|
41
34
|
(v) => {
|
|
42
35
|
const c = new Color(v)
|
|
43
36
|
blNode.value.set(c.r, c.g, c.b)
|
|
44
37
|
}
|
|
45
38
|
)
|
|
46
39
|
watch(
|
|
47
|
-
() =>
|
|
40
|
+
() => bottomRight,
|
|
48
41
|
(v) => {
|
|
49
42
|
const c = new Color(v)
|
|
50
43
|
brNode.value.set(c.r, c.g, c.b)
|
|
51
44
|
}
|
|
52
45
|
)
|
|
53
46
|
watch(
|
|
54
|
-
() =>
|
|
47
|
+
() => topLeft,
|
|
55
48
|
(v) => {
|
|
56
49
|
const c = new Color(v)
|
|
57
50
|
tlNode.value.set(c.r, c.g, c.b)
|
|
58
51
|
}
|
|
59
52
|
)
|
|
60
53
|
watch(
|
|
61
|
-
() =>
|
|
54
|
+
() => topRight,
|
|
62
55
|
(v) => {
|
|
63
56
|
const c = new Color(v)
|
|
64
57
|
trNode.value.set(c.r, c.g, c.b)
|
|
@@ -73,5 +66,5 @@
|
|
|
73
66
|
const top = mix(tlNode, trNode, uvCurrent.x)
|
|
74
67
|
const colour = mix(bottom, top, uvCurrent.y)
|
|
75
68
|
return vec4(colour, 1.0)
|
|
76
|
-
},
|
|
69
|
+
}, order)
|
|
77
70
|
</script>
|
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { Color, Vector3 } from 'three'
|
|
7
3
|
import { float, mix, time, uniform, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
import { turbulence2D } from '../../shaders/common/noise'
|
|
10
6
|
|
|
11
7
|
/** Billow/turbulence noise — folded abs() of FBM, producing cloud-like forms. */
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
const {
|
|
9
|
+
colorA = '#1a3a8a',
|
|
10
|
+
colorB = '#ffffff',
|
|
11
|
+
scale = 2,
|
|
12
|
+
speed = 0.1,
|
|
13
|
+
order = 0,
|
|
14
|
+
} = defineProps<{
|
|
15
|
+
colorA?: string
|
|
16
|
+
colorB?: string
|
|
17
|
+
scale?: number
|
|
18
|
+
speed?: number
|
|
19
|
+
order?: number
|
|
20
|
+
}>()
|
|
22
21
|
|
|
23
22
|
function toVec3Node(hex: string) {
|
|
24
23
|
const c = new Color(hex)
|
|
25
24
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
const colorANode = toVec3Node(
|
|
29
|
-
const colorBNode = toVec3Node(
|
|
30
|
-
const scaleNode = uniform(
|
|
31
|
-
const speedNode = uniform(
|
|
27
|
+
const colorANode = toVec3Node(colorA)
|
|
28
|
+
const colorBNode = toVec3Node(colorB)
|
|
29
|
+
const scaleNode = uniform(scale)
|
|
30
|
+
const speedNode = uniform(speed)
|
|
32
31
|
watch(
|
|
33
|
-
() =>
|
|
32
|
+
() => colorA,
|
|
34
33
|
(v) => {
|
|
35
34
|
const c = new Color(v)
|
|
36
35
|
colorANode.value.set(c.r, c.g, c.b)
|
|
37
36
|
}
|
|
38
37
|
)
|
|
39
38
|
watch(
|
|
40
|
-
() =>
|
|
39
|
+
() => colorB,
|
|
41
40
|
(v) => {
|
|
42
41
|
const c = new Color(v)
|
|
43
42
|
colorBNode.value.set(c.r, c.g, c.b)
|
|
44
43
|
}
|
|
45
44
|
)
|
|
46
45
|
watch(
|
|
47
|
-
() =>
|
|
46
|
+
() => scale,
|
|
48
47
|
(v) => {
|
|
49
48
|
scaleNode.value = v
|
|
50
49
|
}
|
|
51
50
|
)
|
|
52
51
|
watch(
|
|
53
|
-
() =>
|
|
52
|
+
() => speed,
|
|
54
53
|
(v) => {
|
|
55
54
|
speedNode.value = v
|
|
56
55
|
}
|
|
@@ -62,5 +61,5 @@
|
|
|
62
61
|
const uv = pipeline.uvNode.value
|
|
63
62
|
const n = turbulence2D(uv.mul(scaleNode).add(time.mul(speedNode)))
|
|
64
63
|
return vec4(mix(colorANode, colorBNode, n), float(1))
|
|
65
|
-
},
|
|
64
|
+
}, order)
|
|
66
65
|
</script>
|