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,79 +1,72 @@
|
|
|
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 { domainWarp2D } from '../../shaders/common/noise'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
order: 0,
|
|
29
|
-
}
|
|
30
|
-
)
|
|
7
|
+
const {
|
|
8
|
+
colorA = '#000000',
|
|
9
|
+
colorB = '#ffffff',
|
|
10
|
+
scale = 2,
|
|
11
|
+
warpStrength = 0.5,
|
|
12
|
+
warpScale = 2,
|
|
13
|
+
speed = 0.1,
|
|
14
|
+
order = 0,
|
|
15
|
+
} = defineProps<{
|
|
16
|
+
colorA?: string
|
|
17
|
+
colorB?: string
|
|
18
|
+
scale?: number
|
|
19
|
+
warpStrength?: number
|
|
20
|
+
warpScale?: number
|
|
21
|
+
speed?: number
|
|
22
|
+
order?: number
|
|
23
|
+
}>()
|
|
31
24
|
|
|
32
25
|
function toVec3Node(hex: string) {
|
|
33
26
|
const c = new Color(hex)
|
|
34
27
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
const colorANode = toVec3Node(
|
|
38
|
-
const colorBNode = toVec3Node(
|
|
39
|
-
const scaleNode = uniform(
|
|
40
|
-
const warpStrNode = uniform(
|
|
41
|
-
const warpScaleNode = uniform(
|
|
42
|
-
const speedNode = uniform(
|
|
30
|
+
const colorANode = toVec3Node(colorA)
|
|
31
|
+
const colorBNode = toVec3Node(colorB)
|
|
32
|
+
const scaleNode = uniform(scale)
|
|
33
|
+
const warpStrNode = uniform(warpStrength)
|
|
34
|
+
const warpScaleNode = uniform(warpScale)
|
|
35
|
+
const speedNode = uniform(speed)
|
|
43
36
|
watch(
|
|
44
|
-
() =>
|
|
37
|
+
() => colorA,
|
|
45
38
|
(v) => {
|
|
46
39
|
const c = new Color(v)
|
|
47
40
|
colorANode.value.set(c.r, c.g, c.b)
|
|
48
41
|
}
|
|
49
42
|
)
|
|
50
43
|
watch(
|
|
51
|
-
() =>
|
|
44
|
+
() => colorB,
|
|
52
45
|
(v) => {
|
|
53
46
|
const c = new Color(v)
|
|
54
47
|
colorBNode.value.set(c.r, c.g, c.b)
|
|
55
48
|
}
|
|
56
49
|
)
|
|
57
50
|
watch(
|
|
58
|
-
() =>
|
|
51
|
+
() => scale,
|
|
59
52
|
(v) => {
|
|
60
53
|
scaleNode.value = v
|
|
61
54
|
}
|
|
62
55
|
)
|
|
63
56
|
watch(
|
|
64
|
-
() =>
|
|
57
|
+
() => warpStrength,
|
|
65
58
|
(v) => {
|
|
66
59
|
warpStrNode.value = v
|
|
67
60
|
}
|
|
68
61
|
)
|
|
69
62
|
watch(
|
|
70
|
-
() =>
|
|
63
|
+
() => warpScale,
|
|
71
64
|
(v) => {
|
|
72
65
|
warpScaleNode.value = v
|
|
73
66
|
}
|
|
74
67
|
)
|
|
75
68
|
watch(
|
|
76
|
-
() =>
|
|
69
|
+
() => speed,
|
|
77
70
|
(v) => {
|
|
78
71
|
speedNode.value = v
|
|
79
72
|
}
|
|
@@ -86,5 +79,5 @@
|
|
|
86
79
|
const animated = uv.add(time.mul(speedNode))
|
|
87
80
|
const n = domainWarp2D(animated.mul(scaleNode), warpStrNode, warpScaleNode).mul(0.5).add(0.5)
|
|
88
81
|
return vec4(mix(colorANode, colorBNode, n), float(1))
|
|
89
|
-
},
|
|
82
|
+
}, order)
|
|
90
83
|
</script>
|
|
@@ -1,70 +1,63 @@
|
|
|
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, uniform, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
import { dots } from '../../shaders/common/shapes'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
order: 0,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
7
|
+
const {
|
|
8
|
+
colorA = '#000000',
|
|
9
|
+
colorB = '#ffffff',
|
|
10
|
+
cellSize = 0.08,
|
|
11
|
+
dotRadius = 0.025,
|
|
12
|
+
softness = 0.005,
|
|
13
|
+
order = 0,
|
|
14
|
+
} = defineProps<{
|
|
15
|
+
colorA?: string
|
|
16
|
+
colorB?: string
|
|
17
|
+
cellSize?: number
|
|
18
|
+
dotRadius?: number
|
|
19
|
+
softness?: number
|
|
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 colorANode = toVec3Node(
|
|
36
|
-
const colorBNode = toVec3Node(
|
|
37
|
-
const cellNode = uniform(
|
|
38
|
-
const dotNode = uniform(
|
|
39
|
-
const softNode = uniform(
|
|
28
|
+
const colorANode = toVec3Node(colorA)
|
|
29
|
+
const colorBNode = toVec3Node(colorB)
|
|
30
|
+
const cellNode = uniform(cellSize)
|
|
31
|
+
const dotNode = uniform(dotRadius)
|
|
32
|
+
const softNode = uniform(softness)
|
|
40
33
|
watch(
|
|
41
|
-
() =>
|
|
34
|
+
() => colorA,
|
|
42
35
|
(v) => {
|
|
43
36
|
const c = new Color(v)
|
|
44
37
|
colorANode.value.set(c.r, c.g, c.b)
|
|
45
38
|
}
|
|
46
39
|
)
|
|
47
40
|
watch(
|
|
48
|
-
() =>
|
|
41
|
+
() => colorB,
|
|
49
42
|
(v) => {
|
|
50
43
|
const c = new Color(v)
|
|
51
44
|
colorBNode.value.set(c.r, c.g, c.b)
|
|
52
45
|
}
|
|
53
46
|
)
|
|
54
47
|
watch(
|
|
55
|
-
() =>
|
|
48
|
+
() => cellSize,
|
|
56
49
|
(v) => {
|
|
57
50
|
cellNode.value = v
|
|
58
51
|
}
|
|
59
52
|
)
|
|
60
53
|
watch(
|
|
61
|
-
() =>
|
|
54
|
+
() => dotRadius,
|
|
62
55
|
(v) => {
|
|
63
56
|
dotNode.value = v
|
|
64
57
|
}
|
|
65
58
|
)
|
|
66
59
|
watch(
|
|
67
|
-
() =>
|
|
60
|
+
() => softness,
|
|
68
61
|
(v) => {
|
|
69
62
|
softNode.value = v
|
|
70
63
|
}
|
|
@@ -76,5 +69,5 @@
|
|
|
76
69
|
const uv = pipeline.uvNode.value
|
|
77
70
|
const mask = dots(uv, cellNode, dotNode, softNode)
|
|
78
71
|
return vec4(mix(colorANode, colorBNode, mask), float(1))
|
|
79
|
-
},
|
|
72
|
+
}, order)
|
|
80
73
|
</script>
|
|
@@ -1,40 +1,37 @@
|
|
|
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
5
|
import { luminance } from '../../shaders/common/blend'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
const {
|
|
8
|
+
shadowColor = '#1a0033',
|
|
9
|
+
highlightColor = '#ffcc00',
|
|
10
|
+
order = 0,
|
|
11
|
+
} = defineProps<{
|
|
12
|
+
/** Shadow colour (low luminance) */
|
|
13
|
+
shadowColor?: string
|
|
14
|
+
/** Highlight colour (high luminance) */
|
|
15
|
+
highlightColor?: string
|
|
16
|
+
order?: number
|
|
17
|
+
}>()
|
|
21
18
|
|
|
22
19
|
function toVec3Node(hex: string) {
|
|
23
20
|
const c = new Color(hex)
|
|
24
21
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
const shadowNode = toVec3Node(
|
|
28
|
-
const highlightNode = toVec3Node(
|
|
24
|
+
const shadowNode = toVec3Node(shadowColor)
|
|
25
|
+
const highlightNode = toVec3Node(highlightColor)
|
|
29
26
|
watch(
|
|
30
|
-
() =>
|
|
27
|
+
() => shadowColor,
|
|
31
28
|
(v) => {
|
|
32
29
|
const c = new Color(v)
|
|
33
30
|
shadowNode.value.set(c.r, c.g, c.b)
|
|
34
31
|
}
|
|
35
32
|
)
|
|
36
33
|
watch(
|
|
37
|
-
() =>
|
|
34
|
+
() => highlightColor,
|
|
38
35
|
(v) => {
|
|
39
36
|
const c = new Color(v)
|
|
40
37
|
highlightNode.value.set(c.r, c.g, c.b)
|
|
@@ -44,5 +41,5 @@
|
|
|
44
41
|
useShaderStage((prev) => {
|
|
45
42
|
const lum = luminance(prev.xyz)
|
|
46
43
|
return vec4(mix(shadowNode, highlightNode, lum), prev.w)
|
|
47
|
-
},
|
|
44
|
+
}, order)
|
|
48
45
|
</script>
|
|
@@ -1,36 +1,33 @@
|
|
|
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
5
|
import { blendExclusion } from '../../shaders/common/blend'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const {
|
|
8
|
+
color = '#ffffff',
|
|
9
|
+
opacity = 1,
|
|
10
|
+
order = 0,
|
|
11
|
+
} = defineProps<{
|
|
12
|
+
color?: string
|
|
13
|
+
opacity?: number
|
|
14
|
+
order?: number
|
|
15
|
+
}>()
|
|
19
16
|
|
|
20
17
|
const colorNode = (() => {
|
|
21
|
-
const c = new Color(
|
|
18
|
+
const c = new Color(color)
|
|
22
19
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
23
20
|
})()
|
|
24
|
-
const opacityNode = uniform(
|
|
21
|
+
const opacityNode = uniform(opacity)
|
|
25
22
|
watch(
|
|
26
|
-
() =>
|
|
23
|
+
() => color,
|
|
27
24
|
(v) => {
|
|
28
25
|
const c = new Color(v)
|
|
29
26
|
colorNode.value.set(c.r, c.g, c.b)
|
|
30
27
|
}
|
|
31
28
|
)
|
|
32
29
|
watch(
|
|
33
|
-
() =>
|
|
30
|
+
() => opacity,
|
|
34
31
|
(v) => {
|
|
35
32
|
opacityNode.value = v
|
|
36
33
|
}
|
|
@@ -38,6 +35,6 @@
|
|
|
38
35
|
|
|
39
36
|
useShaderStage(
|
|
40
37
|
(prev) => vec4(mix(prev.xyz, blendExclusion(prev.xyz, colorNode), opacityNode), prev.w),
|
|
41
|
-
|
|
38
|
+
order
|
|
42
39
|
)
|
|
43
40
|
</script>
|
|
@@ -1,8 +1,4 @@
|
|
|
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
|
|
|
@@ -11,42 +7,44 @@
|
|
|
11
7
|
* Blends prev colour toward fogColor as the ray approaches the horizon.
|
|
12
8
|
* Pairs naturally with SkyAtmosphere — place before it so terrain gets fog too.
|
|
13
9
|
*/
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
const {
|
|
11
|
+
fogColor = '#c8d8e8',
|
|
12
|
+
density = 4,
|
|
13
|
+
horizonBias = 0,
|
|
14
|
+
order = 0,
|
|
15
|
+
} = defineProps<{
|
|
16
|
+
/** Fog colour */
|
|
17
|
+
fogColor?: string
|
|
18
|
+
/** Controls how quickly fog builds near the horizon — higher = thicker */
|
|
19
|
+
density?: number
|
|
20
|
+
/** Clamp the minimum ray Y used for fog (prevents underground fog) */
|
|
21
|
+
horizonBias?: number
|
|
22
|
+
order?: number
|
|
23
|
+
}>()
|
|
26
24
|
|
|
27
25
|
function toVec3Node(hex: string) {
|
|
28
26
|
const c = new Color(hex)
|
|
29
27
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
const fogColorNode = toVec3Node(
|
|
33
|
-
const densityNode = uniform(
|
|
34
|
-
const horizonBiasNode = uniform(
|
|
30
|
+
const fogColorNode = toVec3Node(fogColor)
|
|
31
|
+
const densityNode = uniform(density)
|
|
32
|
+
const horizonBiasNode = uniform(horizonBias)
|
|
35
33
|
watch(
|
|
36
|
-
() =>
|
|
34
|
+
() => fogColor,
|
|
37
35
|
(v) => {
|
|
38
36
|
const c = new Color(v)
|
|
39
37
|
fogColorNode.value.set(c.r, c.g, c.b)
|
|
40
38
|
}
|
|
41
39
|
)
|
|
42
40
|
watch(
|
|
43
|
-
() =>
|
|
41
|
+
() => density,
|
|
44
42
|
(v) => {
|
|
45
43
|
densityNode.value = v
|
|
46
44
|
}
|
|
47
45
|
)
|
|
48
46
|
watch(
|
|
49
|
-
() =>
|
|
47
|
+
() => horizonBias,
|
|
50
48
|
(v) => {
|
|
51
49
|
horizonBiasNode.value = v
|
|
52
50
|
}
|
|
@@ -59,5 +57,5 @@
|
|
|
59
57
|
const h = ray ? ray.y.max(horizonBiasNode) : horizonBiasNode
|
|
60
58
|
const fogFactor = h.mul(densityNode).negate().exp2()
|
|
61
59
|
return vec4(mix(fogColorNode, prev.xyz, fogFactor), prev.w)
|
|
62
|
-
},
|
|
60
|
+
}, order)
|
|
63
61
|
</script>
|
|
@@ -1,22 +1,15 @@
|
|
|
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 { float, pow, uniform, vec4 } from 'three/tsl'
|
|
7
3
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}>(),
|
|
14
|
-
{ stops: 0, order: 0 }
|
|
15
|
-
)
|
|
4
|
+
const { stops = 0, order = 0 } = defineProps<{
|
|
5
|
+
/** Exposure in stops: 0 = unchanged, +1 = 2× brighter, -1 = 2× darker */
|
|
6
|
+
stops?: number
|
|
7
|
+
order?: number
|
|
8
|
+
}>()
|
|
16
9
|
|
|
17
|
-
const stopsNode = uniform(
|
|
10
|
+
const stopsNode = uniform(stops)
|
|
18
11
|
watch(
|
|
19
|
-
() =>
|
|
12
|
+
() => stops,
|
|
20
13
|
(v) => {
|
|
21
14
|
stopsNode.value = v
|
|
22
15
|
}
|
|
@@ -25,5 +18,5 @@
|
|
|
25
18
|
useShaderStage((prev) => {
|
|
26
19
|
const scale = pow(float(2), stopsNode)
|
|
27
20
|
return vec4(prev.xyz.mul(scale), prev.w)
|
|
28
|
-
},
|
|
21
|
+
}, order)
|
|
29
22
|
</script>
|
|
@@ -1,62 +1,54 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
3
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
4
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
5
1
|
<script setup lang="ts">
|
|
6
|
-
// @ts-nocheck
|
|
7
2
|
import { Color } from 'three'
|
|
8
3
|
import { float, mix, time, uniform, vec2, vec4 } from 'three/tsl'
|
|
9
4
|
|
|
10
5
|
import { fbm2D } from '../../shaders/common/noise'
|
|
11
6
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
order: 0,
|
|
30
|
-
}
|
|
31
|
-
)
|
|
7
|
+
const {
|
|
8
|
+
colorA = '#000000',
|
|
9
|
+
colorB = '#ffffff',
|
|
10
|
+
scale = 3,
|
|
11
|
+
octaves = 5,
|
|
12
|
+
animated = true,
|
|
13
|
+
speed = 0.15,
|
|
14
|
+
order = 0,
|
|
15
|
+
} = defineProps<{
|
|
16
|
+
colorA?: string
|
|
17
|
+
colorB?: string
|
|
18
|
+
scale?: number
|
|
19
|
+
octaves?: number
|
|
20
|
+
animated?: boolean
|
|
21
|
+
speed?: number
|
|
22
|
+
order?: number
|
|
23
|
+
}>()
|
|
32
24
|
|
|
33
|
-
const colorAVal = new Color(
|
|
34
|
-
const colorBVal = new Color(
|
|
25
|
+
const colorAVal = new Color(colorA)
|
|
26
|
+
const colorBVal = new Color(colorB)
|
|
35
27
|
const colorANode = uniform(colorAVal)
|
|
36
28
|
const colorBNode = uniform(colorBVal)
|
|
37
|
-
const scaleNode = uniform(
|
|
38
|
-
const speedNode = uniform(
|
|
29
|
+
const scaleNode = uniform(scale)
|
|
30
|
+
const speedNode = uniform(speed)
|
|
39
31
|
|
|
40
32
|
watch(
|
|
41
|
-
() =>
|
|
33
|
+
() => colorA,
|
|
42
34
|
(v) => {
|
|
43
35
|
colorANode.value.set(v)
|
|
44
36
|
}
|
|
45
37
|
)
|
|
46
38
|
watch(
|
|
47
|
-
() =>
|
|
39
|
+
() => colorB,
|
|
48
40
|
(v) => {
|
|
49
41
|
colorBNode.value.set(v)
|
|
50
42
|
}
|
|
51
43
|
)
|
|
52
44
|
watch(
|
|
53
|
-
() =>
|
|
45
|
+
() => scale,
|
|
54
46
|
(v) => {
|
|
55
47
|
scaleNode.value = v
|
|
56
48
|
}
|
|
57
49
|
)
|
|
58
50
|
watch(
|
|
59
|
-
() =>
|
|
51
|
+
() => speed,
|
|
60
52
|
(v) => {
|
|
61
53
|
speedNode.value = v
|
|
62
54
|
}
|
|
@@ -65,9 +57,9 @@
|
|
|
65
57
|
const { uvNode } = useShaderPipelineContext()
|
|
66
58
|
|
|
67
59
|
useShaderStage((_prev) => {
|
|
68
|
-
const offset =
|
|
60
|
+
const offset = animated ? time.mul(speedNode) : float(0)
|
|
69
61
|
const input = uvNode.value.mul(scaleNode).add(vec2(offset, 0))
|
|
70
|
-
const n = fbm2D(input, { octaves:
|
|
62
|
+
const n = fbm2D(input, { octaves: octaves }).mul(0.5).add(0.5)
|
|
71
63
|
return vec4(mix(colorANode, colorBNode, n), 1.0)
|
|
72
|
-
},
|
|
64
|
+
}, order)
|
|
73
65
|
</script>
|
|
@@ -1,60 +1,59 @@
|
|
|
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, Vector2, Vector3 } from 'three'
|
|
7
|
-
import { float,
|
|
3
|
+
import { float, smoothstep, uniform, vec2, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
/**
|
|
10
6
|
* Orange/warm light leak emanating from a screen corner.
|
|
11
7
|
* Additive over-exposure effect — common in analogue film.
|
|
12
8
|
*/
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const {
|
|
10
|
+
color = '#ff8822',
|
|
11
|
+
origin = [0, 1],
|
|
12
|
+
radius = 0.7,
|
|
13
|
+
intensity = 0.5,
|
|
14
|
+
order = 0,
|
|
15
|
+
} = defineProps<{
|
|
16
|
+
/** Light leak colour */
|
|
17
|
+
color?: string
|
|
18
|
+
/** Corner origin [0,1] — default top-left */
|
|
19
|
+
origin?: [number, number]
|
|
20
|
+
/** Reach of the leak */
|
|
21
|
+
radius?: number
|
|
22
|
+
/** Peak brightness */
|
|
23
|
+
intensity?: number
|
|
24
|
+
order?: number
|
|
25
|
+
}>()
|
|
27
26
|
|
|
28
27
|
function toVec3Node(hex: string) {
|
|
29
28
|
const c = new Color(hex)
|
|
30
29
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
const colorNode = toVec3Node(
|
|
34
|
-
const originNode = uniform(new Vector2(...
|
|
35
|
-
const radiusNode = uniform(
|
|
36
|
-
const intensityNode = uniform(
|
|
32
|
+
const colorNode = toVec3Node(color)
|
|
33
|
+
const originNode = uniform(new Vector2(...origin))
|
|
34
|
+
const radiusNode = uniform(radius)
|
|
35
|
+
const intensityNode = uniform(intensity)
|
|
37
36
|
watch(
|
|
38
|
-
() =>
|
|
37
|
+
() => color,
|
|
39
38
|
(v) => {
|
|
40
39
|
const c = new Color(v)
|
|
41
40
|
colorNode.value.set(c.r, c.g, c.b)
|
|
42
41
|
}
|
|
43
42
|
)
|
|
44
43
|
watch(
|
|
45
|
-
() =>
|
|
44
|
+
() => origin,
|
|
46
45
|
([x, y]) => {
|
|
47
46
|
originNode.value.set(x, y)
|
|
48
47
|
}
|
|
49
48
|
)
|
|
50
49
|
watch(
|
|
51
|
-
() =>
|
|
50
|
+
() => radius,
|
|
52
51
|
(v) => {
|
|
53
52
|
radiusNode.value = v
|
|
54
53
|
}
|
|
55
54
|
)
|
|
56
55
|
watch(
|
|
57
|
-
() =>
|
|
56
|
+
() => intensity,
|
|
58
57
|
(v) => {
|
|
59
58
|
intensityNode.value = v
|
|
60
59
|
}
|
|
@@ -67,5 +66,5 @@
|
|
|
67
66
|
const dist = uv.sub(vec2(originNode.x, originNode.y)).length()
|
|
68
67
|
const leak = smoothstep(radiusNode, float(0), dist).mul(intensityNode)
|
|
69
68
|
return vec4(prev.xyz.add(colorNode.mul(leak)), prev.w)
|
|
70
|
-
},
|
|
69
|
+
}, order)
|
|
71
70
|
</script>
|