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.
Files changed (360) hide show
  1. package/layers/animations/app/components/Motion/CountUp.vue +30 -30
  2. package/layers/animations/app/components/Motion/Magnetic.vue +14 -14
  3. package/layers/animations/app/components/Motion/Marquee.vue +59 -62
  4. package/layers/animations/app/components/Motion/MarqueeText.vue +2 -2
  5. package/layers/animations/app/components/Motion/Staggered.vue +45 -49
  6. package/layers/animations/app/components/Motion/TextReveal.vue +21 -19
  7. package/layers/animations/app/components/Motion/Tilt.vue +13 -13
  8. package/layers/animations/app/components/Motion/VelocityEffect.vue +80 -80
  9. package/layers/animations/app/composables/useCountUp.ts +1 -1
  10. package/layers/animations/app/composables/useMarqueeVelocity.ts +2 -2
  11. package/layers/canvas/app/components/ShaderCanvas.vue +42 -49
  12. package/layers/canvas/app/composables/useRendererCapabilities.ts +29 -21
  13. package/layers/canvas/app/composables/useShaderTime.ts +4 -5
  14. package/layers/canvas/app/types/renderer.ts +5 -0
  15. package/layers/content/app/components/Blog/Article.vue +10 -7
  16. package/layers/content/app/components/Blog/Card.vue +0 -1
  17. package/layers/content/app/components/Blog/List.vue +2 -4
  18. package/layers/content/app/components/Gallery/AmbientImage.vue +0 -1
  19. package/layers/content/app/components/Gallery/Card.vue +0 -1
  20. package/layers/content/app/components/Gallery/Detail.vue +0 -2
  21. package/layers/content/app/components/Gallery/Grid.vue +0 -2
  22. package/layers/content/app/components/Gallery/ImageDetail.vue +0 -2
  23. package/layers/content/app/components/Gallery/Lightbox.vue +1 -6
  24. package/layers/content/app/components/NuxtContent/Detail.vue +3 -4
  25. package/layers/content/app/components/NuxtContent/List.vue +0 -1
  26. package/layers/content/app/components/NuxtContent/Surround.vue +0 -1
  27. package/layers/content/app/components/NuxtContent/Toc.vue +0 -1
  28. package/layers/content/app/components/Portfolio/Card.vue +0 -1
  29. package/layers/content/app/components/Portfolio/ColorPalette.vue +0 -1
  30. package/layers/content/app/components/Portfolio/Detail.vue +2 -4
  31. package/layers/content/app/components/Portfolio/ItemPage.vue +3 -1
  32. package/layers/content/app/components/Portfolio/List.vue +20 -5
  33. package/layers/content/app/components/Portfolio/Typography.vue +0 -1
  34. package/layers/content/app/components/content/Figure.vue +0 -1
  35. package/layers/content/app/composables/createPortfolioComposables.ts +22 -6
  36. package/layers/content/app/composables/useBlogPosts.ts +3 -1
  37. package/layers/content/app/composables/useCollectionItem.ts +2 -3
  38. package/layers/content/app/composables/useCollectionSurround.ts +2 -3
  39. package/layers/content/app/composables/useContentPage.ts +0 -2
  40. package/layers/content/app/composables/useGalleryItems.ts +3 -3
  41. package/layers/content/app/composables/usePortfolioItems.ts +3 -3
  42. package/layers/content/app/types/app-config.d.ts +3 -1
  43. package/layers/content/app/types/collections.d.ts +46 -0
  44. package/layers/content/nuxt.config.ts +0 -1
  45. package/layers/core/app/components/ErrorBoundary.vue +0 -3
  46. package/layers/core/app/composables/useBrowser.ts +0 -1
  47. package/layers/core/app/composables/useCache.ts +0 -3
  48. package/layers/core/app/composables/useErrorLog.ts +0 -2
  49. package/layers/core/app/composables/useFeatures.ts +0 -3
  50. package/layers/core/app/composables/useLoading.ts +16 -15
  51. package/layers/core/app/composables/useNetworkInfo.ts +0 -2
  52. package/layers/core/app/composables/usePWAInfo.ts +0 -1
  53. package/layers/core/app/composables/useRendering.ts +0 -2
  54. package/layers/core/app/composables/useScreen.ts +0 -2
  55. package/layers/core/app/composables/useScrollGuard.ts +44 -44
  56. package/layers/core/app/layouts/default.vue +0 -1
  57. package/layers/core/app/plugins/error-handler.ts +4 -2
  58. package/layers/core/app/plugins/feature-detection.client.ts +4 -4
  59. package/layers/core/app/plugins/init.ts +4 -6
  60. package/layers/core/app/plugins/loading.client.ts +4 -3
  61. package/layers/core/app/plugins/scroll-guard.client.ts +4 -4
  62. package/layers/core/app/types/app-config.d.ts +1 -1
  63. package/layers/core/app/types/runtime-config.ts +13 -1
  64. package/layers/core/app/utils/helpers.ts +0 -4
  65. package/layers/feeds/app/app.config.ts +1 -1
  66. package/layers/feeds/app/plugins/feed-head.ts +4 -3
  67. package/layers/feeds/package.json +1 -1
  68. package/layers/forms/app/components/Form/Contact.vue +0 -2
  69. package/layers/forms/app/components/Form/Field.vue +0 -1
  70. package/layers/forms/app/composables/useFormSchema.ts +0 -1
  71. package/layers/forms/app/types/app-config.d.ts +1 -1
  72. package/layers/layout/app/components/Layout/Grid/Item.vue +0 -3
  73. package/layers/layout/app/components/Layout/Page/Container.vue +0 -4
  74. package/layers/layout/app/components/Layout/Page/Header.vue +0 -1
  75. package/layers/layout/app/components/Layout/Page/index.vue +0 -1
  76. package/layers/layout/app/components/Layout/Section/Gallery.vue +0 -1
  77. package/layers/layout/app/components/Layout/Section/Hero.vue +0 -3
  78. package/layers/layout/app/components/Layout/Section/Stack.vue +0 -3
  79. package/layers/layout/app/components/Layout/Section/Title.vue +0 -1
  80. package/layers/layout/app/composables/useGridConfig.ts +0 -1
  81. package/layers/layout/app/types/app-config.d.ts +6 -3
  82. package/layers/navigation/app/app.config.ts +1 -2
  83. package/layers/navigation/app/components/Links/Group.vue +0 -4
  84. package/layers/navigation/app/components/Links/Named.vue +0 -4
  85. package/layers/navigation/app/composables/mastNav.ts +0 -1
  86. package/layers/navigation/app/composables/toast.ts +0 -1
  87. package/layers/navigation/app/composables/useSite.ts +0 -1
  88. package/layers/navigation/app/utils/createModal.ts +0 -1
  89. package/layers/page-transitions/app/app.config.ts +1 -1
  90. package/layers/page-transitions/app/plugins/page-transitions.client.ts +4 -2
  91. package/layers/routing/app/composables/useRoutingConfig.ts +0 -1
  92. package/layers/routing/app/plugins/feature-flags.client.ts +4 -2
  93. package/layers/routing/app/plugins/scroll-routing.client.ts +4 -2
  94. package/layers/routing/app/types/app-config.d.ts +1 -2
  95. package/layers/routing/nuxt.config.ts +0 -1
  96. package/layers/scripts/app/app.config.ts +1 -2
  97. package/layers/scripts/app/composables/useAnalytics.ts +6 -6
  98. package/layers/scripts/app/composables/useGtm.ts +4 -4
  99. package/layers/scripts/app/composables/useScriptLoader.ts +12 -1
  100. package/layers/scroll/app/components/Motion/HorizontalScroll.vue +6 -3
  101. package/layers/scroll/app/components/Motion/Parallax.vue +38 -42
  102. package/layers/scroll/app/components/Motion/PinnedSection.vue +6 -3
  103. package/layers/scroll/app/components/Motion/ScrollLink.vue +26 -29
  104. package/layers/scroll/app/components/Motion/ScrollProgress.vue +38 -44
  105. package/layers/scroll/app/components/Motion/ScrollScene.vue +1 -2
  106. package/layers/scroll/app/components/Motion/ScrollStats.vue +19 -23
  107. package/layers/scroll/app/composables/useSmoothScroll.ts +21 -24
  108. package/layers/scroll/app/plugins/locomotive-scroll.client.ts +5 -2
  109. package/layers/seo/app/app.config.ts +1 -2
  110. package/layers/seo/app/composables/useSeoConfig.ts +0 -1
  111. package/layers/shader/app/components/Effect/PostProcessing.vue +3 -13
  112. package/layers/shader/app/components/Material/AmbientAurora.client.vue +41 -47
  113. package/layers/shader/app/components/Material/AmbientFlow.client.vue +47 -56
  114. package/layers/shader/app/components/Material/AmbientGradientMesh.client.vue +45 -51
  115. package/layers/shader/app/components/Material/AmbientNebula.client.vue +47 -53
  116. package/layers/shader/app/components/Material/AmbientOcean.client.vue +40 -46
  117. package/layers/shader/app/components/Material/Fresnel.client.vue +24 -29
  118. package/layers/shader/app/components/Material/Gradient.client.vue +61 -67
  119. package/layers/shader/app/components/Material/Image.client.vue +65 -71
  120. package/layers/shader/app/components/Material/Node.client.vue +46 -46
  121. package/layers/shader/app/components/Material/Noise.client.vue +48 -54
  122. package/layers/shader/app/components/Mesh/Plane.vue +15 -20
  123. package/layers/shader/app/components/Node/Color.client.vue +3 -4
  124. package/layers/shader/app/components/Node/Fresnel.client.vue +17 -26
  125. package/layers/shader/app/components/Node/Gradient.client.vue +36 -42
  126. package/layers/shader/app/components/Node/Mix.client.vue +13 -19
  127. package/layers/shader/app/components/Node/Noise.client.vue +0 -3
  128. package/layers/shader/app/components/Pipeline/ACESTonemap.client.vue +0 -2
  129. package/layers/shader/app/components/Pipeline/AddBlend.client.vue +15 -16
  130. package/layers/shader/app/components/Pipeline/AgedFilm.client.vue +27 -28
  131. package/layers/shader/app/components/Pipeline/Aurora.client.vue +37 -44
  132. package/layers/shader/app/components/Pipeline/BilinearGradient.client.vue +26 -33
  133. package/layers/shader/app/components/Pipeline/BillowNoise.client.vue +22 -23
  134. package/layers/shader/app/components/Pipeline/BrightnessContrast.client.vue +16 -20
  135. package/layers/shader/app/components/Pipeline/CellularNoise.client.vue +22 -23
  136. package/layers/shader/app/components/Pipeline/ChannelMixer.client.vue +28 -35
  137. package/layers/shader/app/components/Pipeline/ChebyshevNoiseField.client.vue +31 -31
  138. package/layers/shader/app/components/Pipeline/Checkerboard.client.vue +21 -23
  139. package/layers/shader/app/components/Pipeline/ChromaticAberration.client.vue +21 -23
  140. package/layers/shader/app/components/Pipeline/ChromaticScreenWaves.client.vue +31 -30
  141. package/layers/shader/app/components/Pipeline/Circle.client.vue +22 -23
  142. package/layers/shader/app/components/Pipeline/Clouds.client.vue +36 -43
  143. package/layers/shader/app/components/Pipeline/ColorBurnBlend.client.vue +15 -17
  144. package/layers/shader/app/components/Pipeline/ColorDodgeBlend.client.vue +15 -17
  145. package/layers/shader/app/components/Pipeline/ColourRamp.client.vue +28 -35
  146. package/layers/shader/app/components/Pipeline/ComplexPlaneField.client.vue +31 -38
  147. package/layers/shader/app/components/Pipeline/ConicGradient.client.vue +19 -21
  148. package/layers/shader/app/components/Pipeline/CosinePalette.client.vue +42 -49
  149. package/layers/shader/app/components/Pipeline/CoverageAlpha.client.vue +0 -4
  150. package/layers/shader/app/components/Pipeline/Cross.client.vue +28 -28
  151. package/layers/shader/app/components/Pipeline/CurlNoise.client.vue +26 -27
  152. package/layers/shader/app/components/Pipeline/DarkenBlend.client.vue +15 -17
  153. package/layers/shader/app/components/Pipeline/DayNightCycle.client.vue +26 -27
  154. package/layers/shader/app/components/Pipeline/Desaturate.client.vue +8 -15
  155. package/layers/shader/app/components/Pipeline/DiagonalGradient.client.vue +19 -21
  156. package/layers/shader/app/components/Pipeline/DiamondGradient.client.vue +19 -21
  157. package/layers/shader/app/components/Pipeline/DifferenceBlend.client.vue +15 -17
  158. package/layers/shader/app/components/Pipeline/DivideBlend.client.vue +14 -17
  159. package/layers/shader/app/components/Pipeline/DomainWarpedNoise.client.vue +30 -37
  160. package/layers/shader/app/components/Pipeline/Dots.client.vue +26 -33
  161. package/layers/shader/app/components/Pipeline/DuoTone.client.vue +16 -19
  162. package/layers/shader/app/components/Pipeline/ExclusionBlend.client.vue +14 -17
  163. package/layers/shader/app/components/Pipeline/ExponentialFog.client.vue +21 -23
  164. package/layers/shader/app/components/Pipeline/Exposure.client.vue +8 -15
  165. package/layers/shader/app/components/Pipeline/FBMNoise.client.vue +28 -36
  166. package/layers/shader/app/components/Pipeline/FilmBurn.client.vue +27 -28
  167. package/layers/shader/app/components/Pipeline/FilmGrain.client.vue +29 -29
  168. package/layers/shader/app/components/Pipeline/FisheyeRay.client.vue +11 -18
  169. package/layers/shader/app/components/Pipeline/Flame.client.vue +26 -27
  170. package/layers/shader/app/components/Pipeline/FocalGradient.client.vue +24 -25
  171. package/layers/shader/app/components/Pipeline/Gamma.client.vue +8 -14
  172. package/layers/shader/app/components/Pipeline/GodRays.client.vue +32 -39
  173. package/layers/shader/app/components/Pipeline/GradientNoise.client.vue +22 -22
  174. package/layers/shader/app/components/Pipeline/Grain.client.vue +34 -41
  175. package/layers/shader/app/components/Pipeline/Grid.client.vue +24 -24
  176. package/layers/shader/app/components/Pipeline/Halation.client.vue +22 -24
  177. package/layers/shader/app/components/Pipeline/Halftone.client.vue +16 -18
  178. package/layers/shader/app/components/Pipeline/HardLightBlend.client.vue +15 -16
  179. package/layers/shader/app/components/Pipeline/Haze.client.vue +22 -24
  180. package/layers/shader/app/components/Pipeline/Hexagon.client.vue +22 -22
  181. package/layers/shader/app/components/Pipeline/Hue.client.vue +8 -12
  182. package/layers/shader/app/components/Pipeline/Invert.client.vue +0 -1
  183. package/layers/shader/app/components/Pipeline/LensFlare.client.vue +27 -25
  184. package/layers/shader/app/components/Pipeline/LightenBlend.client.vue +15 -14
  185. package/layers/shader/app/components/Pipeline/LinearGradient.client.vue +17 -21
  186. package/layers/shader/app/components/Pipeline/LinearGradient4.client.vue +29 -33
  187. package/layers/shader/app/components/Pipeline/LinearToSRGB.client.vue +8 -12
  188. package/layers/shader/app/components/Pipeline/Marble.client.vue +41 -47
  189. package/layers/shader/app/components/Pipeline/MixBlend.client.vue +21 -27
  190. package/layers/shader/app/components/Pipeline/MonochromeTint.client.vue +16 -21
  191. package/layers/shader/app/components/Pipeline/MultiplyBlend.client.vue +15 -16
  192. package/layers/shader/app/components/Pipeline/NoisyGradient.client.vue +34 -40
  193. package/layers/shader/app/components/Pipeline/NoisyGradientBlend.client.vue +54 -60
  194. package/layers/shader/app/components/Pipeline/OverlayBlend.client.vue +15 -16
  195. package/layers/shader/app/components/Pipeline/PaperTexture.client.vue +22 -24
  196. package/layers/shader/app/components/Pipeline/Polygon.client.vue +32 -39
  197. package/layers/shader/app/components/Pipeline/Posterise.client.vue +8 -14
  198. package/layers/shader/app/components/Pipeline/RadialGradient.client.vue +18 -24
  199. package/layers/shader/app/components/Pipeline/RayAutoOrbit.client.vue +16 -18
  200. package/layers/shader/app/components/Pipeline/RayMouseOrbit.client.vue +16 -18
  201. package/layers/shader/app/components/Pipeline/RayRotateX.client.vue +8 -14
  202. package/layers/shader/app/components/Pipeline/RayRotateY.client.vue +8 -14
  203. package/layers/shader/app/components/Pipeline/RayRotateZ.client.vue +8 -14
  204. package/layers/shader/app/components/Pipeline/RayTiltBasis.client.vue +21 -22
  205. package/layers/shader/app/components/Pipeline/RaymarchTunnel.client.vue +34 -40
  206. package/layers/shader/app/components/Pipeline/Rectangle.client.vue +30 -36
  207. package/layers/shader/app/components/Pipeline/ReinhardTonemap.client.vue +0 -3
  208. package/layers/shader/app/components/Pipeline/RidgedNoise.client.vue +22 -22
  209. package/layers/shader/app/components/Pipeline/Ring.client.vue +26 -32
  210. package/layers/shader/app/components/Pipeline/RingField.client.vue +36 -33
  211. package/layers/shader/app/components/Pipeline/RisographGrain.client.vue +29 -35
  212. package/layers/shader/app/components/Pipeline/RotatedGradientBlend.client.vue +29 -35
  213. package/layers/shader/app/components/Pipeline/SDFColourMask.client.vue +15 -18
  214. package/layers/shader/app/components/Pipeline/SDFRadialMask.client.vue +16 -18
  215. package/layers/shader/app/components/Pipeline/SRGBToLinear.client.vue +8 -14
  216. package/layers/shader/app/components/Pipeline/Saturation.client.vue +8 -14
  217. package/layers/shader/app/components/Pipeline/Scanlines.client.vue +21 -22
  218. package/layers/shader/app/components/Pipeline/ScreenBlend.client.vue +15 -16
  219. package/layers/shader/app/components/Pipeline/ShaderDebugger.client.vue +28 -29
  220. package/layers/shader/app/components/Pipeline/SimplexNoise.client.vue +25 -32
  221. package/layers/shader/app/components/Pipeline/SkyAtmosphere.client.vue +37 -44
  222. package/layers/shader/app/components/Pipeline/SoftLightBlend.client.vue +15 -16
  223. package/layers/shader/app/components/Pipeline/SolidColour.client.vue +7 -16
  224. package/layers/shader/app/components/Pipeline/SplitTone.client.vue +27 -28
  225. package/layers/shader/app/components/Pipeline/Star.client.vue +31 -37
  226. package/layers/shader/app/components/Pipeline/Starfield.client.vue +29 -27
  227. package/layers/shader/app/components/Pipeline/Stripes.client.vue +28 -27
  228. package/layers/shader/app/components/Pipeline/SubtractBlend.client.vue +15 -16
  229. package/layers/shader/app/components/Pipeline/TanhTonemap.client.vue +8 -17
  230. package/layers/shader/app/components/Pipeline/Threshold.client.vue +8 -14
  231. package/layers/shader/app/components/Pipeline/Tint.client.vue +16 -18
  232. package/layers/shader/app/components/Pipeline/Triangle.client.vue +22 -22
  233. package/layers/shader/app/components/Pipeline/UVAspectCorrect.client.vue +0 -2
  234. package/layers/shader/app/components/Pipeline/UVBreath.client.vue +16 -18
  235. package/layers/shader/app/components/Pipeline/UVBulge.client.vue +16 -18
  236. package/layers/shader/app/components/Pipeline/UVClamp.client.vue +0 -3
  237. package/layers/shader/app/components/Pipeline/UVColumnOffset.client.vue +16 -18
  238. package/layers/shader/app/components/Pipeline/UVFlipX.client.vue +0 -3
  239. package/layers/shader/app/components/Pipeline/UVFlipXY.client.vue +0 -3
  240. package/layers/shader/app/components/Pipeline/UVFlipY.client.vue +0 -3
  241. package/layers/shader/app/components/Pipeline/UVFractBand.client.vue +16 -18
  242. package/layers/shader/app/components/Pipeline/UVMousePull.client.vue +8 -14
  243. package/layers/shader/app/components/Pipeline/UVNoiseRotate.client.vue +21 -27
  244. package/layers/shader/app/components/Pipeline/UVNoiseWarp.client.vue +21 -22
  245. package/layers/shader/app/components/Pipeline/UVOrbit.client.vue +8 -14
  246. package/layers/shader/app/components/Pipeline/UVParallax.client.vue +8 -18
  247. package/layers/shader/app/components/Pipeline/UVPixelate.client.vue +7 -14
  248. package/layers/shader/app/components/Pipeline/UVPulse.client.vue +16 -18
  249. package/layers/shader/app/components/Pipeline/UVRipple.client.vue +26 -26
  250. package/layers/shader/app/components/Pipeline/UVRotate.client.vue +16 -22
  251. package/layers/shader/app/components/Pipeline/UVScale.client.vue +16 -22
  252. package/layers/shader/app/components/Pipeline/UVScroll.client.vue +12 -18
  253. package/layers/shader/app/components/Pipeline/UVScrollX.client.vue +8 -14
  254. package/layers/shader/app/components/Pipeline/UVScrollY.client.vue +8 -14
  255. package/layers/shader/app/components/Pipeline/UVShear.client.vue +16 -18
  256. package/layers/shader/app/components/Pipeline/UVSineWarpXY.client.vue +18 -24
  257. package/layers/shader/app/components/Pipeline/UVSwapAxes.client.vue +0 -3
  258. package/layers/shader/app/components/Pipeline/UVTile.client.vue +12 -18
  259. package/layers/shader/app/components/Pipeline/UVTwirl.client.vue +16 -18
  260. package/layers/shader/app/components/Pipeline/UVWarp.client.vue +21 -22
  261. package/layers/shader/app/components/Pipeline/VHSBleed.client.vue +27 -28
  262. package/layers/shader/app/components/Pipeline/ValueNoise.client.vue +22 -22
  263. package/layers/shader/app/components/Pipeline/Vibrance.client.vue +11 -17
  264. package/layers/shader/app/components/Pipeline/Vignette.client.vue +14 -20
  265. package/layers/shader/app/components/Pipeline/VoronoiEdges.client.vue +29 -28
  266. package/layers/shader/app/components/Pipeline/Water.client.vue +31 -37
  267. package/layers/shader/app/components/Pipeline/WaveBendLayer.client.vue +26 -32
  268. package/layers/shader/app/components/Pipeline/WaveColourLayer.client.vue +37 -36
  269. package/layers/shader/app/components/Pipeline/WhiteBalance.client.vue +23 -26
  270. package/layers/shader/app/components/Pipeline/Wood.client.vue +34 -40
  271. package/layers/shader/app/components/Preset/Aurora.client.vue +0 -7
  272. package/layers/shader/app/components/Preset/Flow.client.vue +15 -23
  273. package/layers/shader/app/components/Preset/GradientMesh.client.vue +15 -23
  274. package/layers/shader/app/components/Preset/Nebula.client.vue +15 -25
  275. package/layers/shader/app/components/Preset/Ocean.client.vue +15 -24
  276. package/layers/shader/app/components/Preset/ThemeAurora.client.vue +38 -47
  277. package/layers/shader/app/components/Preset/ThemeBubble.client.vue +38 -47
  278. package/layers/shader/app/components/Preset/ThemeFlow.client.vue +38 -47
  279. package/layers/shader/app/components/Preset/ThemeGradient.client.vue +38 -47
  280. package/layers/shader/app/components/Preset/ThemeLavaLamp.client.vue +38 -47
  281. package/layers/shader/app/components/Preset/ThemePlasma.client.vue +38 -47
  282. package/layers/shader/app/components/Preset/ThemeWave.client.vue +38 -47
  283. package/layers/shader/app/components/Shader/Background.client.vue +110 -76
  284. package/layers/shader/app/components/Shader/Debug.vue +4 -14
  285. package/layers/shader/app/components/Shader/Host.client.vue +7 -9
  286. package/layers/shader/app/components/Shader/Material.client.vue +8 -20
  287. package/layers/shader/app/components/Shader/Pipeline.client.vue +0 -6
  288. package/layers/shader/app/components/Shader/Runtime.client.vue +0 -5
  289. package/layers/shader/app/composables/useAmbientMaterials.ts +4 -9
  290. package/layers/shader/app/composables/useCSSColourUniform.ts +0 -4
  291. package/layers/shader/app/composables/useCSSFloatUniform.ts +0 -3
  292. package/layers/shader/app/composables/useShader.ts +1 -4
  293. package/layers/shader/app/composables/useShaderColor.ts +4 -6
  294. package/layers/shader/app/composables/useShaderFloat.ts +1 -3
  295. package/layers/shader/app/composables/useShaderGraph.ts +4 -5
  296. package/layers/shader/app/composables/useShaderRuntime.ts +0 -5
  297. package/layers/shader/app/composables/useShaderVec2.ts +4 -8
  298. package/layers/shader/app/composables/useSunDirectionUniform.ts +0 -6
  299. package/layers/shader/app/composables/useThemeColors.ts +0 -1
  300. package/layers/shader/app/composables/useUniforms.ts +25 -9
  301. package/layers/shader/app/plugins/shader.client.ts +4 -3
  302. package/layers/shader/app/shaders/common/blend.ts +2 -4
  303. package/layers/shader/app/shaders/common/complex.ts +0 -2
  304. package/layers/shader/app/shaders/common/effects.ts +5 -13
  305. package/layers/shader/app/shaders/common/grain.ts +2 -7
  306. package/layers/shader/app/shaders/common/lighting.ts +0 -3
  307. package/layers/shader/app/shaders/common/math.ts +12 -8
  308. package/layers/shader/app/shaders/common/noise.ts +48 -48
  309. package/layers/shader/app/shaders/common/noiseHelpers.ts +6 -6
  310. package/layers/shader/app/shaders/common/palette.ts +10 -11
  311. package/layers/shader/app/shaders/common/patterns.ts +1 -4
  312. package/layers/shader/app/shaders/common/sdf.ts +11 -7
  313. package/layers/shader/app/shaders/common/shapes.ts +25 -15
  314. package/layers/shader/app/shaders/common/tonemapping.ts +0 -2
  315. package/layers/shader/app/shaders/common/uv.ts +20 -29
  316. package/layers/shader/app/shaders/createMaterial.ts +2 -5
  317. package/layers/shader/app/shaders/layers/aurora.ts +14 -17
  318. package/layers/shader/app/shaders/layers/meshGradient.ts +13 -16
  319. package/layers/shader/app/shaders/layers/paperShading.ts +15 -19
  320. package/layers/shader/app/shaders/layers/shaderGradient.ts +18 -23
  321. package/layers/shader/app/shaders/layers/stripe.ts +14 -17
  322. package/layers/shader/app/shaders/types.ts +9 -1
  323. package/layers/shader/app/types/app-config.d.ts +1 -1
  324. package/layers/shader/app/types/tsl.ts +0 -1
  325. package/layers/shader/app/types/uniforms.ts +0 -1
  326. package/layers/shader/app/utils/tsl/animation.ts +50 -52
  327. package/layers/shader/app/utils/tsl/color.ts +20 -19
  328. package/layers/shader/app/utils/tsl/noise.ts +10 -12
  329. package/layers/shader/app/utils/tsl/oklch.ts +6 -7
  330. package/layers/shader/app/utils/tsl/patterns.ts +4 -6
  331. package/layers/shader/app/utils/tsl/tween.ts +2 -4
  332. package/layers/shader/app/utils/tsl/uv.ts +6 -6
  333. package/layers/theme/app/components/ThemePicker/AccentButton.vue +1 -3
  334. package/layers/theme/app/components/ThemePicker/Colors.vue +0 -1
  335. package/layers/theme/app/composables/useAccentColor.ts +0 -1
  336. package/layers/theme/app/plugins/theme.client.ts +4 -3
  337. package/layers/theme/app/types/app-config.d.ts +1 -2
  338. package/layers/transitions/app/components/Motion/Transition.vue +15 -22
  339. package/layers/typography/app/components/Typography/CodeBlock.vue +16 -19
  340. package/layers/typography/app/components/Typography/Headline.vue +46 -49
  341. package/layers/typography/app/components/Typography/HeadlineScreen.vue +36 -40
  342. package/layers/typography/app/components/Typography/QuoteBlock.vue +3 -4
  343. package/layers/typography/app/components/Typography/TextStroke.vue +15 -20
  344. package/layers/typography/app/components/Typography/index.vue +0 -4
  345. package/layers/typography/app/composables/typography.ts +9 -11
  346. package/layers/visual/app/app.config.ts +1 -2
  347. package/layers/visual/app/components/Accent/Blob.vue +0 -3
  348. package/layers/visual/app/components/Accent/Scene.vue +12 -17
  349. package/layers/visual/app/components/Base/Modal.vue +0 -1
  350. package/layers/visual/app/components/Gradient/Background.vue +10 -13
  351. package/layers/visual/app/components/Gradient/Text.vue +10 -13
  352. package/layers/visual/app/components/Media/Picture.vue +0 -1
  353. package/layers/visual/app/components/Progress/Bar.vue +0 -1
  354. package/layers/visual/app/components/Progress/Circular.vue +0 -1
  355. package/layers/visual/app/components/Tint/Overlay.vue +0 -2
  356. package/layers/visual/app/composables/gradient.ts +6 -11
  357. package/layers/visual/app/composables/picture.ts +0 -1
  358. package/layers/visual/app/composables/tint.ts +0 -1
  359. package/layers/visual/app/types/media.ts +0 -1
  360. package/package.json +7 -5
