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,27 +1,21 @@
|
|
|
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 { uniform, vec4 } from 'three/tsl'
|
|
6
3
|
|
|
7
4
|
import { saturate } from '../../shaders/common/blend'
|
|
8
5
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}>(),
|
|
15
|
-
{ amount: 0.5, order: 0 }
|
|
16
|
-
)
|
|
6
|
+
const { amount = 0.5, order = 0 } = defineProps<{
|
|
7
|
+
/** Saturation boost: 0 = unchanged, positive = more saturated */
|
|
8
|
+
amount?: number
|
|
9
|
+
order?: number
|
|
10
|
+
}>()
|
|
17
11
|
|
|
18
|
-
const amountNode = uniform(
|
|
12
|
+
const amountNode = uniform(amount)
|
|
19
13
|
watch(
|
|
20
|
-
() =>
|
|
14
|
+
() => amount,
|
|
21
15
|
(v) => {
|
|
22
16
|
amountNode.value = v
|
|
23
17
|
}
|
|
24
18
|
)
|
|
25
19
|
|
|
26
|
-
useShaderStage((prev) => vec4(saturate(prev.xyz, amountNode), prev.w),
|
|
20
|
+
useShaderStage((prev) => vec4(saturate(prev.xyz, amountNode), prev.w), order)
|
|
27
21
|
</script>
|
|
@@ -1,41 +1,40 @@
|
|
|
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 { time, uniform, vec4 } from 'three/tsl'
|
|
6
3
|
|
|
7
4
|
import { scanlines } from '../../shaders/common/grain'
|
|
8
5
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
const {
|
|
7
|
+
density = 400,
|
|
8
|
+
intensity = 0.25,
|
|
9
|
+
scrollSpeed = 0,
|
|
10
|
+
order = 0,
|
|
11
|
+
} = defineProps<{
|
|
12
|
+
/** Number of scanlines across the screen */
|
|
13
|
+
density?: number
|
|
14
|
+
/** Darkness of the lines: 0 = invisible, 1 = full black */
|
|
15
|
+
intensity?: number
|
|
16
|
+
/** Animate the lines — speed in lines/second */
|
|
17
|
+
scrollSpeed?: number
|
|
18
|
+
order?: number
|
|
19
|
+
}>()
|
|
21
20
|
|
|
22
|
-
const densityNode = uniform(
|
|
23
|
-
const intensityNode = uniform(
|
|
24
|
-
const scrollSpeedNode = uniform(
|
|
21
|
+
const densityNode = uniform(density)
|
|
22
|
+
const intensityNode = uniform(intensity)
|
|
23
|
+
const scrollSpeedNode = uniform(scrollSpeed)
|
|
25
24
|
watch(
|
|
26
|
-
() =>
|
|
25
|
+
() => density,
|
|
27
26
|
(v) => {
|
|
28
27
|
densityNode.value = v
|
|
29
28
|
}
|
|
30
29
|
)
|
|
31
30
|
watch(
|
|
32
|
-
() =>
|
|
31
|
+
() => intensity,
|
|
33
32
|
(v) => {
|
|
34
33
|
intensityNode.value = v
|
|
35
34
|
}
|
|
36
35
|
)
|
|
37
36
|
watch(
|
|
38
|
-
() =>
|
|
37
|
+
() => scrollSpeed,
|
|
39
38
|
(v) => {
|
|
40
39
|
scrollSpeedNode.value = v
|
|
41
40
|
}
|
|
@@ -48,5 +47,5 @@
|
|
|
48
47
|
const offset = time.mul(scrollSpeedNode)
|
|
49
48
|
const factor = scanlines(uvCurrent, densityNode, intensityNode, offset)
|
|
50
49
|
return vec4(prev.xyz.mul(factor), prev.w)
|
|
51
|
-
},
|
|
50
|
+
}, order)
|
|
52
51
|
</script>
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck
|
|
5
2
|
import { Color } from 'three'
|
|
6
3
|
import { mix, uniform, vec4 } from 'three/tsl'
|
|
7
4
|
|
|
8
5
|
import { blendScreen } from '../../shaders/common/blend'
|
|
6
|
+
import type { TSLNode } from '../../shaders/types'
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const {
|
|
9
|
+
color = '#808080',
|
|
10
|
+
opacity = 1,
|
|
11
|
+
order = 0,
|
|
12
|
+
} = defineProps<{
|
|
13
|
+
color?: string
|
|
14
|
+
opacity?: number
|
|
15
|
+
order?: number
|
|
16
|
+
}>()
|
|
18
17
|
|
|
19
|
-
const colorNode = uniform(new Color(
|
|
20
|
-
const opacityNode = uniform(
|
|
18
|
+
const colorNode: TSLNode = uniform(new Color(color))
|
|
19
|
+
const opacityNode = uniform(opacity)
|
|
21
20
|
watch(
|
|
22
|
-
() =>
|
|
21
|
+
() => color,
|
|
23
22
|
(v) => {
|
|
24
23
|
colorNode.value.set(v)
|
|
25
24
|
}
|
|
26
25
|
)
|
|
27
26
|
watch(
|
|
28
|
-
() =>
|
|
27
|
+
() => opacity,
|
|
29
28
|
(v) => {
|
|
30
29
|
opacityNode.value = v
|
|
31
30
|
}
|
|
@@ -33,6 +32,6 @@
|
|
|
33
32
|
|
|
34
33
|
useShaderStage(
|
|
35
34
|
(prev) => vec4(mix(prev.xyz, blendScreen(prev.xyz, colorNode), opacityNode), prev.w),
|
|
36
|
-
|
|
35
|
+
order
|
|
37
36
|
)
|
|
38
37
|
</script>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
|
|
6
|
-
import { float, floor, fract, uniform, vec3, vec4 } from 'three/tsl'
|
|
2
|
+
import { float, fract, uniform, vec3, vec4 } from 'three/tsl'
|
|
7
3
|
|
|
8
4
|
/**
|
|
9
5
|
* ShaderDebugger — dev-only visualization overlay for inspecting pipeline state.
|
|
@@ -17,38 +13,41 @@
|
|
|
17
13
|
* Drop this at any `order` value to inspect that point in the pipeline.
|
|
18
14
|
* Only renders in development — remove from production compositions.
|
|
19
15
|
*/
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
const {
|
|
17
|
+
mode = 'uv',
|
|
18
|
+
gridLines = 10,
|
|
19
|
+
gridThickness = 0.02,
|
|
20
|
+
blend = 0,
|
|
21
|
+
order = 0,
|
|
22
|
+
} = defineProps<{
|
|
23
|
+
/** Visualization mode */
|
|
24
|
+
mode?: 'uv' | 'normal' | 'grid' | 'pass'
|
|
25
|
+
/** Grid line count (grid mode) */
|
|
26
|
+
gridLines?: number
|
|
27
|
+
/** Grid line thickness */
|
|
28
|
+
gridThickness?: number
|
|
29
|
+
/** Blend with original output (0 = full debug, 1 = full original) */
|
|
30
|
+
blend?: number
|
|
31
|
+
order?: number
|
|
32
|
+
}>()
|
|
34
33
|
|
|
35
|
-
const gridLinesNode = uniform(
|
|
36
|
-
const gridThickNode = uniform(
|
|
37
|
-
const blendNode = uniform(
|
|
34
|
+
const gridLinesNode = uniform(gridLines)
|
|
35
|
+
const gridThickNode = uniform(gridThickness)
|
|
36
|
+
const blendNode = uniform(blend)
|
|
38
37
|
watch(
|
|
39
|
-
() =>
|
|
38
|
+
() => gridLines,
|
|
40
39
|
(v) => {
|
|
41
40
|
gridLinesNode.value = v
|
|
42
41
|
}
|
|
43
42
|
)
|
|
44
43
|
watch(
|
|
45
|
-
() =>
|
|
44
|
+
() => gridThickness,
|
|
46
45
|
(v) => {
|
|
47
46
|
gridThickNode.value = v
|
|
48
47
|
}
|
|
49
48
|
)
|
|
50
49
|
watch(
|
|
51
|
-
() =>
|
|
50
|
+
() => blend,
|
|
52
51
|
(v) => {
|
|
53
52
|
blendNode.value = v
|
|
54
53
|
}
|
|
@@ -61,14 +60,14 @@
|
|
|
61
60
|
|
|
62
61
|
let debugColour
|
|
63
62
|
|
|
64
|
-
if (
|
|
63
|
+
if (mode === 'uv') {
|
|
65
64
|
// Red = U, Green = V, Blue = 0
|
|
66
65
|
debugColour = vec3(uv.x, uv.y, float(0))
|
|
67
|
-
} else if (
|
|
66
|
+
} else if (mode === 'normal') {
|
|
68
67
|
// Encodes centered UV — negative values become blue tones
|
|
69
68
|
const centered = uv.sub(0.5)
|
|
70
69
|
debugColour = vec3(centered.x.add(0.5), centered.y.add(0.5), float(0.5))
|
|
71
|
-
} else if (
|
|
70
|
+
} else if (mode === 'grid') {
|
|
72
71
|
// Grid lines via fract — line at every 1/gridLines interval
|
|
73
72
|
const scaled = uv.mul(gridLinesNode)
|
|
74
73
|
const fx = fract(scaled.x)
|
|
@@ -83,5 +82,5 @@
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
return vec4(prev.xyz.mix(debugColour, float(1).sub(blendNode)), prev.w)
|
|
86
|
-
},
|
|
85
|
+
}, order)
|
|
87
86
|
</script>
|
|
@@ -1,59 +1,52 @@
|
|
|
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
|
|
6
2
|
import { Color } from 'three'
|
|
7
3
|
import { float, mix, time, uniform, vec2, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
import { simplexNoise2D } from '../../shaders/common/noise'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
order: 0,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
7
|
+
const {
|
|
8
|
+
colorA = '#000000',
|
|
9
|
+
colorB = '#ffffff',
|
|
10
|
+
scale = 3,
|
|
11
|
+
animated = true,
|
|
12
|
+
speed = 0.3,
|
|
13
|
+
order = 0,
|
|
14
|
+
} = defineProps<{
|
|
15
|
+
colorA?: string
|
|
16
|
+
colorB?: string
|
|
17
|
+
scale?: number
|
|
18
|
+
animated?: boolean
|
|
19
|
+
speed?: number
|
|
20
|
+
order?: number
|
|
21
|
+
}>()
|
|
29
22
|
|
|
30
|
-
const colorAVal = new Color(
|
|
31
|
-
const colorBVal = new Color(
|
|
23
|
+
const colorAVal = new Color(colorA)
|
|
24
|
+
const colorBVal = new Color(colorB)
|
|
32
25
|
const colorANode = uniform(colorAVal)
|
|
33
26
|
const colorBNode = uniform(colorBVal)
|
|
34
|
-
const scaleNode = uniform(
|
|
35
|
-
const speedNode = uniform(
|
|
27
|
+
const scaleNode = uniform(scale)
|
|
28
|
+
const speedNode = uniform(speed)
|
|
36
29
|
|
|
37
30
|
watch(
|
|
38
|
-
() =>
|
|
31
|
+
() => colorA,
|
|
39
32
|
(v) => {
|
|
40
33
|
colorANode.value.set(v)
|
|
41
34
|
}
|
|
42
35
|
)
|
|
43
36
|
watch(
|
|
44
|
-
() =>
|
|
37
|
+
() => colorB,
|
|
45
38
|
(v) => {
|
|
46
39
|
colorBNode.value.set(v)
|
|
47
40
|
}
|
|
48
41
|
)
|
|
49
42
|
watch(
|
|
50
|
-
() =>
|
|
43
|
+
() => scale,
|
|
51
44
|
(v) => {
|
|
52
45
|
scaleNode.value = v
|
|
53
46
|
}
|
|
54
47
|
)
|
|
55
48
|
watch(
|
|
56
|
-
() =>
|
|
49
|
+
() => speed,
|
|
57
50
|
(v) => {
|
|
58
51
|
speedNode.value = v
|
|
59
52
|
}
|
|
@@ -63,9 +56,9 @@
|
|
|
63
56
|
|
|
64
57
|
useShaderStage((_prev) => {
|
|
65
58
|
// Scroll UV over time to animate noise (cheaper than 3D noise)
|
|
66
|
-
const offset =
|
|
59
|
+
const offset = animated ? time.mul(speedNode) : float(0)
|
|
67
60
|
const input = uvNode.value.mul(scaleNode).add(vec2(offset, 0))
|
|
68
61
|
const n = simplexNoise2D(input).mul(0.5).add(0.5)
|
|
69
62
|
return vec4(mix(colorANode, colorBNode, n), 1.0)
|
|
70
|
-
},
|
|
63
|
+
}, order)
|
|
71
64
|
</script>
|
|
@@ -1,88 +1,81 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { Color, Vector3 } from 'three'
|
|
7
|
-
import { clamp, dot, float, mix, pow, uniform,
|
|
3
|
+
import { clamp, dot, float, mix, pow, uniform, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
order: 0,
|
|
33
|
-
}
|
|
34
|
-
)
|
|
5
|
+
const {
|
|
6
|
+
zenith = '#1a3a8a',
|
|
7
|
+
horizon = '#7ab0d8',
|
|
8
|
+
ground = '#5a4a3a',
|
|
9
|
+
sunDirection = [0.3, 0.8, 0.5],
|
|
10
|
+
sunColor = '#fff8e0',
|
|
11
|
+
sunPower = 512,
|
|
12
|
+
order = 0,
|
|
13
|
+
} = defineProps<{
|
|
14
|
+
/** Sky colour at the zenith */
|
|
15
|
+
zenith?: string
|
|
16
|
+
/** Sky colour at the horizon */
|
|
17
|
+
horizon?: string
|
|
18
|
+
/** Ground colour below horizon */
|
|
19
|
+
ground?: string
|
|
20
|
+
/** Sun direction — [x, y, z] world space (will be normalised) */
|
|
21
|
+
sunDirection?: [number, number, number]
|
|
22
|
+
/** Sun colour */
|
|
23
|
+
sunColor?: string
|
|
24
|
+
/** Sun disk sharpness (higher = smaller disk) */
|
|
25
|
+
sunPower?: number
|
|
26
|
+
order?: number
|
|
27
|
+
}>()
|
|
35
28
|
|
|
36
29
|
function toVec3Node(hex: string) {
|
|
37
30
|
const c = new Color(hex)
|
|
38
31
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
39
32
|
}
|
|
40
33
|
|
|
41
|
-
const zenithNode = toVec3Node(
|
|
42
|
-
const horizonNode = toVec3Node(
|
|
43
|
-
const groundNode = toVec3Node(
|
|
44
|
-
const sunColorNode = toVec3Node(
|
|
45
|
-
const sunPowerNode = uniform(
|
|
34
|
+
const zenithNode = toVec3Node(zenith)
|
|
35
|
+
const horizonNode = toVec3Node(horizon)
|
|
36
|
+
const groundNode = toVec3Node(ground)
|
|
37
|
+
const sunColorNode = toVec3Node(sunColor)
|
|
38
|
+
const sunPowerNode = uniform(sunPower)
|
|
46
39
|
|
|
47
|
-
const sunDir = new Vector3(...
|
|
40
|
+
const sunDir = new Vector3(...sunDirection).normalize()
|
|
48
41
|
const sunDirNode = uniform(new Vector3(sunDir.x, sunDir.y, sunDir.z))
|
|
49
42
|
|
|
50
43
|
watch(
|
|
51
|
-
() =>
|
|
44
|
+
() => zenith,
|
|
52
45
|
(v) => {
|
|
53
46
|
const c = new Color(v)
|
|
54
47
|
zenithNode.value.set(c.r, c.g, c.b)
|
|
55
48
|
}
|
|
56
49
|
)
|
|
57
50
|
watch(
|
|
58
|
-
() =>
|
|
51
|
+
() => horizon,
|
|
59
52
|
(v) => {
|
|
60
53
|
const c = new Color(v)
|
|
61
54
|
horizonNode.value.set(c.r, c.g, c.b)
|
|
62
55
|
}
|
|
63
56
|
)
|
|
64
57
|
watch(
|
|
65
|
-
() =>
|
|
58
|
+
() => ground,
|
|
66
59
|
(v) => {
|
|
67
60
|
const c = new Color(v)
|
|
68
61
|
groundNode.value.set(c.r, c.g, c.b)
|
|
69
62
|
}
|
|
70
63
|
)
|
|
71
64
|
watch(
|
|
72
|
-
() =>
|
|
65
|
+
() => sunColor,
|
|
73
66
|
(v) => {
|
|
74
67
|
const c = new Color(v)
|
|
75
68
|
sunColorNode.value.set(c.r, c.g, c.b)
|
|
76
69
|
}
|
|
77
70
|
)
|
|
78
71
|
watch(
|
|
79
|
-
() =>
|
|
72
|
+
() => sunPower,
|
|
80
73
|
(v) => {
|
|
81
74
|
sunPowerNode.value = v
|
|
82
75
|
}
|
|
83
76
|
)
|
|
84
77
|
watch(
|
|
85
|
-
() =>
|
|
78
|
+
() => sunDirection,
|
|
86
79
|
([x, y, z]) => {
|
|
87
80
|
const d = new Vector3(x, y, z).normalize()
|
|
88
81
|
sunDirNode.value.set(d.x, d.y, d.z)
|
|
@@ -104,5 +97,5 @@
|
|
|
104
97
|
const sun = sunColorNode.mul(pow(sunDot, sunPowerNode))
|
|
105
98
|
|
|
106
99
|
return vec4(colour.add(sun), 1.0)
|
|
107
|
-
},
|
|
100
|
+
}, order)
|
|
108
101
|
</script>
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck
|
|
5
2
|
import { Color } from 'three'
|
|
6
3
|
import { mix, uniform, vec4 } from 'three/tsl'
|
|
7
4
|
|
|
8
5
|
import { blendSoftLight } from '../../shaders/common/blend'
|
|
6
|
+
import type { TSLNode } from '../../shaders/types'
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const {
|
|
9
|
+
color = '#808080',
|
|
10
|
+
opacity = 1,
|
|
11
|
+
order = 0,
|
|
12
|
+
} = defineProps<{
|
|
13
|
+
color?: string
|
|
14
|
+
opacity?: number
|
|
15
|
+
order?: number
|
|
16
|
+
}>()
|
|
18
17
|
|
|
19
|
-
const colorNode = uniform(new Color(
|
|
20
|
-
const opacityNode = uniform(
|
|
18
|
+
const colorNode: TSLNode = uniform(new Color(color))
|
|
19
|
+
const opacityNode = uniform(opacity)
|
|
21
20
|
watch(
|
|
22
|
-
() =>
|
|
21
|
+
() => color,
|
|
23
22
|
(v) => {
|
|
24
23
|
colorNode.value.set(v)
|
|
25
24
|
}
|
|
26
25
|
)
|
|
27
26
|
watch(
|
|
28
|
-
() =>
|
|
27
|
+
() => opacity,
|
|
29
28
|
(v) => {
|
|
30
29
|
opacityNode.value = v
|
|
31
30
|
}
|
|
@@ -33,6 +32,6 @@
|
|
|
33
32
|
|
|
34
33
|
useShaderStage(
|
|
35
34
|
(prev) => vec4(mix(prev.xyz, blendSoftLight(prev.xyz, colorNode), opacityNode), prev.w),
|
|
36
|
-
|
|
35
|
+
order
|
|
37
36
|
)
|
|
38
37
|
</script>
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
3
1
|
<script setup lang="ts">
|
|
4
|
-
// @ts-nocheck
|
|
5
2
|
import { Color } from 'three'
|
|
6
3
|
import { uniform, vec4 } from 'three/tsl'
|
|
7
4
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}>(),
|
|
13
|
-
{
|
|
14
|
-
color: '#ffffff',
|
|
15
|
-
order: 0,
|
|
16
|
-
}
|
|
17
|
-
)
|
|
5
|
+
const { color = '#ffffff', order = 0 } = defineProps<{
|
|
6
|
+
color?: string
|
|
7
|
+
order?: number
|
|
8
|
+
}>()
|
|
18
9
|
|
|
19
|
-
const colorVal = new Color(
|
|
10
|
+
const colorVal = new Color(color)
|
|
20
11
|
const colorNode = uniform(colorVal)
|
|
21
12
|
watch(
|
|
22
|
-
() =>
|
|
13
|
+
() => color,
|
|
23
14
|
(v) => {
|
|
24
15
|
colorNode.value.set(v)
|
|
25
16
|
}
|
|
26
17
|
)
|
|
27
18
|
|
|
28
|
-
useShaderStage((_prev) => vec4(colorNode, 1.0),
|
|
19
|
+
useShaderStage((_prev) => vec4(colorNode, 1.0), order)
|
|
29
20
|
</script>
|
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
<!-- eslint-disable @typescript-eslint/no-unused-vars -->
|
|
2
|
-
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
-
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
4
1
|
<script setup lang="ts">
|
|
5
|
-
// @ts-nocheck
|
|
6
2
|
import { Color, Vector3 } from 'three'
|
|
7
|
-
import { float,
|
|
3
|
+
import { float, smoothstep, uniform, vec4 } from 'three/tsl'
|
|
8
4
|
|
|
9
5
|
import { luminance } from '../../shaders/common/blend'
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
const {
|
|
8
|
+
shadowColor = '#1a2a5a',
|
|
9
|
+
highlightColor = '#ffeecc',
|
|
10
|
+
balance = 0.5,
|
|
11
|
+
opacity = 0.5,
|
|
12
|
+
order = 0,
|
|
13
|
+
} = defineProps<{
|
|
14
|
+
/** Colour pushed into shadow tones */
|
|
15
|
+
shadowColor?: string
|
|
16
|
+
/** Colour pushed into highlight tones */
|
|
17
|
+
highlightColor?: string
|
|
18
|
+
/** Balance point: 0.5 = even split, lower = shadows dominate */
|
|
19
|
+
balance?: number
|
|
20
|
+
/** Overall blend strength */
|
|
21
|
+
opacity?: number
|
|
22
|
+
order?: number
|
|
23
|
+
}>()
|
|
25
24
|
|
|
26
25
|
function toVec3Node(hex: string) {
|
|
27
26
|
const c = new Color(hex)
|
|
28
27
|
return uniform(new Vector3(c.r, c.g, c.b))
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
const shadowNode = toVec3Node(
|
|
32
|
-
const highlightNode = toVec3Node(
|
|
33
|
-
const balanceNode = uniform(
|
|
34
|
-
const opacityNode = uniform(
|
|
30
|
+
const shadowNode = toVec3Node(shadowColor)
|
|
31
|
+
const highlightNode = toVec3Node(highlightColor)
|
|
32
|
+
const balanceNode = uniform(balance)
|
|
33
|
+
const opacityNode = uniform(opacity)
|
|
35
34
|
watch(
|
|
36
|
-
() =>
|
|
35
|
+
() => shadowColor,
|
|
37
36
|
(v) => {
|
|
38
37
|
const c = new Color(v)
|
|
39
38
|
shadowNode.value.set(c.r, c.g, c.b)
|
|
40
39
|
}
|
|
41
40
|
)
|
|
42
41
|
watch(
|
|
43
|
-
() =>
|
|
42
|
+
() => highlightColor,
|
|
44
43
|
(v) => {
|
|
45
44
|
const c = new Color(v)
|
|
46
45
|
highlightNode.value.set(c.r, c.g, c.b)
|
|
47
46
|
}
|
|
48
47
|
)
|
|
49
48
|
watch(
|
|
50
|
-
() =>
|
|
49
|
+
() => balance,
|
|
51
50
|
(v) => {
|
|
52
51
|
balanceNode.value = v
|
|
53
52
|
}
|
|
54
53
|
)
|
|
55
54
|
watch(
|
|
56
|
-
() =>
|
|
55
|
+
() => opacity,
|
|
57
56
|
(v) => {
|
|
58
57
|
opacityNode.value = v
|
|
59
58
|
}
|
|
@@ -67,5 +66,5 @@
|
|
|
67
66
|
.add(shadowNode.mul(shadowMask).mul(opacityNode))
|
|
68
67
|
.add(highlightNode.mul(highlightMask).mul(opacityNode))
|
|
69
68
|
return vec4(toned, prev.w)
|
|
70
|
-
},
|
|
69
|
+
}, order)
|
|
71
70
|
</script>
|