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,8 +1,4 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable no-console -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { DoubleSide, type Texture } from 'three'
|
|
7
3
|
import {
|
|
8
4
|
float,
|
|
@@ -22,117 +18,115 @@
|
|
|
22
18
|
import type { TSLNode } from '../../types'
|
|
23
19
|
import { simplexNoise2D } from '../../utils/tsl/noise'
|
|
24
20
|
|
|
25
|
-
const
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
)
|
|
21
|
+
const {
|
|
22
|
+
src,
|
|
23
|
+
distortion = 0,
|
|
24
|
+
distortionSpeed = 1,
|
|
25
|
+
mouseRipple = false,
|
|
26
|
+
rippleStrength = 0.02,
|
|
27
|
+
zoom = 1,
|
|
28
|
+
grayscale = 0,
|
|
29
|
+
rgbShift = 0,
|
|
30
|
+
vignette = false,
|
|
31
|
+
vignetteIntensity = 0.5,
|
|
32
|
+
transparent = false,
|
|
33
|
+
mouseX = 0.5,
|
|
34
|
+
mouseY = 0.5,
|
|
35
|
+
} = defineProps<{
|
|
36
|
+
/** Image source URL or path */
|
|
37
|
+
src: string
|
|
38
|
+
/** Distortion effect strength (0 = none) */
|
|
39
|
+
distortion?: number
|
|
40
|
+
/** Distortion speed */
|
|
41
|
+
distortionSpeed?: number
|
|
42
|
+
/** Enable mouse-reactive ripple effect */
|
|
43
|
+
mouseRipple?: boolean
|
|
44
|
+
/** Ripple strength */
|
|
45
|
+
rippleStrength?: number
|
|
46
|
+
/** Zoom level (1 = normal) */
|
|
47
|
+
zoom?: number
|
|
48
|
+
/** Grayscale amount (0-1) */
|
|
49
|
+
grayscale?: number
|
|
50
|
+
/** RGB shift/chromatic aberration amount */
|
|
51
|
+
rgbShift?: number
|
|
52
|
+
/** Enable vignette effect */
|
|
53
|
+
vignette?: boolean
|
|
54
|
+
/** Vignette intensity */
|
|
55
|
+
vignetteIntensity?: number
|
|
56
|
+
/** Transparent background */
|
|
57
|
+
transparent?: boolean
|
|
58
|
+
/** Mouse X position (0-1) for external control */
|
|
59
|
+
mouseX?: number
|
|
60
|
+
/** Mouse Y position (0-1) for external control */
|
|
61
|
+
mouseY?: number
|
|
62
|
+
}>()
|
|
69
63
|
|
|
70
64
|
const loadedTexture = ref<Texture | null>(null)
|
|
71
65
|
const isLoading = ref(true)
|
|
72
66
|
const error = ref<Error | null>(null)
|
|
73
67
|
|
|
74
68
|
// Reactive uniforms
|
|
75
|
-
const mouseXUniform = uniform(
|
|
76
|
-
const mouseYUniform = uniform(
|
|
77
|
-
const distortionUniform = uniform(
|
|
78
|
-
const distortionSpeedUniform = uniform(
|
|
79
|
-
const rippleStrengthUniform = uniform(
|
|
80
|
-
const zoomUniform = uniform(
|
|
81
|
-
const grayscaleUniform = uniform(
|
|
82
|
-
const rgbShiftUniform = uniform(
|
|
83
|
-
const vignetteIntensityUniform = uniform(
|
|
69
|
+
const mouseXUniform = uniform(mouseX)
|
|
70
|
+
const mouseYUniform = uniform(mouseY)
|
|
71
|
+
const distortionUniform = uniform(distortion)
|
|
72
|
+
const distortionSpeedUniform = uniform(distortionSpeed)
|
|
73
|
+
const rippleStrengthUniform = uniform(rippleStrength)
|
|
74
|
+
const zoomUniform = uniform(zoom)
|
|
75
|
+
const grayscaleUniform = uniform(grayscale)
|
|
76
|
+
const rgbShiftUniform = uniform(rgbShift)
|
|
77
|
+
const vignetteIntensityUniform = uniform(vignetteIntensity)
|
|
84
78
|
|
|
85
79
|
// Watch all prop changes for reactivity
|
|
86
80
|
watch(
|
|
87
|
-
() =>
|
|
81
|
+
() => mouseX,
|
|
88
82
|
(val) => {
|
|
89
83
|
mouseXUniform.value = val
|
|
90
84
|
}
|
|
91
85
|
)
|
|
92
86
|
watch(
|
|
93
|
-
() =>
|
|
87
|
+
() => mouseY,
|
|
94
88
|
(val) => {
|
|
95
89
|
mouseYUniform.value = val
|
|
96
90
|
}
|
|
97
91
|
)
|
|
98
92
|
watch(
|
|
99
|
-
() =>
|
|
93
|
+
() => distortion,
|
|
100
94
|
(val) => {
|
|
101
95
|
distortionUniform.value = val
|
|
102
96
|
}
|
|
103
97
|
)
|
|
104
98
|
watch(
|
|
105
|
-
() =>
|
|
99
|
+
() => distortionSpeed,
|
|
106
100
|
(val) => {
|
|
107
101
|
distortionSpeedUniform.value = val
|
|
108
102
|
}
|
|
109
103
|
)
|
|
110
104
|
watch(
|
|
111
|
-
() =>
|
|
105
|
+
() => rippleStrength,
|
|
112
106
|
(val) => {
|
|
113
107
|
rippleStrengthUniform.value = val
|
|
114
108
|
}
|
|
115
109
|
)
|
|
116
110
|
watch(
|
|
117
|
-
() =>
|
|
111
|
+
() => zoom,
|
|
118
112
|
(val) => {
|
|
119
113
|
zoomUniform.value = val
|
|
120
114
|
}
|
|
121
115
|
)
|
|
122
116
|
watch(
|
|
123
|
-
() =>
|
|
117
|
+
() => grayscale,
|
|
124
118
|
(val) => {
|
|
125
119
|
grayscaleUniform.value = val
|
|
126
120
|
}
|
|
127
121
|
)
|
|
128
122
|
watch(
|
|
129
|
-
() =>
|
|
123
|
+
() => rgbShift,
|
|
130
124
|
(val) => {
|
|
131
125
|
rgbShiftUniform.value = val
|
|
132
126
|
}
|
|
133
127
|
)
|
|
134
128
|
watch(
|
|
135
|
-
() =>
|
|
129
|
+
() => vignetteIntensity,
|
|
136
130
|
(val) => {
|
|
137
131
|
vignetteIntensityUniform.value = val
|
|
138
132
|
}
|
|
@@ -140,7 +134,7 @@
|
|
|
140
134
|
|
|
141
135
|
// Load texture
|
|
142
136
|
watch(
|
|
143
|
-
() =>
|
|
137
|
+
() => src,
|
|
144
138
|
async (src) => {
|
|
145
139
|
if (!src) return
|
|
146
140
|
|
|
@@ -180,10 +174,10 @@
|
|
|
180
174
|
const distortedUV = uvCoord.add(noiseVal.mul(distortionUniform).mul(0.1))
|
|
181
175
|
// Use step to conditionally apply distortion
|
|
182
176
|
const hasDistortion = distortionUniform.greaterThan(0.001)
|
|
183
|
-
uvCoord =
|
|
177
|
+
uvCoord = hasDistortion.select(distortedUV, uvCoord)
|
|
184
178
|
|
|
185
179
|
// Apply mouse ripple effect
|
|
186
|
-
if (
|
|
180
|
+
if (mouseRipple) {
|
|
187
181
|
const mousePos = vec2(mouseXUniform, mouseYUniform)
|
|
188
182
|
const diff = uvCoord.sub(mousePos)
|
|
189
183
|
const dist = diff.length()
|
|
@@ -209,7 +203,7 @@
|
|
|
209
203
|
colorNode = vec4(blendedRgb.x, blendedRgb.y, blendedRgb.z, colorNode.w)
|
|
210
204
|
|
|
211
205
|
// Apply vignette
|
|
212
|
-
if (
|
|
206
|
+
if (vignette) {
|
|
213
207
|
const center = vec2(0.5, 0.5)
|
|
214
208
|
const dist = uv().sub(center).length()
|
|
215
209
|
const vignetteAmount = smoothstep(0.2, 0.8, dist).mul(vignetteIntensityUniform)
|
|
@@ -217,7 +211,7 @@
|
|
|
217
211
|
}
|
|
218
212
|
|
|
219
213
|
mat.colorNode = colorNode
|
|
220
|
-
mat.transparent =
|
|
214
|
+
mat.transparent = transparent
|
|
221
215
|
mat.side = DoubleSide
|
|
222
216
|
|
|
223
217
|
return mat
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-boolean-default -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable vue/require-default-prop -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
2
|
import { BackSide, DoubleSide, FrontSide } from 'three'
|
|
6
3
|
import { MeshBasicNodeMaterial, MeshStandardNodeMaterial } from 'three/webgpu'
|
|
7
4
|
|
|
8
5
|
import type { TSLNode } from '../../types'
|
|
9
6
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
7
|
+
const {
|
|
8
|
+
type = 'basic',
|
|
9
|
+
colorNode,
|
|
10
|
+
opacityNode,
|
|
11
|
+
normalNode,
|
|
12
|
+
emissiveNode,
|
|
13
|
+
metalnessNode,
|
|
14
|
+
roughnessNode,
|
|
15
|
+
positionNode,
|
|
16
|
+
transparent = false,
|
|
17
|
+
side = 'front',
|
|
18
|
+
wireframe = false,
|
|
19
|
+
flatShading = false,
|
|
20
|
+
depthTest = true,
|
|
21
|
+
depthWrite = true,
|
|
22
|
+
} = defineProps<{
|
|
23
|
+
type?: 'basic' | 'standard'
|
|
24
|
+
colorNode?: TSLNode
|
|
25
|
+
opacityNode?: TSLNode
|
|
26
|
+
normalNode?: TSLNode
|
|
27
|
+
emissiveNode?: TSLNode
|
|
28
|
+
metalnessNode?: TSLNode
|
|
29
|
+
roughnessNode?: TSLNode
|
|
30
|
+
positionNode?: TSLNode
|
|
31
|
+
transparent?: boolean
|
|
32
|
+
side?: 'front' | 'back' | 'double'
|
|
33
|
+
wireframe?: boolean
|
|
34
|
+
flatShading?: boolean
|
|
35
|
+
depthTest?: boolean
|
|
36
|
+
depthWrite?: boolean
|
|
37
|
+
}>()
|
|
37
38
|
|
|
38
39
|
const sideMap = {
|
|
39
40
|
front: FrontSide,
|
|
@@ -42,32 +43,31 @@
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
const material = computed(() => {
|
|
45
|
-
const mat =
|
|
46
|
-
props.type === 'standard' ? new MeshStandardNodeMaterial() : new MeshBasicNodeMaterial()
|
|
46
|
+
const mat = type === 'standard' ? new MeshStandardNodeMaterial() : new MeshBasicNodeMaterial()
|
|
47
47
|
|
|
48
48
|
// Apply node properties
|
|
49
|
-
if (
|
|
50
|
-
if (
|
|
51
|
-
mat.opacityNode =
|
|
49
|
+
if (colorNode) mat.colorNode = colorNode
|
|
50
|
+
if (opacityNode) {
|
|
51
|
+
mat.opacityNode = opacityNode
|
|
52
52
|
mat.transparent = true
|
|
53
53
|
}
|
|
54
|
-
if (
|
|
55
|
-
if (
|
|
54
|
+
if (normalNode) mat.normalNode = normalNode
|
|
55
|
+
if (positionNode) mat.positionNode = positionNode
|
|
56
56
|
|
|
57
57
|
// Standard material specific
|
|
58
58
|
if (mat instanceof MeshStandardNodeMaterial) {
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
if (
|
|
62
|
-
mat.flatShading =
|
|
59
|
+
if (emissiveNode) mat.emissiveNode = emissiveNode
|
|
60
|
+
if (metalnessNode) mat.metalnessNode = metalnessNode
|
|
61
|
+
if (roughnessNode) mat.roughnessNode = roughnessNode
|
|
62
|
+
mat.flatShading = flatShading
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Standard properties
|
|
66
|
-
mat.transparent =
|
|
67
|
-
mat.side = sideMap[
|
|
68
|
-
mat.wireframe =
|
|
69
|
-
mat.depthTest =
|
|
70
|
-
mat.depthWrite =
|
|
66
|
+
mat.transparent = transparent || !!opacityNode
|
|
67
|
+
mat.side = sideMap[side]
|
|
68
|
+
mat.wireframe = wireframe
|
|
69
|
+
mat.depthTest = depthTest
|
|
70
|
+
mat.depthWrite = depthWrite
|
|
71
71
|
|
|
72
72
|
return mat
|
|
73
73
|
})
|
|
@@ -1,95 +1,89 @@
|
|
|
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 { mix, time as tslTime, uniform, uv, vec3 } from 'three/tsl'
|
|
8
4
|
import { MeshBasicNodeMaterial } from 'three/webgpu'
|
|
9
5
|
|
|
6
|
+
import type { TSLNode } from '../../shaders/types'
|
|
10
7
|
import { fbm, simplexNoise2D } from '../../utils/tsl/noise'
|
|
11
8
|
|
|
12
|
-
const
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
mouseStrength: 0.5,
|
|
42
|
-
}
|
|
43
|
-
)
|
|
9
|
+
const {
|
|
10
|
+
scale = 3,
|
|
11
|
+
speed = 0.5,
|
|
12
|
+
octaves = 4,
|
|
13
|
+
baseColor = '#1e1b4b',
|
|
14
|
+
peakColor = '#c084fc',
|
|
15
|
+
type = 'simplex',
|
|
16
|
+
transparent = false,
|
|
17
|
+
mouseX = 0.5,
|
|
18
|
+
mouseY = 0.5,
|
|
19
|
+
mouseInteraction = false,
|
|
20
|
+
mouseStrength = 0.5,
|
|
21
|
+
} = defineProps<{
|
|
22
|
+
scale?: number
|
|
23
|
+
speed?: number
|
|
24
|
+
octaves?: number
|
|
25
|
+
baseColor?: string
|
|
26
|
+
peakColor?: string
|
|
27
|
+
type?: 'simplex' | 'fbm'
|
|
28
|
+
transparent?: boolean
|
|
29
|
+
/** Mouse X position (0-1) for interaction */
|
|
30
|
+
mouseX?: number
|
|
31
|
+
/** Mouse Y position (0-1) for interaction */
|
|
32
|
+
mouseY?: number
|
|
33
|
+
/** Enable mouse interaction */
|
|
34
|
+
mouseInteraction?: boolean
|
|
35
|
+
/** Mouse interaction strength */
|
|
36
|
+
mouseStrength?: number
|
|
37
|
+
}>()
|
|
44
38
|
|
|
45
39
|
// Create reactive uniforms
|
|
46
|
-
const scaleUniform = uniform(
|
|
47
|
-
const speedUniform = uniform(
|
|
48
|
-
const mouseXUniform = uniform(
|
|
49
|
-
const mouseYUniform = uniform(
|
|
50
|
-
const mouseStrengthUniform = uniform(
|
|
51
|
-
const baseColorUniform = uniform(new Color(
|
|
52
|
-
const peakColorUniform = uniform(new Color(
|
|
40
|
+
const scaleUniform = uniform(scale)
|
|
41
|
+
const speedUniform = uniform(speed)
|
|
42
|
+
const mouseXUniform = uniform(mouseX)
|
|
43
|
+
const mouseYUniform = uniform(mouseY)
|
|
44
|
+
const mouseStrengthUniform = uniform(mouseStrength)
|
|
45
|
+
const baseColorUniform: TSLNode = uniform(new Color(baseColor))
|
|
46
|
+
const peakColorUniform: TSLNode = uniform(new Color(peakColor))
|
|
53
47
|
|
|
54
48
|
// Watch prop changes
|
|
55
49
|
watch(
|
|
56
|
-
() =>
|
|
50
|
+
() => scale,
|
|
57
51
|
(val) => {
|
|
58
52
|
scaleUniform.value = val
|
|
59
53
|
}
|
|
60
54
|
)
|
|
61
55
|
watch(
|
|
62
|
-
() =>
|
|
56
|
+
() => speed,
|
|
63
57
|
(val) => {
|
|
64
58
|
speedUniform.value = val
|
|
65
59
|
}
|
|
66
60
|
)
|
|
67
61
|
watch(
|
|
68
|
-
() =>
|
|
62
|
+
() => mouseX,
|
|
69
63
|
(val) => {
|
|
70
64
|
mouseXUniform.value = val
|
|
71
65
|
}
|
|
72
66
|
)
|
|
73
67
|
watch(
|
|
74
|
-
() =>
|
|
68
|
+
() => mouseY,
|
|
75
69
|
(val) => {
|
|
76
70
|
mouseYUniform.value = val
|
|
77
71
|
}
|
|
78
72
|
)
|
|
79
73
|
watch(
|
|
80
|
-
() =>
|
|
74
|
+
() => mouseStrength,
|
|
81
75
|
(val) => {
|
|
82
76
|
mouseStrengthUniform.value = val
|
|
83
77
|
}
|
|
84
78
|
)
|
|
85
79
|
watch(
|
|
86
|
-
() =>
|
|
80
|
+
() => baseColor,
|
|
87
81
|
(val) => {
|
|
88
82
|
baseColorUniform.value = new Color(val)
|
|
89
83
|
}
|
|
90
84
|
)
|
|
91
85
|
watch(
|
|
92
|
-
() =>
|
|
86
|
+
() => peakColor,
|
|
93
87
|
(val) => {
|
|
94
88
|
peakColorUniform.value = new Color(val)
|
|
95
89
|
}
|
|
@@ -102,7 +96,7 @@
|
|
|
102
96
|
let animatedUV = uv().mul(scaleUniform).add(tslTime.mul(speedUniform))
|
|
103
97
|
|
|
104
98
|
// Add mouse interaction
|
|
105
|
-
if (
|
|
99
|
+
if (mouseInteraction) {
|
|
106
100
|
const mouseOffset = vec3(
|
|
107
101
|
mouseXUniform.sub(0.5).mul(mouseStrengthUniform),
|
|
108
102
|
mouseYUniform.sub(0.5).mul(mouseStrengthUniform),
|
|
@@ -113,9 +107,9 @@
|
|
|
113
107
|
|
|
114
108
|
// Generate noise based on type
|
|
115
109
|
let noiseValue
|
|
116
|
-
if (
|
|
110
|
+
if (type === 'fbm') {
|
|
117
111
|
noiseValue = fbm(vec3(animatedUV.x, animatedUV.y, tslTime.mul(speedUniform.mul(0.1))), {
|
|
118
|
-
octaves:
|
|
112
|
+
octaves: octaves,
|
|
119
113
|
lacunarity: 2.0,
|
|
120
114
|
gain: 0.5,
|
|
121
115
|
amplitude: 0.5,
|
|
@@ -132,7 +126,7 @@
|
|
|
132
126
|
const colorNode = mix(vec3(baseColorUniform), vec3(peakColorUniform), normalizedNoise)
|
|
133
127
|
|
|
134
128
|
mat.colorNode = colorNode as any
|
|
135
|
-
mat.transparent =
|
|
129
|
+
mat.transparent = transparent
|
|
136
130
|
mat.side = DoubleSide
|
|
137
131
|
|
|
138
132
|
return mat
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
rotation: () => [0, 0, 0],
|
|
20
|
-
}
|
|
21
|
-
)
|
|
2
|
+
const {
|
|
3
|
+
width = 2,
|
|
4
|
+
height = 2,
|
|
5
|
+
widthSegments = 1,
|
|
6
|
+
heightSegments = 1,
|
|
7
|
+
position = [0, 0, 0],
|
|
8
|
+
rotation = [0, 0, 0],
|
|
9
|
+
} = defineProps<{
|
|
10
|
+
width?: number
|
|
11
|
+
height?: number
|
|
12
|
+
widthSegments?: number
|
|
13
|
+
heightSegments?: number
|
|
14
|
+
position?: [number, number, number]
|
|
15
|
+
rotation?: [number, number, number]
|
|
16
|
+
}>()
|
|
22
17
|
</script>
|
|
23
18
|
|
|
24
19
|
<template>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck - TSL types
|
|
5
2
|
import { Color } from 'three'
|
|
6
3
|
import { uniform, vec3 } from 'three/tsl'
|
|
7
4
|
|
|
5
|
+
import type { TSLNode } from '../../shaders/types'
|
|
6
|
+
|
|
8
7
|
const props = withDefaults(
|
|
9
8
|
defineProps<{
|
|
10
9
|
id?: string
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
|
|
27
26
|
// Create uniform once
|
|
28
27
|
const colorValue = new Color(props.color)
|
|
29
|
-
const colorNode = uniform(colorValue)
|
|
28
|
+
const colorNode: TSLNode = uniform(colorValue)
|
|
30
29
|
|
|
31
30
|
// Build TSL node once (references uniform by pointer)
|
|
32
31
|
const node = vec3(colorNode)
|
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-unused-properties -->
|
|
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
|
|
6
2
|
import { cameraPosition, normalView, positionWorld, pow, sub, uniform, vec3 } from 'three/tsl'
|
|
7
3
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
order: 0,
|
|
22
|
-
blend: 'add',
|
|
23
|
-
opacity: 1.0,
|
|
24
|
-
}
|
|
25
|
-
)
|
|
4
|
+
const {
|
|
5
|
+
id = 'fresnel',
|
|
6
|
+
power = 2.0,
|
|
7
|
+
order = 0,
|
|
8
|
+
blend = 'add',
|
|
9
|
+
opacity = 1.0,
|
|
10
|
+
} = defineProps<{
|
|
11
|
+
id?: string
|
|
12
|
+
power?: number
|
|
13
|
+
order?: number
|
|
14
|
+
blend?: 'normal' | 'add' | 'multiply' | 'screen' | 'overlay' | 'mix'
|
|
15
|
+
opacity?: number
|
|
16
|
+
}>()
|
|
26
17
|
|
|
27
18
|
const graph = useShaderGraphContext()
|
|
28
19
|
|
|
29
20
|
// Create uniforms once
|
|
30
|
-
const uPower = uniform(
|
|
21
|
+
const uPower = uniform(power)
|
|
31
22
|
|
|
32
23
|
// Build fresnel node
|
|
33
24
|
const viewDirection = positionWorld.sub(cameraPosition).normalize()
|
|
34
25
|
const fresnelFactor = pow(sub(1.0, normalView.dot(viewDirection.negate()).abs()), uPower)
|
|
35
26
|
const node = vec3(fresnelFactor, fresnelFactor, fresnelFactor)
|
|
36
27
|
|
|
37
|
-
graph.register(
|
|
28
|
+
graph.register(id, node, order, blend, opacity)
|
|
38
29
|
|
|
39
30
|
watch(
|
|
40
|
-
() =>
|
|
31
|
+
() => power,
|
|
41
32
|
(v) => {
|
|
42
33
|
uPower.value = v
|
|
43
34
|
}
|
|
44
35
|
)
|
|
45
36
|
|
|
46
37
|
onUnmounted(() => {
|
|
47
|
-
graph.unregister(
|
|
38
|
+
graph.unregister(id)
|
|
48
39
|
})
|
|
49
40
|
</script>
|
|
50
41
|
|