@@ -1,85 +1,78 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { Color, Vector3 } from 'three'
7
3
  import { float, mix, smoothstep, time, uniform, vec4 } from 'three/tsl'
8
4
 
9
5
  import { fbm2D } from '../../shaders/common/noise'
10
6
 
11
- const props = withDefaults(
12
- defineProps<{
13
- /** Sky colour */
14
- colorSky?: string
15
- /** Cloud colour */
16
- colorCloud?: string
17
- /** FBM noise input scale */
18
- scale?: number
19
- /** Cloud coverage: lower = fewer clouds, higher = overcast */
20
- coverage?: number
21
- /** Cloud softness */
22
- softness?: number
23
- /** Wind speed */
24
- speed?: number
25
- order?: number
26
- }>(),
27
- {
28
- colorSky: '#5588cc',
29
- colorCloud: '#ffffff',
30
- scale: 2,
31
- coverage: 0.5,
32
- softness: 0.15,
33
- speed: 0.05,
34
- order: 0,
35
- }
36
- )
7
+ const {
8
+ colorSky = '#5588cc',
9
+ colorCloud = '#ffffff',
10
+ scale = 2,
11
+ coverage = 0.5,
12
+ softness = 0.15,
13
+ speed = 0.05,
14
+ order = 0,
15
+ } = defineProps<{
16
+ /** Sky colour */
17
+ colorSky?: string
18
+ /** Cloud colour */
19
+ colorCloud?: string
20
+ /** FBM noise input scale */
21
+ scale?: number
22
+ /** Cloud coverage: lower = fewer clouds, higher = overcast */
23
+ coverage?: number
24
+ /** Cloud softness */
25
+ softness?: number
26
+ /** Wind speed */
27
+ speed?: number
28
+ order?: number
29
+ }>()
37
30
 
