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,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,
|
|
@@ -20,82 +16,80 @@
|
|
|
20
16
|
} from 'three/tsl'
|
|
21
17
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
22
18
|
|
|
23
|
-
import { fbm3D, ridgedFbm2d, voronoi2D } from '../../shaders/common/noise'
|
|
19
|
+
import { fbm3D, hash21, ridgedFbm2d, voronoi2D } from '../../shaders/common/noise'
|
|
24
20
|
import { cosinePalette } from '../../shaders/common/palette'
|
|
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 = '#1a0a2e',
|
|
27
|
+
color2 = '#ff6b6b',
|
|
28
|
+
color3 = '#4ecdc4',
|
|
29
|
+
color4 = '#ffe66d',
|
|
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, mouseOffset)
|
|
117
111
|
|
|
@@ -140,7 +134,7 @@
|
|
|
140
134
|
|
|
141
135
|
// Voronoi for stars/clusters
|
|
142
136
|
const vor = voronoi2D(add(mul(adjustedUV, 8.0), mul(time, 0.1)), 1.0)
|
|
143
|
-
const stars = mul(smoothstep(0.1, 0.0, vor.
|
|
137
|
+
const stars = mul(smoothstep(0.1, 0.0, vor.distance), hash21(vor.cellId))
|
|
144
138
|
|
|
145
139
|
// Color layers
|
|
146
140
|
const layer1 = mix(vec3(color1Uniform), vec3(color2Uniform), n1)
|
|
@@ -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,
|
|
@@ -23,73 +19,71 @@
|
|
|
23
19
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
24
20
|
|
|
25
21
|
import { simplexNoise2D } from '../../shaders/common/noise'
|
|
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
|
-
)
|
|
22
|
+
import type { TSLNode } from '../../shaders/types'
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
speed = 1.0,
|
|
26
|
+
intensity = 1.0,
|
|
27
|
+
color1 = '#0a1628',
|
|
28
|
+
color2 = '#1e3a5f',
|
|
29
|
+
color3 = '#7ec8e3',
|
|
30
|
+
mouseX = 0.5,
|
|
31
|
+
mouseY = 0.5,
|
|
32
|
+
mouseInteraction = true,
|
|
33
|
+
mouseStrength = 0.5,
|
|
34
|
+
} = defineProps<{
|
|
35
|
+
speed?: number
|
|
36
|
+
intensity?: number
|
|
37
|
+
color1?: string
|
|
38
|
+
color2?: string
|
|
39
|
+
color3?: 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(
|
|
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))
|
|
61
55
|
|
|
62
56
|
// Watch prop changes
|
|
63
57
|
watch(
|
|
64
|
-
() =>
|
|
58
|
+
() => speed,
|
|
65
59
|
(val) => (speedUniform.value = val)
|
|
66
60
|
)
|
|
67
61
|
watch(
|
|
68
|
-
() =>
|
|
62
|
+
() => intensity,
|
|
69
63
|
(val) => (intensityUniform.value = val)
|
|
70
64
|
)
|
|
71
65
|
watch(
|
|
72
|
-
() =>
|
|
66
|
+
() => mouseX,
|
|
73
67
|
(val) => (mouseXUniform.value = val)
|
|
74
68
|
)
|
|
75
69
|
watch(
|
|
76
|
-
() =>
|
|
70
|
+
() => mouseY,
|
|
77
71
|
(val) => (mouseYUniform.value = val)
|
|
78
72
|
)
|
|
79
73
|
watch(
|
|
80
|
-
() =>
|
|
74
|
+
() => mouseStrength,
|
|
81
75
|
(val) => (mouseStrengthUniform.value = val)
|
|
82
76
|
)
|
|
83
77
|
watch(
|
|
84
|
-
() =>
|
|
78
|
+
() => color1,
|
|
85
79
|
(val) => (color1Uniform.value = new Color(val))
|
|
86
80
|
)
|
|
87
81
|
watch(
|
|
88
|
-
() =>
|
|
82
|
+
() => color2,
|
|
89
83
|
(val) => (color2Uniform.value = new Color(val))
|
|
90
84
|
)
|
|
91
85
|
watch(
|
|
92
|
-
() =>
|
|
86
|
+
() => color3,
|
|
93
87
|
(val) => (color3Uniform.value = new Color(val))
|
|
94
88
|
)
|
|
95
89
|
|
|
@@ -110,7 +104,7 @@
|
|
|
110
104
|
const ripple = mul(
|
|
111
105
|
sin(sub(mul(mouseDist, 30.0), mul(time, 5.0))),
|
|
112
106
|
exp(mul(mouseDist, -5.0)),
|
|
113
|
-
|
|
107
|
+
mouseInteraction ? mouseStrengthUniform : 0
|
|
114
108
|
)
|
|
115
109
|
|
|
116
110
|
// Wave layers
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
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, DoubleSide } from 'three'
|
|
7
3
|
import {
|
|
8
4
|
dot,
|
|
@@ -17,50 +13,49 @@
|
|
|
17
13
|
} from 'three/tsl'
|
|
18
14
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
16
|
+
import type { TSLNode } from '../../shaders/types'
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
baseColor = '#1e1b4b',
|
|
20
|
+
fresnelColor = '#22d3ee',
|
|
21
|
+
power = 2,
|
|
22
|
+
intensity = 1,
|
|
23
|
+
transparent = false,
|
|
24
|
+
} = defineProps<{
|
|
25
|
+
baseColor?: string
|
|
26
|
+
fresnelColor?: string
|
|
27
|
+
power?: number
|
|
28
|
+
intensity?: number
|
|
29
|
+
transparent?: boolean
|
|
30
|
+
}>()
|
|
36
31
|
|
|
37
32
|
// Create reactive uniforms
|
|
38
|
-
const baseColorUniform = uniform(new Color(
|
|
39
|
-
const fresnelColorUniform = uniform(new Color(
|
|
40
|
-
const powerUniform = uniform(
|
|
41
|
-
const intensityUniform = uniform(
|
|
33
|
+
const baseColorUniform: TSLNode = uniform(new Color(baseColor))
|
|
34
|
+
const fresnelColorUniform: TSLNode = uniform(new Color(fresnelColor))
|
|
35
|
+
const powerUniform = uniform(power)
|
|
36
|
+
const intensityUniform = uniform(intensity)
|
|
42
37
|
|
|
43
38
|
// Watch prop changes
|
|
44
39
|
watch(
|
|
45
|
-
() =>
|
|
40
|
+
() => baseColor,
|
|
46
41
|
(val) => {
|
|
47
42
|
baseColorUniform.value = new Color(val)
|
|
48
43
|
}
|
|
49
44
|
)
|
|
50
45
|
watch(
|
|
51
|
-
() =>
|
|
46
|
+
() => fresnelColor,
|
|
52
47
|
(val) => {
|
|
53
48
|
fresnelColorUniform.value = new Color(val)
|
|
54
49
|
}
|
|
55
50
|
)
|
|
56
51
|
watch(
|
|
57
|
-
() =>
|
|
52
|
+
() => power,
|
|
58
53
|
(val) => {
|
|
59
54
|
powerUniform.value = val
|
|
60
55
|
}
|
|
61
56
|
)
|
|
62
57
|
watch(
|
|
63
|
-
() =>
|
|
58
|
+
() => intensity,
|
|
64
59
|
(val) => {
|
|
65
60
|
intensityUniform.value = val
|
|
66
61
|
}
|
|
@@ -79,7 +74,7 @@
|
|
|
79
74
|
const colorNode = mix(vec3(baseColorUniform), vec3(fresnelColorUniform), fresnelFactor)
|
|
80
75
|
|
|
81
76
|
mat.colorNode = colorNode as any
|
|
82
|
-
mat.transparent =
|
|
77
|
+
mat.transparent = transparent
|
|
83
78
|
mat.side = DoubleSide
|
|
84
79
|
|
|
85
80
|
return mat
|
|
@@ -1,94 +1,88 @@
|
|
|
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, DoubleSide } from 'three'
|
|
6
3
|
import { mix, sin, time as tslTime, uniform, uv, vec3 } from 'three/tsl'
|
|
7
|
-
import { MeshBasicNodeMaterial
|
|
4
|
+
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
8
5
|
|
|
9
6
|
import type { TSLNode } from '../../types'
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
mouseStrength: 0.3,
|
|
39
|
-
}
|
|
40
|
-
)
|
|
8
|
+
const {
|
|
9
|
+
colors = ['#4f46e5', '#7c3aed', '#ec4899'],
|
|
10
|
+
angle = 0,
|
|
11
|
+
type = 'linear',
|
|
12
|
+
animated = false,
|
|
13
|
+
speed = 1,
|
|
14
|
+
transparent = false,
|
|
15
|
+
mouseX = 0.5,
|
|
16
|
+
mouseY = 0.5,
|
|
17
|
+
mouseInteraction = false,
|
|
18
|
+
mouseStrength = 0.3,
|
|
19
|
+
} = defineProps<{
|
|
20
|
+
colors?: string[]
|
|
21
|
+
angle?: number
|
|
22
|
+
type?: 'linear' | 'radial'
|
|
23
|
+
animated?: boolean
|
|
24
|
+
speed?: number
|
|
25
|
+
transparent?: boolean
|
|
26
|
+
/** Mouse X position (0-1) for interaction */
|
|
27
|
+
mouseX?: number
|
|
28
|
+
/** Mouse Y position (0-1) for interaction */
|
|
29
|
+
mouseY?: number
|
|
30
|
+
/** Enable mouse interaction */
|
|
31
|
+
mouseInteraction?: boolean
|
|
32
|
+
/** Mouse interaction strength */
|
|
33
|
+
mouseStrength?: number
|
|
34
|
+
}>()
|
|
41
35
|
|
|
42
36
|
// Create reactive uniforms for all animatable properties
|
|
43
|
-
const angleUniform = uniform(
|
|
44
|
-
const speedUniform = uniform(
|
|
45
|
-
const mouseXUniform = uniform(
|
|
46
|
-
const mouseYUniform = uniform(
|
|
47
|
-
const mouseStrengthUniform = uniform(
|
|
37
|
+
const angleUniform = uniform(angle)
|
|
38
|
+
const speedUniform = uniform(speed)
|
|
39
|
+
const mouseXUniform = uniform(mouseX)
|
|
40
|
+
const mouseYUniform = uniform(mouseY)
|
|
41
|
+
const mouseStrengthUniform = uniform(mouseStrength)
|
|
48
42
|
|
|
49
43
|
// Create color uniforms (up to 5 colors supported) - stored as typed array
|
|
50
|
-
const colorUniforms:
|
|
51
|
-
uniform(new Color(
|
|
52
|
-
uniform(new Color(
|
|
53
|
-
uniform(new Color(
|
|
54
|
-
uniform(new Color(
|
|
55
|
-
uniform(new Color(
|
|
44
|
+
const colorUniforms: TSLNode[] = [
|
|
45
|
+
uniform(new Color(colors[0] || '#4f46e5')),
|
|
46
|
+
uniform(new Color(colors[1] || '#7c3aed')),
|
|
47
|
+
uniform(new Color(colors[2] || '#ec4899')),
|
|
48
|
+
uniform(new Color(colors[3] || '#ec4899')),
|
|
49
|
+
uniform(new Color(colors[4] || '#ec4899')),
|
|
56
50
|
]
|
|
57
51
|
|
|
58
52
|
// Watch prop changes and update uniforms
|
|
59
53
|
watch(
|
|
60
|
-
() =>
|
|
54
|
+
() => angle,
|
|
61
55
|
(val) => {
|
|
62
56
|
angleUniform.value = val
|
|
63
57
|
}
|
|
64
58
|
)
|
|
65
59
|
watch(
|
|
66
|
-
() =>
|
|
60
|
+
() => speed,
|
|
67
61
|
(val) => {
|
|
68
62
|
speedUniform.value = val
|
|
69
63
|
}
|
|
70
64
|
)
|
|
71
65
|
watch(
|
|
72
|
-
() =>
|
|
66
|
+
() => mouseX,
|
|
73
67
|
(val) => {
|
|
74
68
|
mouseXUniform.value = val
|
|
75
69
|
}
|
|
76
70
|
)
|
|
77
71
|
watch(
|
|
78
|
-
() =>
|
|
72
|
+
() => mouseY,
|
|
79
73
|
(val) => {
|
|
80
74
|
mouseYUniform.value = val
|
|
81
75
|
}
|
|
82
76
|
)
|
|
83
77
|
watch(
|
|
84
|
-
() =>
|
|
78
|
+
() => mouseStrength,
|
|
85
79
|
(val) => {
|
|
86
80
|
mouseStrengthUniform.value = val
|
|
87
81
|
}
|
|
88
82
|
)
|
|
89
83
|
|
|
90
84
|
watch(
|
|
91
|
-
() =>
|
|
85
|
+
() => colors,
|
|
92
86
|
(colors) => {
|
|
93
87
|
colors.forEach((c, i) => {
|
|
94
88
|
if (i < colorUniforms.length) {
|
|
@@ -101,13 +95,13 @@
|
|
|
101
95
|
|
|
102
96
|
const material = computed(() => {
|
|
103
97
|
const mat = new MeshBasicNodeMaterial()
|
|
104
|
-
const colorCount =
|
|
98
|
+
const colorCount = colors.length
|
|
105
99
|
|
|
106
100
|
// Get UV coordinates
|
|
107
101
|
let t: TSLNode = uv().y
|
|
108
102
|
|
|
109
103
|
// Apply angle rotation for linear gradient (using uniform for reactivity)
|
|
110
|
-
if (
|
|
104
|
+
if (type === 'linear') {
|
|
111
105
|
const rad = angleUniform.mul(Math.PI / 180)
|
|
112
106
|
const cosVal = rad.cos()
|
|
113
107
|
const sinVal = rad.sin()
|
|
@@ -115,10 +109,10 @@
|
|
|
115
109
|
}
|
|
116
110
|
|
|
117
111
|
// Radial gradient uses distance from center
|
|
118
|
-
if (
|
|
112
|
+
if (type === 'radial') {
|
|
119
113
|
let center = uv().sub(0.5)
|
|
120
114
|
// Add mouse interaction offset
|
|
121
|
-
if (
|
|
115
|
+
if (mouseInteraction) {
|
|
122
116
|
const mouseOffset = vec3(
|
|
123
117
|
mouseXUniform.sub(0.5).mul(mouseStrengthUniform),
|
|
124
118
|
mouseYUniform.sub(0.5).mul(mouseStrengthUniform),
|
|
@@ -130,27 +124,27 @@
|
|
|
130
124
|
}
|
|
131
125
|
|
|
132
126
|
// Add mouse interaction for linear gradients
|
|
133
|
-
if (
|
|
127
|
+
if (type === 'linear' && mouseInteraction) {
|
|
134
128
|
t = t.add(mouseXUniform.sub(0.5).mul(mouseStrengthUniform))
|
|
135
129
|
}
|
|
136
130
|
|
|
137
131
|
// Add animation
|
|
138
|
-
if (
|
|
132
|
+
if (animated) {
|
|
139
133
|
t = t.add(sin(tslTime.mul(speedUniform)).mul(0.2))
|
|
140
134
|
}
|
|
141
135
|
|
|
142
136
|
// Build gradient from colors using uniforms
|
|
143
137
|
// Use type assertion since we know the array is initialized
|
|
144
|
-
const c0 = colorUniforms[0]
|
|
145
|
-
const c1 = colorUniforms[1]
|
|
146
|
-
const c2 = colorUniforms[2]
|
|
147
|
-
const c3 = colorUniforms[3]
|
|
148
|
-
const c4 = colorUniforms[4]
|
|
138
|
+
const c0 = colorUniforms[0]
|
|
139
|
+
const c1 = colorUniforms[1]
|
|
140
|
+
const c2 = colorUniforms[2]
|
|
141
|
+
const c3 = colorUniforms[3]
|
|
142
|
+
const c4 = colorUniforms[4]
|
|
149
143
|
|
|
150
|
-
let colorNode: TSLNode = vec3(c0
|
|
144
|
+
let colorNode: TSLNode = vec3(c0)
|
|
151
145
|
|
|
152
146
|
if (colorCount === 2) {
|
|
153
|
-
colorNode = mix(vec3(c0
|
|
147
|
+
colorNode = mix(vec3(c0), vec3(c1), t)
|
|
154
148
|
} else if (colorCount >= 3) {
|
|
155
149
|
// Multi-stop gradient using pre-extracted uniforms
|
|
156
150
|
const uniforms = [c0, c1, c2, c3, c4]
|
|
@@ -158,8 +152,8 @@
|
|
|
158
152
|
|
|
159
153
|
for (let i = 0; i < segments && i < 4; i++) {
|
|
160
154
|
const localT = t.mul(segments).sub(i).clamp(0, 1)
|
|
161
|
-
const currColor = uniforms[i]
|
|
162
|
-
const nextColor = uniforms[i + 1]
|
|
155
|
+
const currColor = uniforms[i]
|
|
156
|
+
const nextColor = uniforms[i + 1]
|
|
163
157
|
|
|
164
158
|
if (i === 0) {
|
|
165
159
|
colorNode = mix(vec3(currColor), vec3(nextColor), localT)
|
|
@@ -174,7 +168,7 @@
|
|
|
174
168
|
}
|
|
175
169
|
|
|
176
170
|
mat.colorNode = colorNode
|
|
177
|
-
mat.transparent =
|
|
171
|
+
mat.transparent = transparent
|
|
178
172
|
mat.side = DoubleSide
|
|
179
173
|
|
|
180
174
|
return mat
|