kmcom-nuxt-layers 2.2.0 → 2.2.2
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 +21 -7
- 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 +0 -2
- package/layers/content/app/composables/usePortfolioItems.ts +0 -2
- 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 +4 -1
- package/layers/scroll/app/components/Motion/Parallax.vue +38 -42
- package/layers/scroll/app/components/Motion/PinnedSection.vue +4 -1
- 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 +0 -1
- 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 +0 -1
- 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 +109 -75
- 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 +3 -2
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */
|
|
2
|
-
/* eslint-disable complexity */
|
|
3
|
-
/* eslint-disable eqeqeq */
|
|
4
|
-
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
5
1
|
import type { Ref } from 'vue'
|
|
6
2
|
import type LocomotiveScroll from 'locomotive-scroll'
|
|
7
3
|
|
|
@@ -31,7 +27,7 @@ export function useSmoothScroll() {
|
|
|
31
27
|
)
|
|
32
28
|
|
|
33
29
|
const isEnabled = computed(() => (appConfig.scroll?.smoothScroll ?? true) !== false)
|
|
34
|
-
const isReady = computed(() => locomotiveScroll.value
|
|
30
|
+
const isReady = computed(() => locomotiveScroll.value !== null)
|
|
35
31
|
|
|
36
32
|
const scrollState = computed(
|
|
37
33
|
() =>
|
|
@@ -75,9 +71,9 @@ export function useSmoothScroll() {
|
|
|
75
71
|
lock: options?.lock ?? false,
|
|
76
72
|
...(options?.onComplete !== undefined && { onComplete: options.onComplete }),
|
|
77
73
|
})
|
|
78
|
-
|
|
79
|
-
nativeScrollTo(target, options)
|
|
74
|
+
return
|
|
80
75
|
}
|
|
76
|
+
nativeScrollTo(target, options)
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
function scrollToTop(options?: { duration?: number; immediate?: boolean }) {
|
|
@@ -107,28 +103,29 @@ export function useSmoothScroll() {
|
|
|
107
103
|
}
|
|
108
104
|
}
|
|
109
105
|
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const element = document.querySelector(target)
|
|
117
|
-
if (!element) return
|
|
118
|
-
targetPosition = element.getBoundingClientRect().top + window.scrollY
|
|
119
|
-
} else {
|
|
120
|
-
targetPosition = target.getBoundingClientRect().top + window.scrollY
|
|
106
|
+
function resolveScrollTarget(target: string | number | HTMLElement): number | null {
|
|
107
|
+
if (typeof target === 'number') return target
|
|
108
|
+
if (typeof target === 'string') {
|
|
109
|
+
const el = document.querySelector(target)
|
|
110
|
+
if (!el) return null
|
|
111
|
+
return el.getBoundingClientRect().top + window.scrollY
|
|
121
112
|
}
|
|
113
|
+
return target.getBoundingClientRect().top + window.scrollY
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function nativeScrollTo(target: string | number | HTMLElement, options?: ScrollToOptions) {
|
|
117
|
+
const base = resolveScrollTarget(target)
|
|
118
|
+
if (base === null) return
|
|
122
119
|
|
|
123
|
-
targetPosition
|
|
120
|
+
const targetPosition = base + (options?.offset ?? 0)
|
|
124
121
|
|
|
125
122
|
if (options?.immediate) {
|
|
126
123
|
window.scrollTo(0, targetPosition)
|
|
127
124
|
options?.onComplete?.()
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
window.scrollTo({ top: targetPosition, behavior: 'smooth' })
|
|
128
|
+
if (options?.onComplete) {
|
|
129
|
+
setTimeout(options.onComplete, options?.duration ?? 500)
|
|
133
130
|
}
|
|
134
131
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */
|
|
2
1
|
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
|
3
2
|
import LocomotiveScroll from 'locomotive-scroll'
|
|
4
3
|
|
|
@@ -10,7 +9,9 @@ export type ScrollState = {
|
|
|
10
9
|
progress: number
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export default defineNuxtPlugin(
|
|
12
|
+
export default defineNuxtPlugin({
|
|
13
|
+
name: 'scroll:locomotive-scroll',
|
|
14
|
+
setup() {
|
|
14
15
|
const scrollState = reactive<ScrollState>({
|
|
15
16
|
scroll: 0,
|
|
16
17
|
limit: 0,
|
|
@@ -53,6 +54,7 @@ export default defineNuxtPlugin(() => {
|
|
|
53
54
|
|
|
54
55
|
if (smoothScroll === true) {
|
|
55
56
|
nuxtApp.hook('app:mounted', () => nextTick(init))
|
|
57
|
+
nuxtApp.hook('page:finish', () => nextTick(() => ScrollTrigger.refresh()))
|
|
56
58
|
} else if (Array.isArray(smoothScroll)) {
|
|
57
59
|
addRouteMiddleware((to, from) => {
|
|
58
60
|
if (smoothScroll.includes(to.path)) {
|
|
@@ -72,4 +74,5 @@ export default defineNuxtPlugin(() => {
|
|
|
72
74
|
scrollState,
|
|
73
75
|
},
|
|
74
76
|
}
|
|
77
|
+
},
|
|
75
78
|
})
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
4
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
5
1
|
<script setup lang="ts">
|
|
6
|
-
// @ts-nocheck
|
|
7
2
|
import { EffectComposer } from '@tresjs/post-processing'
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}>(),
|
|
13
|
-
{
|
|
14
|
-
enabled: true,
|
|
15
|
-
}
|
|
16
|
-
)
|
|
4
|
+
const { enabled = true } = defineProps<{
|
|
5
|
+
enabled?: boolean
|
|
6
|
+
}>()
|
|
17
7
|
</script>
|
|
18
8
|
|
|
19
9
|
<template>
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck - TSL types are complex
|
|
6
2
|
import { Color, DoubleSide } from 'three'
|
|
7
3
|
import {
|
|
8
4
|
add,
|
|
@@ -21,73 +17,71 @@
|
|
|
21
17
|
|
|
22
18
|
import { fbm2D, simplexNoise2D } from '../../shaders/common/noise'
|
|
23
19
|
import { cosinePalette } from '../../shaders/common/palette'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
)
|
|
20
|
+
import type { TSLNode } from '../../shaders/types'
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
speed = 1.0,
|
|
24
|
+
intensity = 1.0,
|
|
25
|
+
color1 = '#0a0a20',
|
|
26
|
+
color2 = '#00ff87',
|
|
27
|
+
color3 = '#60efff',
|
|
28
|
+
mouseX = 0.5,
|
|
29
|
+
mouseY = 0.5,
|
|
30
|
+
mouseInteraction = true,
|
|
31
|
+
mouseStrength = 0.5,
|
|
32
|
+
} = defineProps<{
|
|
33
|
+
speed?: number
|
|
34
|
+
intensity?: number
|
|
35
|
+
color1?: string
|
|
36
|
+
color2?: string
|
|
37
|
+
color3?: string
|
|
38
|
+
mouseX?: number
|
|
39
|
+
mouseY?: number
|
|
40
|
+
mouseInteraction?: boolean
|
|
41
|
+
mouseStrength?: number
|
|
42
|
+
}>()
|
|
49
43
|
|
|
50
44
|
// Create reactive uniforms
|
|
51
|
-
const speedUniform = uniform(
|
|
52
|
-
const intensityUniform = uniform(
|
|
53
|
-
const mouseXUniform = uniform(
|
|
54
|
-
const mouseYUniform = uniform(
|
|
55
|
-
const mouseStrengthUniform = uniform(
|
|
56
|
-
const color1Uniform = uniform(new Color(
|
|
57
|
-
const color2Uniform = uniform(new Color(
|
|
58
|
-
const color3Uniform = uniform(new Color(
|
|
45
|
+
const speedUniform = uniform(speed)
|
|
46
|
+
const intensityUniform = uniform(intensity)
|
|
47
|
+
const mouseXUniform = uniform(mouseX)
|
|
48
|
+
const mouseYUniform = uniform(mouseY)
|
|
49
|
+
const mouseStrengthUniform = uniform(mouseStrength)
|
|
50
|
+
const color1Uniform: TSLNode = uniform(new Color(color1))
|
|
51
|
+
const color2Uniform: TSLNode = uniform(new Color(color2))
|
|
52
|
+
const color3Uniform: TSLNode = uniform(new Color(color3))
|
|
59
53
|
|
|
60
54
|
// Watch prop changes
|
|
61
55
|
watch(
|
|
62
|
-
() =>
|
|
56
|
+
() => speed,
|
|
63
57
|
(val) => (speedUniform.value = val)
|
|
64
58
|
)
|
|
65
59
|
watch(
|
|
66
|
-
() =>
|
|
60
|
+
() => intensity,
|
|
67
61
|
(val) => (intensityUniform.value = val)
|
|
68
62
|
)
|
|
69
63
|
watch(
|
|
70
|
-
() =>
|
|
64
|
+
() => mouseX,
|
|
71
65
|
(val) => (mouseXUniform.value = val)
|
|
72
66
|
)
|
|
73
67
|
watch(
|
|
74
|
-
() =>
|
|
68
|
+
() => mouseY,
|
|
75
69
|
(val) => (mouseYUniform.value = val)
|
|
76
70
|
)
|
|
77
71
|
watch(
|
|
78
|
-
() =>
|
|
72
|
+
() => mouseStrength,
|
|
79
73
|
(val) => (mouseStrengthUniform.value = val)
|
|
80
74
|
)
|
|
81
75
|
watch(
|
|
82
|
-
() =>
|
|
76
|
+
() => color1,
|
|
83
77
|
(val) => (color1Uniform.value = new Color(val))
|
|
84
78
|
)
|
|
85
79
|
watch(
|
|
86
|
-
() =>
|
|
80
|
+
() => color2,
|
|
87
81
|
(val) => (color2Uniform.value = new Color(val))
|
|
88
82
|
)
|
|
89
83
|
watch(
|
|
90
|
-
() =>
|
|
84
|
+
() => color3,
|
|
91
85
|
(val) => (color3Uniform.value = new Color(val))
|
|
92
86
|
)
|
|
93
87
|
|
|
@@ -99,8 +93,8 @@
|
|
|
99
93
|
|
|
100
94
|
// Mouse offset
|
|
101
95
|
const mouseOffset = vec2(
|
|
102
|
-
sub(mouseXUniform, 0.5).mul(
|
|
103
|
-
sub(mouseYUniform, 0.5).mul(
|
|
96
|
+
sub(mouseXUniform, 0.5).mul(mouseInteraction ? mouseStrengthUniform : 0),
|
|
97
|
+
sub(mouseYUniform, 0.5).mul(mouseInteraction ? mouseStrengthUniform : 0)
|
|
104
98
|
)
|
|
105
99
|
|
|
106
100
|
// UV coordinates
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck - TSL types are complex
|
|
6
2
|
import { Color, DoubleSide } from 'three'
|
|
7
3
|
import {
|
|
8
4
|
add,
|
|
@@ -21,80 +17,78 @@
|
|
|
21
17
|
|
|
22
18
|
import { fbm2D, ridgedFbm2d, warpedFbmCoords } from '../../shaders/common/noise'
|
|
23
19
|
import { cosinePalette } from '../../shaders/common/palette'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
)
|
|
20
|
+
import type { TSLNode } from '../../shaders/types'
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
speed = 1.0,
|
|
24
|
+
intensity = 1.0,
|
|
25
|
+
color1 = '#134e5e',
|
|
26
|
+
color2 = '#71b280',
|
|
27
|
+
color3 = '#e8d5b7',
|
|
28
|
+
color4 = '#fc5c7d',
|
|
29
|
+
mouseX = 0.5,
|
|
30
|
+
mouseY = 0.5,
|
|
31
|
+
mouseInteraction = true,
|
|
32
|
+
mouseStrength = 0.5,
|
|
33
|
+
} = defineProps<{
|
|
34
|
+
speed?: number
|
|
35
|
+
intensity?: number
|
|
36
|
+
color1?: string
|
|
37
|
+
color2?: string
|
|
38
|
+
color3?: string
|
|
39
|
+
color4?: string
|
|
40
|
+
mouseX?: number
|
|
41
|
+
mouseY?: number
|
|
42
|
+
mouseInteraction?: boolean
|
|
43
|
+
mouseStrength?: number
|
|
44
|
+
}>()
|
|
51
45
|
|
|
52
46
|
// Create reactive uniforms
|
|
53
|
-
const speedUniform = uniform(
|
|
54
|
-
const intensityUniform = uniform(
|
|
55
|
-
const mouseXUniform = uniform(
|
|
56
|
-
const mouseYUniform = uniform(
|
|
57
|
-
const mouseStrengthUniform = uniform(
|
|
58
|
-
const color1Uniform = uniform(new Color(
|
|
59
|
-
const color2Uniform = uniform(new Color(
|
|
60
|
-
const color3Uniform = uniform(new Color(
|
|
61
|
-
const color4Uniform = uniform(new Color(
|
|
47
|
+
const speedUniform = uniform(speed)
|
|
48
|
+
const intensityUniform = uniform(intensity)
|
|
49
|
+
const mouseXUniform = uniform(mouseX)
|
|
50
|
+
const mouseYUniform = uniform(mouseY)
|
|
51
|
+
const mouseStrengthUniform = uniform(mouseStrength)
|
|
52
|
+
const color1Uniform: TSLNode = uniform(new Color(color1))
|
|
53
|
+
const color2Uniform: TSLNode = uniform(new Color(color2))
|
|
54
|
+
const color3Uniform: TSLNode = uniform(new Color(color3))
|
|
55
|
+
const color4Uniform: TSLNode = uniform(new Color(color4))
|
|
62
56
|
|
|
63
57
|
// Watch prop changes
|
|
64
58
|
watch(
|
|
65
|
-
() =>
|
|
59
|
+
() => speed,
|
|
66
60
|
(val) => (speedUniform.value = val)
|
|
67
61
|
)
|
|
68
62
|
watch(
|
|
69
|
-
() =>
|
|
63
|
+
() => intensity,
|
|
70
64
|
(val) => (intensityUniform.value = val)
|
|
71
65
|
)
|
|
72
66
|
watch(
|
|
73
|
-
() =>
|
|
67
|
+
() => mouseX,
|
|
74
68
|
(val) => (mouseXUniform.value = val)
|
|
75
69
|
)
|
|
76
70
|
watch(
|
|
77
|
-
() =>
|
|
71
|
+
() => mouseY,
|
|
78
72
|
(val) => (mouseYUniform.value = val)
|
|
79
73
|
)
|
|
80
74
|
watch(
|
|
81
|
-
() =>
|
|
75
|
+
() => mouseStrength,
|
|
82
76
|
(val) => (mouseStrengthUniform.value = val)
|
|
83
77
|
)
|
|
84
78
|
watch(
|
|
85
|
-
() =>
|
|
79
|
+
() => color1,
|
|
86
80
|
(val) => (color1Uniform.value = new Color(val))
|
|
87
81
|
)
|
|
88
82
|
watch(
|
|
89
|
-
() =>
|
|
83
|
+
() => color2,
|
|
90
84
|
(val) => (color2Uniform.value = new Color(val))
|
|
91
85
|
)
|
|
92
86
|
watch(
|
|
93
|
-
() =>
|
|
87
|
+
() => color3,
|
|
94
88
|
(val) => (color3Uniform.value = new Color(val))
|
|
95
89
|
)
|
|
96
90
|
watch(
|
|
97
|
-
() =>
|
|
91
|
+
() => color4,
|
|
98
92
|
(val) => (color4Uniform.value = new Color(val))
|
|
99
93
|
)
|
|
100
94
|
|
|
@@ -110,19 +104,16 @@
|
|
|
110
104
|
// Mouse offset
|
|
111
105
|
const mouseOffset = vec2(
|
|
112
106
|
sub(mouseXUniform, 0.5)
|
|
113
|
-
.mul(
|
|
107
|
+
.mul(mouseInteraction ? mouseStrengthUniform : 0)
|
|
114
108
|
.mul(0.5),
|
|
115
109
|
sub(mouseYUniform, 0.5)
|
|
116
|
-
.mul(
|
|
110
|
+
.mul(mouseInteraction ? mouseStrengthUniform : 0)
|
|
117
111
|
.mul(0.5)
|
|
118
112
|
)
|
|
119
113
|
|
|
120
114
|
// Domain warping - create flowing organic patterns
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
warpScale: 2.0,
|
|
124
|
-
octaves: 3,
|
|
125
|
-
})
|
|
115
|
+
// warpedFbmCoords has no warp-strength options — defaults match the previous render output
|
|
116
|
+
const warpedUV = warpedFbmCoords(uvCoord, time)
|
|
126
117
|
|
|
127
118
|
// Add mouse influence to warped coordinates
|
|
128
119
|
const finalUV = add(warpedUV, mouseOffset)
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck - TSL types are complex
|
|
6
2
|
import { Color, DoubleSide } from 'three'
|
|
7
3
|
import {
|
|
8
4
|
add,
|
|
@@ -22,80 +18,78 @@
|
|
|
22
18
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
23
19
|
|
|
24
20
|
import { fbm2D, simplexNoise2D } from '../../shaders/common/noise'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
)
|
|
21
|
+
import type { TSLNode } from '../../shaders/types'
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
speed = 1.0,
|
|
25
|
+
intensity = 1.0,
|
|
26
|
+
color1 = '#667eea',
|
|
27
|
+
color2 = '#764ba2',
|
|
28
|
+
color3 = '#f093fb',
|
|
29
|
+
color4 = '#f5576c',
|
|
30
|
+
mouseX = 0.5,
|
|
31
|
+
mouseY = 0.5,
|
|
32
|
+
mouseInteraction = true,
|
|
33
|
+
mouseStrength = 0.3,
|
|
34
|
+
} = defineProps<{
|
|
35
|
+
speed?: number
|
|
36
|
+
intensity?: number
|
|
37
|
+
color1?: string
|
|
38
|
+
color2?: string
|
|
39
|
+
color3?: string
|
|
40
|
+
color4?: string
|
|
41
|
+
mouseX?: number
|
|
42
|
+
mouseY?: number
|
|
43
|
+
mouseInteraction?: boolean
|
|
44
|
+
mouseStrength?: number
|
|
45
|
+
}>()
|
|
52
46
|
|
|
53
47
|
// Create reactive uniforms
|
|
54
|
-
const speedUniform = uniform(
|
|
55
|
-
const intensityUniform = uniform(
|
|
56
|
-
const mouseXUniform = uniform(
|
|
57
|
-
const mouseYUniform = uniform(
|
|
58
|
-
const mouseStrengthUniform = uniform(
|
|
59
|
-
const color1Uniform = uniform(new Color(
|
|
60
|
-
const color2Uniform = uniform(new Color(
|
|
61
|
-
const color3Uniform = uniform(new Color(
|
|
62
|
-
const color4Uniform = uniform(new Color(
|
|
48
|
+
const speedUniform = uniform(speed)
|
|
49
|
+
const intensityUniform = uniform(intensity)
|
|
50
|
+
const mouseXUniform = uniform(mouseX)
|
|
51
|
+
const mouseYUniform = uniform(mouseY)
|
|
52
|
+
const mouseStrengthUniform = uniform(mouseStrength)
|
|
53
|
+
const color1Uniform: TSLNode = uniform(new Color(color1))
|
|
54
|
+
const color2Uniform: TSLNode = uniform(new Color(color2))
|
|
55
|
+
const color3Uniform: TSLNode = uniform(new Color(color3))
|
|
56
|
+
const color4Uniform: TSLNode = uniform(new Color(color4))
|
|
63
57
|
|
|
64
58
|
// Watch prop changes
|
|
65
59
|
watch(
|
|
66
|
-
() =>
|
|
60
|
+
() => speed,
|
|
67
61
|
(val) => (speedUniform.value = val)
|
|
68
62
|
)
|
|
69
63
|
watch(
|
|
70
|
-
() =>
|
|
64
|
+
() => intensity,
|
|
71
65
|
(val) => (intensityUniform.value = val)
|
|
72
66
|
)
|
|
73
67
|
watch(
|
|
74
|
-
() =>
|
|
68
|
+
() => mouseX,
|
|
75
69
|
(val) => (mouseXUniform.value = val)
|
|
76
70
|
)
|
|
77
71
|
watch(
|
|
78
|
-
() =>
|
|
72
|
+
() => mouseY,
|
|
79
73
|
(val) => (mouseYUniform.value = val)
|
|
80
74
|
)
|
|
81
75
|
watch(
|
|
82
|
-
() =>
|
|
76
|
+
() => mouseStrength,
|
|
83
77
|
(val) => (mouseStrengthUniform.value = val)
|
|
84
78
|
)
|
|
85
79
|
watch(
|
|
86
|
-
() =>
|
|
80
|
+
() => color1,
|
|
87
81
|
(val) => (color1Uniform.value = new Color(val))
|
|
88
82
|
)
|
|
89
83
|
watch(
|
|
90
|
-
() =>
|
|
84
|
+
() => color2,
|
|
91
85
|
(val) => (color2Uniform.value = new Color(val))
|
|
92
86
|
)
|
|
93
87
|
watch(
|
|
94
|
-
() =>
|
|
88
|
+
() => color3,
|
|
95
89
|
(val) => (color3Uniform.value = new Color(val))
|
|
96
90
|
)
|
|
97
91
|
watch(
|
|
98
|
-
() =>
|
|
92
|
+
() => color4,
|
|
99
93
|
(val) => (color4Uniform.value = new Color(val))
|
|
100
94
|
)
|
|
101
95
|
|
|
@@ -110,8 +104,8 @@
|
|
|
110
104
|
|
|
111
105
|
// Mouse offset
|
|
112
106
|
const mouseOffset = vec2(
|
|
113
|
-
sub(mouseXUniform, 0.5).mul(
|
|
114
|
-
sub(mouseYUniform, 0.5).mul(
|
|
107
|
+
sub(mouseXUniform, 0.5).mul(mouseInteraction ? mouseStrengthUniform : 0),
|
|
108
|
+
sub(mouseYUniform, 0.5).mul(mouseInteraction ? mouseStrengthUniform : 0)
|
|
115
109
|
)
|
|
116
110
|
const adjustedUV = add(uvCoord, mul(mouseOffset, 0.1))
|
|
117
111
|
|