38
31
  function toVec3Node(hex: string) {
39
32
  const c = new Color(hex)
40
33
  return uniform(new Vector3(c.r, c.g, c.b))
41
34
  }
42
35
 
43
- const colorSkyNode = toVec3Node(props.colorSky)
44
- const colorCloudNode = toVec3Node(props.colorCloud)
45
- const scaleNode = uniform(props.scale)
46
- const coverageNode = uniform(props.coverage)
47
- const softnessNode = uniform(props.softness)
48
- const speedNode = uniform(props.speed)
36
+ const colorSkyNode = toVec3Node(colorSky)
37
+ const colorCloudNode = toVec3Node(colorCloud)
38
+ const scaleNode = uniform(scale)
39
+ const coverageNode = uniform(coverage)
40
+ const softnessNode = uniform(softness)
41
+ const speedNode = uniform(speed)
49
42
  watch(
50
- () => props.colorSky,
43
+ () => colorSky,
51
44
  (v) => {
52
45
  const c = new Color(v)
53
46
  colorSkyNode.value.set(c.r, c.g, c.b)
54
47
  }
55
48
  )
56
49
  watch(
57
- () => props.colorCloud,
50
+ () => colorCloud,
58
51
  (v) => {
59
52
  const c = new Color(v)
60
53
  colorCloudNode.value.set(c.r, c.g, c.b)
61
54
  }
62
55
  )
