diff --git a/packages/shaders-react/src/index.ts b/packages/shaders-react/src/index.ts index 751425a..8b49e54 100644 --- a/packages/shaders-react/src/index.ts +++ b/packages/shaders-react/src/index.ts @@ -33,7 +33,7 @@ export { type DotsOrbitProps } from './shaders/dots-orbit'; export { type DotsOrbitParams } from './shaders/dots-orbit'; export { type DotsOrbitUniforms } from '@paper-design/shaders'; -// Static grid made of dots (or other shapes) +// Static grid made of dots export { DotsGrid, dotsGridPresets } from './shaders/dots-grid'; export { type DotsGridProps } from './shaders/dots-grid'; export { type DotsGridParams } from './shaders/dots-grid'; diff --git a/packages/shaders/src/shaders/dots-grid.ts b/packages/shaders/src/shaders/dots-grid.ts index 91707fd..e87058b 100644 --- a/packages/shaders/src/shaders/dots-grid.ts +++ b/packages/shaders/src/shaders/dots-grid.ts @@ -11,12 +11,19 @@ export type DotsGridUniforms = { }; /** - * Dots Pattern + * Dots Grid Pattern * * Uniforms include: + * u_colorBack: Background color + * u_colorFill: Dots fill color + * u_colorStroke: Dots stroke color * u_dotSize: The base dot radius, px + * u_strokeWidth: The stroke (to be subtracted from u_dotSize), px * u_gridSpacingX: Horizontal grid spacing, px * u_gridSpacingY: Vertical grid spacing, px + * u_sizeRange: Variety of dot size, 0..1 + * u_opacityRange: Variety of dot opacity to be applied equally to fill and stroke, 0..1 + * */ export const dotsGridFragmentShader = `#version 300 es