63
56
  watch(
64
- () => props.scale,
57
+ () => scale,
65
58
  (v) => {
66
59
  scaleNode.value = v
67
60
  }
68
61
  )
69
62
  watch(
70
- () => props.coverage,
63
+ () => coverage,
71
64
  (v) => {
72
65
  coverageNode.value = v
73
66
  }
74
67
  )
75
68
  watch(
76
- () => props.softness,
69
+ () => softness,
77
70
  (v) => {
78
71
  softnessNode.value = v
79
72
  }
80
73
  )
81
74
  watch(
82
- () => props.speed,
75
+ () => speed,
83
76
  (v) => {
84
77
  speedNode.value = v
85
78
  }
@@ -94,5 +87,5 @@
94
87
  // Remap to cloud mask using coverage + softness
95
88
  const cloud = smoothstep(coverageNode.sub(softnessNode), coverageNode.add(softnessNode), n)
96
89
  return vec4(mix(colorSkyNode, colorCloudNode, cloud), float(1))
97
- }, props.order)
90
+ }, order)
98
91
  </script>
@@ -1,32 +1,30 @@
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 } from 'three'
7
3
  import { mix, uniform, vec4 } from 'three/tsl'
8
4
 
9
5
  import { blendColorBurn } from '../../shaders/common/blend'
6
+ import type { TSLNode } from '../../shaders/types'
10
7
 
11
- const props = withDefaults(
12
- defineProps<{
13
- color?: string
14
- opacity?: number
15
- order?: number
16
- }>(),
17
- { color: '#808080', opacity: 1, order: 0 }
18
- )
8
+ const {
9
+ color = '#808080',
10
+ opacity = 1,
11
+ order = 0,
12
+ } = defineProps<{
13
+ color?: string
14
+ opacity?: number
15
+ order?: number
16
+ }>()
19
17
 
20
- const colorNode = uniform(new Color(props.color))
21
- const opacityNode = uniform(props.opacity)
18
+ const colorNode: TSLNode = uniform(new Color(color))
19
+ const opacityNode = uniform(opacity)
22
20
  watch(
23
- () => props.color,
21
+ () => color,
24
22
  (v) => {
25
23
  colorNode.value.set(v)
26
24
  }
27
25
  )
28
26
  watch(
29
- () => props.opacity,
27
+ () => opacity,
30
28
  (v) => {
31
29
  opacityNode.value = v
32
30
  }
@@ -34,6 +32,6 @@
34
32
 
35
33
  useShaderStage(
36
34
  (prev) => vec4(mix(prev.xyz, blendColorBurn(prev.xyz, colorNode), opacityNode), prev.w),
37
- props.order
35
+ order
38
36
  )
39
37
  </script>
@@ -1,32 +1,30 @@
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 } from 'three'
7
3
  import { mix, uniform, vec4 } from 'three/tsl'
8
4
 
9
5
  import { blendColorDodge } from '../../shaders/common/blend'
6
+ import type { TSLNode } from '../../shaders/types'
10
7
 
11
- const props = withDefaults(
12
- defineProps<{
13
- color?: string
14
- opacity?: number
15
- order?: number
16
- }>(),
17
- { color: '#808080', opacity: 1, order: 0 }
18
- )
8
+ const {
9
+ color = '#808080',
10
+ opacity = 1,
11
+ order = 0,
12
+ } = defineProps<{
13
+ color?: string
14
+ opacity?: number
15
+ order?: number
16
+ }>()
19
17
 
20
- const colorNode = uniform(new Color(props.color))
21
- const opacityNode = uniform(props.opacity)
18
+ const colorNode: TSLNode = uniform(new Color(color))
19
+ const opacityNode = uniform(opacity)
22
20
  watch(
23
- () => props.color,
21
+ () => color,
24
22
  (v) => {
25
23
  colorNode.value.set(v)
26
24
  }
27
25
  )
28
26
  watch(
29
- () => props.opacity,
27
+ () => opacity,
30
28
  (v) => {
31
29
  opacityNode.value = v
32
30
  }
@@ -34,6 +32,6 @@
34
32
 
35
33
  useShaderStage(
36
34
  (prev) => vec4(mix(prev.xyz, blendColorDodge(prev.xyz, colorNode), opacityNode), prev.w),
37
- props.order
35
+ order
38
36
  )
39
37
  </script>
@@ -1,8 +1,4 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { Color, Vector3 } from 'three'
7
3
  import { float, mix, smoothstep, uniform, vec4 } from 'three/tsl'
8
4
 
@@ -12,66 +8,63 @@
12
8
  * Maps input luminance to a three-stop colour ramp: shadow → midtone → highlight.
13
9
  * For a simple two-stop ramp use DuoTone instead.
14
10
  */
15
- const props = withDefaults(
16
- defineProps<{
17
- shadowColor?: string
18
- midtoneColor?: string
19
- highlightColor?: string
20
- /** Luminance threshold between shadow and midtone */
21
- shadowPoint?: number
22
- /** Luminance threshold between midtone and highlight */
23
- highlightPoint?: number
24
- order?: number
25
- }>(),
26
- {
27
- shadowColor: '#000033',
28
- midtoneColor: '#660066',
29
- highlightColor: '#ffcc88',
30
- shadowPoint: 0.33,
31
- highlightPoint: 0.67,
32
- order: 0,
33
- }
34
- )
11
+ const {
12
+ shadowColor = '#000033',
13
+ midtoneColor = '#660066',
14
+ highlightColor = '#ffcc88',
15
+ shadowPoint = 0.33,
16
+ highlightPoint = 0.67,
17
+ order = 0,
18
+ } = defineProps<{
19
+ shadowColor?: string
20
+ midtoneColor?: string
21
+ highlightColor?: string
22
+ /** Luminance threshold between shadow and midtone */
23
+ shadowPoint?: number
24
+ /** Luminance threshold between midtone and highlight */
25
+ highlightPoint?: 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 shadowNode = toVec3Node(props.shadowColor)
42
- const midNode = toVec3Node(props.midtoneColor)
43
- const highlightNode = toVec3Node(props.highlightColor)
44
- const shadowPtNode = uniform(props.shadowPoint)
45
- const highlightPtNode = uniform(props.highlightPoint)
34
+ const shadowNode = toVec3Node(shadowColor)
35
+ const midNode = toVec3Node(midtoneColor)
36
+ const highlightNode = toVec3Node(highlightColor)
37
+ const shadowPtNode = uniform(shadowPoint)
38
+ const highlightPtNode = uniform(highlightPoint)
46
39
  watch(
47
- () => props.shadowColor,
40
+ () => shadowColor,
48
41
  (v) => {
49
42
  const c = new Color(v)
50
43
  shadowNode.value.set(c.r, c.g, c.b)
51
44
  }
52
45
  )
53
46
  watch(
54
- () => props.midtoneColor,
47
+ () => midtoneColor,
55
48
  (v) => {
56
49
  const c = new Color(v)
57
50
  midNode.value.set(c.r, c.g, c.b)
58
51
  }
59
52
  )
60
53
  watch(
61
- () => props.highlightColor,
54
+ () => highlightColor,
62
55
  (v) => {
63
56
  const c = new Color(v)
64
57
  highlightNode.value.set(c.r, c.g, c.b)
65
58
  }
66
59
  )
67
60
  watch(
68
- () => props.shadowPoint,
61
+ () => shadowPoint,
69
62
  (v) => {
70
63
  shadowPtNode.value = v
71
64
  }
72
65
  )
73
66
  watch(
74
- () => props.highlightPoint,
67
+ () => highlightPoint,
75
68
  (v) => {
76
69
  highlightPtNode.value = v
77
70
  }
@@ -83,5 +76,5 @@
83
76
  const t2 = smoothstep(shadowPtNode, highlightPtNode, lum)
84
77
  const colour = mix(mix(shadowNode, midNode, t1), mix(midNode, highlightNode, t2), t2)
85
78
  return vec4(colour, prev.w)
86
- }, props.order)
79
+ }, order)
87
80
  </script>
@@ -1,8 +1,4 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { cos, float, sin, time, uniform, vec2, vec4 } from 'three/tsl'
7
3
 
8
4
  import { complexDiv, complexLog } from '../../shaders/common/complex'
@@ -14,61 +10,58 @@
14
10
  * and extracts the imaginary component (winding angle) as a scalar float.
15
11
  * Outputs grayscale for CosinePalette (scalarSource: 'prev').
16
12
  */
17
- const props = withDefaults(
18
- defineProps<{
19
- /** Angle between the two poles in radians */
20
- poleAngle?: number
21
- /** Distance of poles from origin */
22
- poleDistance?: number
23
- /** Weight of the imaginary (winding) component */
24
- imaginaryWeight?: number
25
- /** Weight of the radial (exp) component */
26
- radialWeight?: number
27
- /** Animation speed */
28
- speed?: number
29
- order?: number
30
- }>(),
31
- {
32
- poleAngle: Math.PI / 3,
33
- poleDistance: 0.4,
34
- imaginaryWeight: 0.6,
35
- radialWeight: 0.4,
36
- speed: 0.05,
37
- order: 0,
38
- }
39
- )
13
+ const {
14
+ poleAngle = Math.PI / 3,
15
+ poleDistance = 0.4,
16
+ imaginaryWeight = 0.6,
17
+ radialWeight = 0.4,
18
+ speed = 0.05,
19
+ order = 0,
20
+ } = defineProps<{
21
+ /** Angle between the two poles in radians */
22
+ poleAngle?: number
23
+ /** Distance of poles from origin */
24
+ poleDistance?: number
25
+ /** Weight of the imaginary (winding) component */
26
+ imaginaryWeight?: number
27
+ /** Weight of the radial (exp) component */
28
+ radialWeight?: number
29
+ /** Animation speed */
30
+ speed?: number
31
+ order?: number
32
+ }>()
40
33
 
41
- const poleAngleNode = uniform(props.poleAngle)
42
- const poleDistNode = uniform(props.poleDistance)
43
- const imagWeightNode = uniform(props.imaginaryWeight)
44
- const radWeightNode = uniform(props.radialWeight)
45
- const speedNode = uniform(props.speed)
34
+ const poleAngleNode = uniform(poleAngle)
35
+ const poleDistNode = uniform(poleDistance)
36
+ const imagWeightNode = uniform(imaginaryWeight)
37
+ const radWeightNode = uniform(radialWeight)
38
+ const speedNode = uniform(speed)
46
39
  watch(
47
- () => props.poleAngle,
40
+ () => poleAngle,
48
41
  (v) => {
49
42
  poleAngleNode.value = v
50
43
  }
51
44
  )
52
45
  watch(
53
- () => props.poleDistance,
46
+ () => poleDistance,
54
47
  (v) => {
55
48
  poleDistNode.value = v
56
49
  }
57
50
  )
58
51
  watch(
59
- () => props.imaginaryWeight,
52
+ () => imaginaryWeight,
60
53
  (v) => {
61
54
  imagWeightNode.value = v
62
55
  }
63
56
  )
64
57
  watch(
65
- () => props.radialWeight,
58
+ () => radialWeight,
66
59
  (v) => {
67
60
  radWeightNode.value = v
68
61
  }
69
62
  )
70
63
  watch(
71
- () => props.speed,
64
+ () => speed,
72
65
  (v) => {
73
66
  speedNode.value = v
74
67
  }
@@ -103,5 +96,5 @@
103
96
  const scalar = imagPart.add(radPart).mul(0.5).add(0.5)
104
97
 
105
98
  return vec4(scalar, scalar, scalar, float(1))
106
- }, props.order)
99
+ }, order)
107
100
  </script>
@@ -1,46 +1,44 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { Color, Vector3 } from 'three'
7
3
  import { float, mix, uniform, vec4 } from 'three/tsl'
8
4
 
9
- const props = withDefaults(
10
- defineProps<{
11
- colorA?: string
12
- colorB?: string
13
- /** Rotation offset in degrees */
14
- rotation?: number
15
- order?: number
16
- }>(),
17
- { colorA: '#000000', colorB: '#ffffff', rotation: 0, order: 0 }
18
- )
5
+ const {
6
+ colorA = '#000000',
7
+ colorB = '#ffffff',
8
+ rotation = 0,
9
+ order = 0,
10
+ } = defineProps<{
11
+ colorA?: string
12
+ colorB?: string
13
+ /** Rotation offset in degrees */
14
+ rotation?: number
15
+ order?: number
16
+ }>()
19
17
 
20
18
  function toVec3Node(hex: string) {
21
19
  const c = new Color(hex)
22
20
  return uniform(new Vector3(c.r, c.g, c.b))
23
21
  }
24
22
 
25
- const colorANode = toVec3Node(props.colorA)
26
- const colorBNode = toVec3Node(props.colorB)
27
- const rotationNode = uniform((props.rotation * Math.PI) / 180)
23
+ const colorANode = toVec3Node(colorA)
24
+ const colorBNode = toVec3Node(colorB)
25
+ const rotationNode = uniform((rotation * Math.PI) / 180)
28
26
  watch(
29
- () => props.colorA,
27
+ () => colorA,
30
28
  (v) => {
31
29
  const c = new Color(v)
32
30
  colorANode.value.set(c.r, c.g, c.b)
33
31
  }
34
32
  )
35
33
  watch(
36
- () => props.colorB,
34
+ () => colorB,
37
35
  (v) => {
38
36
  const c = new Color(v)
39
37
  colorBNode.value.set(c.r, c.g, c.b)
40
38
  }
41
39
  )
42
40
  watch(
43
- () => props.rotation,
41
+ () => rotation,
44
42
  (v) => {
45
43
  rotationNode.value = (v * Math.PI) / 180
46
44
  }
@@ -54,5 +52,5 @@
54
52
  const angle = centered.y.atan(centered.x).add(rotationNode)
55
53
  const t = angle.div(Math.PI * 2).fract()
56
54
  return vec4(mix(colorANode, colorBNode, t), float(1))
57
- }, props.order)
55
+ }, order)
58
56
  </script>
@@ -1,8 +1,4 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { Vector3 } from 'three'
7
3
  import { time, uniform, vec4 } from 'three/tsl'
8
4
 
@@ -14,69 +10,66 @@
14
10
  * Formula: a + b * cos(2π * (c*t + d))
15
11
  * Scalar input t comes from uvNode via scalarSource.
16
12
  */
17
- const props = withDefaults(
18
- defineProps<{
19
- /** Colour offset (brightness centre) */
20
- a?: [number, number, number]
21
- /** Colour amplitude (contrast) */
22
- b?: [number, number, number]
23
- /** Frequency per channel */
24
- c?: [number, number, number]
25
- /** Phase offset per channel (colour shift) */
26
- d?: [number, number, number]
27
- /** How fast the palette cycles over time */
28
- timeScale?: number
29
- /**
30
- * What value to feed as the scalar input `t`.
31
- * `'prev'` reads luminance of the previous pipeline stage — use after RingField,
32
- * ChebyshevNoiseField, or any block that outputs a grayscale scalar as its colour.
33
- */
34
- scalarSource?: 'uv.y' | 'uv.x' | 'length' | 'time' | 'prev'
35
- order?: number
36
- }>(),
37
- {
38
- a: () => [0.5, 0.5, 0.5],
39
- b: () => [0.5, 0.5, 0.5],
40
- c: () => [1.0, 1.0, 1.0],
41
- d: () => [0.0, 0.33, 0.67],
42
- timeScale: 0.1,
43
- scalarSource: 'uv.y',
44
- order: 0,
45
- }
46
- )
13
+ const {
14
+ a = [0.5, 0.5, 0.5],
15
+ b = [0.5, 0.5, 0.5],
16
+ c = [1.0, 1.0, 1.0],
17
+ d = [0.0, 0.33, 0.67],
18
+ timeScale = 0.1,
19
+ scalarSource = 'uv.y',
20
+ order = 0,
21
+ } = defineProps<{
22
+ /** Colour offset (brightness centre) */
23
+ a?: [number, number, number]
24
+ /** Colour amplitude (contrast) */
25
+ b?: [number, number, number]
26
+ /** Frequency per channel */
27
+ c?: [number, number, number]
28
+ /** Phase offset per channel (colour shift) */
29
+ d?: [number, number, number]
30
+ /** How fast the palette cycles over time */
31
+ timeScale?: number
32
+ /**
33
+ * What value to feed as the scalar input `t`.
34
+ * `'prev'` reads luminance of the previous pipeline stage — use after RingField,
35
+ * ChebyshevNoiseField, or any block that outputs a grayscale scalar as its colour.
36
+ */
37
+ scalarSource?: 'uv.y' | 'uv.x' | 'length' | 'time' | 'prev'
38
+ order?: number
39
+ }>()
47
40
 
48
- const aNode = uniform(new Vector3(...props.a))
49
- const bNode = uniform(new Vector3(...props.b))
50
- const cNode = uniform(new Vector3(...props.c))
51
- const dNode = uniform(new Vector3(...props.d))
52
- const timeScaleNode = uniform(props.timeScale)
41
+ const aNode = uniform(new Vector3(...a))
42
+ const bNode = uniform(new Vector3(...b))
43
+ const cNode = uniform(new Vector3(...c))
44
+ const dNode = uniform(new Vector3(...d))
45
+ const timeScaleNode = uniform(timeScale)
53
46
 
54
47
  watch(
55
- () => props.a,
48
+ () => a,
56
49
  (v) => {
57
50
  aNode.value.set(...v)
58
51
  }
59
52
  )
60
53
  watch(
61
- () => props.b,
54
+ () => b,
62
55
  (v) => {
63
56
  bNode.value.set(...v)
64
57
  }
65
58
  )
66
59
  watch(
67
- () => props.c,
60
+ () => c,
68
61
  (v) => {
69
62
  cNode.value.set(...v)
70
63
  }
71
64
  )
72
65
  watch(
73
- () => props.d,
66
+ () => d,
74
67
  (v) => {
75
68
  dNode.value.set(...v)
76
69
  }
77
70
  )
78
71
  watch(
79
- () => props.timeScale,
72
+ () => timeScale,
80
73
  (v) => {
81
74
  timeScaleNode.value = v
82
75
  }
@@ -86,13 +79,13 @@
86
79
 
87
80
  useShaderStage((prev) => {
88
81
  let scalar
89
- if (props.scalarSource === 'uv.x') scalar = uvNode.value.x
90
- else if (props.scalarSource === 'length') scalar = uvNode.value.sub(0.5).length()
91
- else if (props.scalarSource === 'time') scalar = time
92
- else if (props.scalarSource === 'prev') scalar = luminance(prev.xyz)
82
+ if (scalarSource === 'uv.x') scalar = uvNode.value.x
83
+ else if (scalarSource === 'length') scalar = uvNode.value.sub(0.5).length()
84
+ else if (scalarSource === 'time') scalar = time
85
+ else if (scalarSource === 'prev') scalar = luminance(prev.xyz)
93
86
  else scalar = uvNode.value.y
94
87
 
95
88
  const t = scalar.add(time.mul(timeScaleNode))
96
89
  return vec4(cosinePalette(t, aNode, bNode, cNode, dNode), 1.0)
97
- }, props.order)
90
+ }, order)
98
91
  </script>
@@ -1,8 +1,4 @@
1
- <!-- eslint-disable @typescript-eslint/no-unused-vars -->
2
- <!-- eslint-disable vue/define-props-destructuring -->
3
- <!-- eslint-disable @typescript-eslint/ban-ts-comment -->
4
1
  <script setup lang="ts">
5
- // @ts-nocheck
6
2
  import { vec4 } from 'three/tsl'
7
3
 
8
4
  /**