shaders-oneshot 0.0.81-shared.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +7 -0
- package/dist/empty-pixel.d.ts +1 -0
- package/dist/empty-pixel.js +10 -0
- package/dist/empty-pixel.js.map +7 -0
- package/dist/get-shader-color-from-string.d.ts +3 -0
- package/dist/get-shader-color-from-string.js +101 -0
- package/dist/get-shader-color-from-string.js.map +7 -0
- package/dist/get-shader-color-from-string.test.d.ts +1 -0
- package/dist/get-shader-color-from-string.test.js +69 -0
- package/dist/get-shader-noise-texture.d.ts +1 -0
- package/dist/get-shader-noise-texture.js +18 -0
- package/dist/get-shader-noise-texture.js.map +7 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +194 -0
- package/dist/index.js.map +7 -0
- package/dist/shader-color-spaces.d.ts +6 -0
- package/dist/shader-color-spaces.js +96 -0
- package/dist/shader-color-spaces.js.map +7 -0
- package/dist/shader-mount.d.ts +199 -0
- package/dist/shader-mount.js +735 -0
- package/dist/shader-mount.js.map +7 -0
- package/dist/shader-sizing.d.ts +30 -0
- package/dist/shader-sizing.js +38 -0
- package/dist/shader-sizing.js.map +7 -0
- package/dist/shader-utils.d.ts +10 -0
- package/dist/shader-utils.js +131 -0
- package/dist/shader-utils.js.map +7 -0
- package/dist/shaders/color-panels.d.ts +70 -0
- package/dist/shaders/color-panels.js +224 -0
- package/dist/shaders/color-panels.js.map +7 -0
- package/dist/shaders/dithering.d.ts +62 -0
- package/dist/shaders/dithering.js +271 -0
- package/dist/shaders/dithering.js.map +7 -0
- package/dist/shaders/dot-grid.d.ts +65 -0
- package/dist/shaders/dot-grid.js +110 -0
- package/dist/shaders/dot-grid.js.map +7 -0
- package/dist/shaders/dot-orbit.d.ts +57 -0
- package/dist/shaders/dot-orbit.js +123 -0
- package/dist/shaders/dot-orbit.js.map +7 -0
- package/dist/shaders/fluted-glass.d.ts +112 -0
- package/dist/shaders/fluted-glass.js +361 -0
- package/dist/shaders/fluted-glass.js.map +7 -0
- package/dist/shaders/gem-smoke.d.ts +96 -0
- package/dist/shaders/gem-smoke.js +573 -0
- package/dist/shaders/gem-smoke.js.map +7 -0
- package/dist/shaders/god-rays.d.ts +67 -0
- package/dist/shaders/god-rays.js +133 -0
- package/dist/shaders/god-rays.js.map +7 -0
- package/dist/shaders/grain-gradient.d.ts +80 -0
- package/dist/shaders/grain-gradient.js +301 -0
- package/dist/shaders/grain-gradient.js.map +7 -0
- package/dist/shaders/halftone-cmyk.d.ts +104 -0
- package/dist/shaders/halftone-cmyk.js +295 -0
- package/dist/shaders/halftone-cmyk.js.map +7 -0
- package/dist/shaders/halftone-dots.d.ts +80 -0
- package/dist/shaders/halftone-dots.js +321 -0
- package/dist/shaders/halftone-dots.js.map +7 -0
- package/dist/shaders/heatmap.d.ts +66 -0
- package/dist/shaders/heatmap.js +384 -0
- package/dist/shaders/heatmap.js.map +7 -0
- package/dist/shaders/image-dithering.d.ts +64 -0
- package/dist/shaders/image-dithering.js +199 -0
- package/dist/shaders/image-dithering.js.map +7 -0
- package/dist/shaders/lens-distortion.d.ts +97 -0
- package/dist/shaders/lens-distortion.js +276 -0
- package/dist/shaders/lens-distortion.js.map +7 -0
- package/dist/shaders/liquid-metal.d.ts +89 -0
- package/dist/shaders/liquid-metal.js +633 -0
- package/dist/shaders/liquid-metal.js.map +7 -0
- package/dist/shaders/mesh-gradient.d.ts +52 -0
- package/dist/shaders/mesh-gradient.js +131 -0
- package/dist/shaders/mesh-gradient.js.map +7 -0
- package/dist/shaders/metaballs.d.ts +51 -0
- package/dist/shaders/metaballs.js +111 -0
- package/dist/shaders/metaballs.js.map +7 -0
- package/dist/shaders/neuro-noise.d.ts +47 -0
- package/dist/shaders/neuro-noise.js +77 -0
- package/dist/shaders/neuro-noise.js.map +7 -0
- package/dist/shaders/paper-texture.d.ts +109 -0
- package/dist/shaders/paper-texture.js +527 -0
- package/dist/shaders/paper-texture.js.map +7 -0
- package/dist/shaders/perlin-noise.d.ts +52 -0
- package/dist/shaders/perlin-noise.js +167 -0
- package/dist/shaders/perlin-noise.js.map +7 -0
- package/dist/shaders/pulsing-border.d.ts +98 -0
- package/dist/shaders/pulsing-border.js +239 -0
- package/dist/shaders/pulsing-border.js.map +7 -0
- package/dist/shaders/simplex-noise.d.ts +45 -0
- package/dist/shaders/simplex-noise.js +92 -0
- package/dist/shaders/simplex-noise.js.map +7 -0
- package/dist/shaders/smoke-ring.d.ts +61 -0
- package/dist/shaders/smoke-ring.js +133 -0
- package/dist/shaders/smoke-ring.js.map +7 -0
- package/dist/shaders/spiral.d.ts +61 -0
- package/dist/shaders/spiral.js +83 -0
- package/dist/shaders/spiral.js.map +7 -0
- package/dist/shaders/static-mesh-gradient.d.ts +63 -0
- package/dist/shaders/static-mesh-gradient.js +131 -0
- package/dist/shaders/static-mesh-gradient.js.map +7 -0
- package/dist/shaders/static-radial-gradient.d.ts +72 -0
- package/dist/shaders/static-radial-gradient.js +188 -0
- package/dist/shaders/static-radial-gradient.js.map +7 -0
- package/dist/shaders/swirl.d.ts +63 -0
- package/dist/shaders/swirl.js +104 -0
- package/dist/shaders/swirl.js.map +7 -0
- package/dist/shaders/voronoi.d.ts +65 -0
- package/dist/shaders/voronoi.js +139 -0
- package/dist/shaders/voronoi.js.map +7 -0
- package/dist/shaders/warp.d.ts +70 -0
- package/dist/shaders/warp.js +130 -0
- package/dist/shaders/warp.js.map +7 -0
- package/dist/shaders/water.d.ts +59 -0
- package/dist/shaders/water.js +122 -0
- package/dist/shaders/water.js.map +7 -0
- package/dist/shaders/waves.d.ts +53 -0
- package/dist/shaders/waves.js +66 -0
- package/dist/shaders/waves.js.map +7 -0
- package/dist/shared-webgl-renderer.d.ts +63 -0
- package/dist/shared-webgl-renderer.js +262 -0
- package/dist/shared-webgl-renderer.js.map +7 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +7 -0
- package/dist/vertex-shader.d.ts +2 -0
- package/dist/vertex-shader.js +160 -0
- package/dist/vertex-shader.js.map +7 -0
- package/package.json +29 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { vec4 } from '../types.js';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount.js';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing.js';
|
|
4
|
+
export declare const godRaysMeta: {
|
|
5
|
+
readonly maxColorCount: 5;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Animated rays of light radiating from the center, blended with up to 5 colors.
|
|
9
|
+
*
|
|
10
|
+
* Fragment shader uniforms:
|
|
11
|
+
* - u_time (float): Animation time
|
|
12
|
+
* - u_colorBack (vec4): Background color in RGBA
|
|
13
|
+
* - u_colorBloom (vec4): Color overlay blended with the rays in RGBA, needs bloom > 0
|
|
14
|
+
* - u_colors (vec4[]): Up to 5 ray colors in RGBA
|
|
15
|
+
* - u_colorsCount (float): Number of active colors
|
|
16
|
+
* - u_bloom (float): Strength of the bloom/overlay effect, 0 = alpha blend, 1 = additive blend (0 to 1)
|
|
17
|
+
* - u_intensity (float): Visibility/strength of the rays (0 to 1)
|
|
18
|
+
* - u_density (float): The number of rays (0 to 1)
|
|
19
|
+
* - u_spotty (float): The length of the rays, higher = more spots/shorter rays (0 to 1)
|
|
20
|
+
* - u_midSize (float): Size of the circular glow shape in the center, needs midIntensity > 0 (0 to 1)
|
|
21
|
+
* - u_midIntensity (float): Brightness/intensity of the central glow, needs midSize > 0 (0 to 1)
|
|
22
|
+
* - u_noiseTexture (sampler2D): Pre-computed randomizer source texture
|
|
23
|
+
*
|
|
24
|
+
* Vertex shader outputs (used in fragment shader):
|
|
25
|
+
* - v_objectUV (vec2): Object box UV coordinates with global sizing (scale, rotation, offsets, etc) applied
|
|
26
|
+
*
|
|
27
|
+
* The rays are adjustable by size, density, brightness and center glow.
|
|
28
|
+
*
|
|
29
|
+
* Vertex shader uniforms:
|
|
30
|
+
* - u_resolution (vec2): Canvas resolution in pixels
|
|
31
|
+
* - u_pixelRatio (float): Device pixel ratio
|
|
32
|
+
* - u_originX (float): Reference point for positioning world width in the canvas (0 to 1)
|
|
33
|
+
* - u_originY (float): Reference point for positioning world height in the canvas (0 to 1)
|
|
34
|
+
* - u_worldWidth (float): Virtual width of the graphic before it's scaled to fit the canvas
|
|
35
|
+
* - u_worldHeight (float): Virtual height of the graphic before it's scaled to fit the canvas
|
|
36
|
+
* - u_fit (float): How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)
|
|
37
|
+
* - u_scale (float): Overall zoom level of the graphics (0.01 to 4)
|
|
38
|
+
* - u_rotation (float): Overall rotation angle of the graphics in degrees (0 to 360)
|
|
39
|
+
* - u_offsetX (float): Horizontal offset of the graphics center (-1 to 1)
|
|
40
|
+
* - u_offsetY (float): Vertical offset of the graphics center (-1 to 1)
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare const godRaysFragmentShader: string;
|
|
44
|
+
export interface GodRaysUniforms extends ShaderSizingUniforms {
|
|
45
|
+
u_colorBack: [number, number, number, number];
|
|
46
|
+
u_colorBloom: [number, number, number, number];
|
|
47
|
+
u_colors: vec4[];
|
|
48
|
+
u_colorsCount: number;
|
|
49
|
+
u_spotty: number;
|
|
50
|
+
u_midSize: number;
|
|
51
|
+
u_midIntensity: number;
|
|
52
|
+
u_density: number;
|
|
53
|
+
u_intensity: number;
|
|
54
|
+
u_bloom: number;
|
|
55
|
+
u_noiseTexture?: HTMLImageElement;
|
|
56
|
+
}
|
|
57
|
+
export interface GodRaysParams extends ShaderSizingParams, ShaderMotionParams {
|
|
58
|
+
colorBack?: string;
|
|
59
|
+
colorBloom?: string;
|
|
60
|
+
colors?: string[];
|
|
61
|
+
spotty?: number;
|
|
62
|
+
midSize?: number;
|
|
63
|
+
midIntensity?: number;
|
|
64
|
+
density?: number;
|
|
65
|
+
intensity?: number;
|
|
66
|
+
bloom?: number;
|
|
67
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
2
|
+
* Paper Shaders *
|
|
3
|
+
* https://github.com/paper-design/shaders *
|
|
4
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
5
|
+
|
|
6
|
+
import {} from "../shader-sizing.js";
|
|
7
|
+
import { declarePI, rotation2, textureRandomizerR, colorBandingFix, proceduralHash11 } from "../shader-utils.js";
|
|
8
|
+
const godRaysMeta = {
|
|
9
|
+
maxColorCount: 5
|
|
10
|
+
};
|
|
11
|
+
const godRaysFragmentShader = `#version 300 es
|
|
12
|
+
precision mediump float;
|
|
13
|
+
|
|
14
|
+
uniform float u_time;
|
|
15
|
+
|
|
16
|
+
uniform sampler2D u_noiseTexture;
|
|
17
|
+
|
|
18
|
+
uniform vec4 u_colorBack;
|
|
19
|
+
uniform vec4 u_colorBloom;
|
|
20
|
+
uniform vec4 u_colors[${godRaysMeta.maxColorCount}];
|
|
21
|
+
uniform float u_colorsCount;
|
|
22
|
+
|
|
23
|
+
uniform float u_density;
|
|
24
|
+
uniform float u_spotty;
|
|
25
|
+
uniform float u_midSize;
|
|
26
|
+
uniform float u_midIntensity;
|
|
27
|
+
uniform float u_intensity;
|
|
28
|
+
uniform float u_bloom;
|
|
29
|
+
|
|
30
|
+
in vec2 v_objectUV;
|
|
31
|
+
|
|
32
|
+
out vec4 fragColor;
|
|
33
|
+
|
|
34
|
+
${declarePI}
|
|
35
|
+
${rotation2}
|
|
36
|
+
${textureRandomizerR}
|
|
37
|
+
float valueNoise(vec2 st) {
|
|
38
|
+
vec2 i = floor(st);
|
|
39
|
+
vec2 f = fract(st);
|
|
40
|
+
float a = randomR(i);
|
|
41
|
+
float b = randomR(i + vec2(1.0, 0.0));
|
|
42
|
+
float c = randomR(i + vec2(0.0, 1.0));
|
|
43
|
+
float d = randomR(i + vec2(1.0, 1.0));
|
|
44
|
+
vec2 u = f * f * (3.0 - 2.0 * f);
|
|
45
|
+
float x1 = mix(a, b, u.x);
|
|
46
|
+
float x2 = mix(c, d, u.x);
|
|
47
|
+
return mix(x1, x2, u.y);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${proceduralHash11}
|
|
51
|
+
|
|
52
|
+
float raysShape(vec2 uv, float r, float freq, float intensity, float radius) {
|
|
53
|
+
float a = atan(uv.y, uv.x);
|
|
54
|
+
vec2 left = vec2(a * freq, r);
|
|
55
|
+
vec2 right = vec2(fract(a / TWO_PI) * TWO_PI * freq, r);
|
|
56
|
+
float n_left = pow(valueNoise(left), intensity);
|
|
57
|
+
float n_right = pow(valueNoise(right), intensity);
|
|
58
|
+
float shape = mix(n_right, n_left, smoothstep(-.15, .15, uv.x));
|
|
59
|
+
return shape;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
void main() {
|
|
63
|
+
vec2 shape_uv = v_objectUV;
|
|
64
|
+
|
|
65
|
+
float t = .2 * u_time;
|
|
66
|
+
|
|
67
|
+
float radius = length(shape_uv);
|
|
68
|
+
float spots = 6.5 * abs(u_spotty);
|
|
69
|
+
|
|
70
|
+
float intensity = 4. - 3. * clamp(u_intensity, 0., 1.);
|
|
71
|
+
|
|
72
|
+
float delta = 1. - smoothstep(0., 1., radius);
|
|
73
|
+
|
|
74
|
+
float midSize = 10. * abs(u_midSize);
|
|
75
|
+
float ms_lo = 0.02 * midSize;
|
|
76
|
+
float ms_hi = max(midSize, 1e-6);
|
|
77
|
+
float middleShape = pow(u_midIntensity, 0.3) * (1. - smoothstep(ms_lo, ms_hi, 3.0 * radius));
|
|
78
|
+
middleShape = pow(middleShape, 5.0);
|
|
79
|
+
|
|
80
|
+
vec3 accumColor = vec3(0.0);
|
|
81
|
+
float accumAlpha = 0.0;
|
|
82
|
+
|
|
83
|
+
for (int i = 0; i < ${godRaysMeta.maxColorCount}; i++) {
|
|
84
|
+
if (i >= int(u_colorsCount)) break;
|
|
85
|
+
|
|
86
|
+
vec2 rotatedUV = rotate(shape_uv, float(i) + 1.0);
|
|
87
|
+
|
|
88
|
+
float r1 = radius * (1.0 + 0.4 * float(i)) - 3.0 * t;
|
|
89
|
+
float r2 = 0.5 * radius * (1.0 + spots) - 2.0 * t;
|
|
90
|
+
float density = 6. * u_density + step(.5, u_density) * pow(4.5 * (u_density - .5), 4.);
|
|
91
|
+
float f = mix(1.0, 3.0 + 0.5 * float(i), hash11(float(i) * 15.)) * density;
|
|
92
|
+
|
|
93
|
+
float ray = raysShape(rotatedUV, r1, 5.0 * f, intensity, radius);
|
|
94
|
+
ray *= raysShape(rotatedUV, r2, 4.0 * f, intensity, radius);
|
|
95
|
+
ray += (1. + 4. * ray) * middleShape;
|
|
96
|
+
ray = clamp(ray, 0.0, 1.0);
|
|
97
|
+
|
|
98
|
+
float srcAlpha = u_colors[i].a * ray;
|
|
99
|
+
vec3 srcColor = u_colors[i].rgb * srcAlpha;
|
|
100
|
+
|
|
101
|
+
vec3 alphaBlendColor = accumColor + (1.0 - accumAlpha) * srcColor;
|
|
102
|
+
float alphaBlendAlpha = accumAlpha + (1.0 - accumAlpha) * srcAlpha;
|
|
103
|
+
|
|
104
|
+
vec3 addBlendColor = accumColor + srcColor;
|
|
105
|
+
float addBlendAlpha = accumAlpha + srcAlpha;
|
|
106
|
+
|
|
107
|
+
accumColor = mix(alphaBlendColor, addBlendColor, u_bloom);
|
|
108
|
+
accumAlpha = mix(alphaBlendAlpha, addBlendAlpha, u_bloom);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
float overlayAlpha = u_colorBloom.a;
|
|
112
|
+
vec3 overlayColor = u_colorBloom.rgb * overlayAlpha;
|
|
113
|
+
|
|
114
|
+
vec3 colorWithOverlay = accumColor + accumAlpha * overlayColor;
|
|
115
|
+
accumColor = mix(accumColor, colorWithOverlay, u_bloom);
|
|
116
|
+
|
|
117
|
+
vec3 bgColor = u_colorBack.rgb * u_colorBack.a;
|
|
118
|
+
|
|
119
|
+
vec3 color = accumColor + (1. - accumAlpha) * bgColor;
|
|
120
|
+
float opacity = accumAlpha + (1. - accumAlpha) * u_colorBack.a;
|
|
121
|
+
color = clamp(color, 0., 1.);
|
|
122
|
+
opacity = clamp(opacity, 0., 1.);
|
|
123
|
+
|
|
124
|
+
${colorBandingFix}
|
|
125
|
+
|
|
126
|
+
fragColor = vec4(color, opacity);
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
export {
|
|
130
|
+
godRaysFragmentShader,
|
|
131
|
+
godRaysMeta
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=god-rays.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shaders/god-rays.ts"],
|
|
4
|
+
"sourcesContent": ["import type { vec4 } from '../types.js';\r\nimport type { ShaderMotionParams } from '../shader-mount.js';\r\nimport { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing.js';\r\nimport { declarePI, rotation2, textureRandomizerR, colorBandingFix, proceduralHash11 } from '../shader-utils.js';\r\n\r\nexport const godRaysMeta = {\r\n maxColorCount: 5,\r\n} as const;\r\n\r\n/**\r\n * Animated rays of light radiating from the center, blended with up to 5 colors.\r\n *\r\n * Fragment shader uniforms:\r\n * - u_time (float): Animation time\r\n * - u_colorBack (vec4): Background color in RGBA\r\n * - u_colorBloom (vec4): Color overlay blended with the rays in RGBA, needs bloom > 0\r\n * - u_colors (vec4[]): Up to 5 ray colors in RGBA\r\n * - u_colorsCount (float): Number of active colors\r\n * - u_bloom (float): Strength of the bloom/overlay effect, 0 = alpha blend, 1 = additive blend (0 to 1)\r\n * - u_intensity (float): Visibility/strength of the rays (0 to 1)\r\n * - u_density (float): The number of rays (0 to 1)\r\n * - u_spotty (float): The length of the rays, higher = more spots/shorter rays (0 to 1)\r\n * - u_midSize (float): Size of the circular glow shape in the center, needs midIntensity > 0 (0 to 1)\r\n * - u_midIntensity (float): Brightness/intensity of the central glow, needs midSize > 0 (0 to 1)\r\n * - u_noiseTexture (sampler2D): Pre-computed randomizer source texture\r\n *\r\n * Vertex shader outputs (used in fragment shader):\r\n * - v_objectUV (vec2): Object box UV coordinates with global sizing (scale, rotation, offsets, etc) applied\r\n *\r\n * The rays are adjustable by size, density, brightness and center glow.\r\n *\r\n * Vertex shader uniforms:\r\n * - u_resolution (vec2): Canvas resolution in pixels\r\n * - u_pixelRatio (float): Device pixel ratio\r\n * - u_originX (float): Reference point for positioning world width in the canvas (0 to 1)\r\n * - u_originY (float): Reference point for positioning world height in the canvas (0 to 1)\r\n * - u_worldWidth (float): Virtual width of the graphic before it's scaled to fit the canvas\r\n * - u_worldHeight (float): Virtual height of the graphic before it's scaled to fit the canvas\r\n * - u_fit (float): How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)\r\n * - u_scale (float): Overall zoom level of the graphics (0.01 to 4)\r\n * - u_rotation (float): Overall rotation angle of the graphics in degrees (0 to 360)\r\n * - u_offsetX (float): Horizontal offset of the graphics center (-1 to 1)\r\n * - u_offsetY (float): Vertical offset of the graphics center (-1 to 1)\r\n *\r\n */\r\n\r\n// language=GLSL\r\nexport const godRaysFragmentShader: string = `#version 300 es\r\nprecision mediump float;\r\n\r\nuniform float u_time;\r\n\r\nuniform sampler2D u_noiseTexture;\r\n\r\nuniform vec4 u_colorBack;\r\nuniform vec4 u_colorBloom;\r\nuniform vec4 u_colors[${ godRaysMeta.maxColorCount }];\r\nuniform float u_colorsCount;\r\n\r\nuniform float u_density;\r\nuniform float u_spotty;\r\nuniform float u_midSize;\r\nuniform float u_midIntensity;\r\nuniform float u_intensity;\r\nuniform float u_bloom;\r\n\r\nin vec2 v_objectUV;\r\n\r\nout vec4 fragColor;\r\n\r\n${ declarePI }\r\n${ rotation2 }\r\n${ textureRandomizerR }\r\nfloat valueNoise(vec2 st) {\r\n vec2 i = floor(st);\r\n vec2 f = fract(st);\r\n float a = randomR(i);\r\n float b = randomR(i + vec2(1.0, 0.0));\r\n float c = randomR(i + vec2(0.0, 1.0));\r\n float d = randomR(i + vec2(1.0, 1.0));\r\n vec2 u = f * f * (3.0 - 2.0 * f);\r\n float x1 = mix(a, b, u.x);\r\n float x2 = mix(c, d, u.x);\r\n return mix(x1, x2, u.y);\r\n}\r\n\r\n${ proceduralHash11 }\r\n\r\nfloat raysShape(vec2 uv, float r, float freq, float intensity, float radius) {\r\n float a = atan(uv.y, uv.x);\r\n vec2 left = vec2(a * freq, r);\r\n vec2 right = vec2(fract(a / TWO_PI) * TWO_PI * freq, r);\r\n float n_left = pow(valueNoise(left), intensity);\r\n float n_right = pow(valueNoise(right), intensity);\r\n float shape = mix(n_right, n_left, smoothstep(-.15, .15, uv.x));\r\n return shape;\r\n}\r\n\r\nvoid main() {\r\n vec2 shape_uv = v_objectUV;\r\n\r\n float t = .2 * u_time;\r\n\r\n float radius = length(shape_uv);\r\n float spots = 6.5 * abs(u_spotty);\r\n\r\n float intensity = 4. - 3. * clamp(u_intensity, 0., 1.);\r\n\r\n float delta = 1. - smoothstep(0., 1., radius);\r\n\r\n float midSize = 10. * abs(u_midSize);\r\n float ms_lo = 0.02 * midSize;\r\n float ms_hi = max(midSize, 1e-6);\r\n float middleShape = pow(u_midIntensity, 0.3) * (1. - smoothstep(ms_lo, ms_hi, 3.0 * radius));\r\n middleShape = pow(middleShape, 5.0);\r\n\r\n vec3 accumColor = vec3(0.0);\r\n float accumAlpha = 0.0;\r\n\r\n for (int i = 0; i < ${ godRaysMeta.maxColorCount }; i++) {\r\n if (i >= int(u_colorsCount)) break;\r\n\r\n vec2 rotatedUV = rotate(shape_uv, float(i) + 1.0);\r\n\r\n float r1 = radius * (1.0 + 0.4 * float(i)) - 3.0 * t;\r\n float r2 = 0.5 * radius * (1.0 + spots) - 2.0 * t;\r\n float density = 6. * u_density + step(.5, u_density) * pow(4.5 * (u_density - .5), 4.);\r\n float f = mix(1.0, 3.0 + 0.5 * float(i), hash11(float(i) * 15.)) * density;\r\n\r\n float ray = raysShape(rotatedUV, r1, 5.0 * f, intensity, radius);\r\n ray *= raysShape(rotatedUV, r2, 4.0 * f, intensity, radius);\r\n ray += (1. + 4. * ray) * middleShape;\r\n ray = clamp(ray, 0.0, 1.0);\r\n\r\n float srcAlpha = u_colors[i].a * ray;\r\n vec3 srcColor = u_colors[i].rgb * srcAlpha;\r\n\r\n vec3 alphaBlendColor = accumColor + (1.0 - accumAlpha) * srcColor;\r\n float alphaBlendAlpha = accumAlpha + (1.0 - accumAlpha) * srcAlpha;\r\n\r\n vec3 addBlendColor = accumColor + srcColor;\r\n float addBlendAlpha = accumAlpha + srcAlpha;\r\n\r\n accumColor = mix(alphaBlendColor, addBlendColor, u_bloom);\r\n accumAlpha = mix(alphaBlendAlpha, addBlendAlpha, u_bloom);\r\n }\r\n\r\n float overlayAlpha = u_colorBloom.a;\r\n vec3 overlayColor = u_colorBloom.rgb * overlayAlpha;\r\n\r\n vec3 colorWithOverlay = accumColor + accumAlpha * overlayColor;\r\n accumColor = mix(accumColor, colorWithOverlay, u_bloom);\r\n\r\n vec3 bgColor = u_colorBack.rgb * u_colorBack.a;\r\n\r\n vec3 color = accumColor + (1. - accumAlpha) * bgColor;\r\n float opacity = accumAlpha + (1. - accumAlpha) * u_colorBack.a;\r\n color = clamp(color, 0., 1.);\r\n opacity = clamp(opacity, 0., 1.);\r\n\r\n ${ colorBandingFix }\r\n\r\n fragColor = vec4(color, opacity);\r\n}\r\n`;\r\n\r\nexport interface GodRaysUniforms extends ShaderSizingUniforms {\r\n u_colorBack: [number, number, number, number];\r\n u_colorBloom: [number, number, number, number];\r\n u_colors: vec4[];\r\n u_colorsCount: number;\r\n u_spotty: number;\r\n u_midSize: number;\r\n u_midIntensity: number;\r\n u_density: number;\r\n u_intensity: number;\r\n u_bloom: number;\r\n u_noiseTexture?: HTMLImageElement;\r\n}\r\n\r\nexport interface GodRaysParams extends ShaderSizingParams, ShaderMotionParams {\r\n colorBack?: string;\r\n colorBloom?: string;\r\n colors?: string[];\r\n spotty?: number;\r\n midSize?: number;\r\n midIntensity?: number;\r\n density?: number;\r\n intensity?: number;\r\n bloom?: number;\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;AAEA,eAAmE;AACnE,SAAS,WAAW,WAAW,oBAAoB,iBAAiB,wBAAwB;AAErF,MAAM,cAAc;AAAA,EACzB,eAAe;AACjB;AAwCO,MAAM,wBAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASpB,YAAY,aAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchD,SAAU;AAAA,EACV,SAAU;AAAA,EACV,kBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcnB,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAiCK,YAAY,aAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAyC9C,eAAgB;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { vec4 } from '../types.js';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount.js';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing.js';
|
|
4
|
+
export declare const grainGradientMeta: {
|
|
5
|
+
readonly maxColorCount: 7;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Multi-color gradients with grainy, noise-textured distortion available in 7 animated abstract forms.
|
|
9
|
+
*
|
|
10
|
+
* Note: grains are calculated using gl_FragCoord & u_resolution, meaning grains don't react to scaling and fit
|
|
11
|
+
*
|
|
12
|
+
* Fragment shader uniforms:
|
|
13
|
+
* - u_time (float): Animation time
|
|
14
|
+
* - u_resolution (vec2): Canvas resolution in pixels
|
|
15
|
+
* - u_pixelRatio (float): Device pixel ratio
|
|
16
|
+
* - u_worldWidth (float): Virtual width of the graphic
|
|
17
|
+
* - u_worldHeight (float): Virtual height of the graphic
|
|
18
|
+
* - u_fit (float): Fit mode (0 = none, 1 = contain, 2 = cover)
|
|
19
|
+
* - u_scale (float): Overall zoom level (0.01 to 4)
|
|
20
|
+
* - u_rotation (float): Rotation angle in degrees (0 to 360)
|
|
21
|
+
* - u_offsetX (float): Horizontal offset (-1 to 1)
|
|
22
|
+
* - u_offsetY (float): Vertical offset (-1 to 1)
|
|
23
|
+
* - u_colorBack (vec4): Background color in RGBA
|
|
24
|
+
* - u_colors (vec4[]): Up to 7 gradient colors in RGBA
|
|
25
|
+
* - u_colorsCount (float): Number of active colors
|
|
26
|
+
* - u_softness (float): Color transition sharpness, 0 = hard edge, 1 = smooth gradient (0 to 1)
|
|
27
|
+
* - u_intensity (float): Distortion between color bands (0 to 1)
|
|
28
|
+
* - u_noise (float): Grainy noise overlay (0 to 1)
|
|
29
|
+
* - u_shape (float): Shape type (1 = wave, 2 = dots, 3 = truchet, 4 = corners, 5 = ripple, 6 = blob, 7 = sphere)
|
|
30
|
+
* - u_noiseTexture (sampler2D): Pre-computed randomizer source texture
|
|
31
|
+
*
|
|
32
|
+
* Vertex shader outputs (used in fragment shader):
|
|
33
|
+
* - v_objectUV (vec2): Object box UV coordinates with global sizing (scale, rotation, offsets, etc) applied (used for shapes 4-7)
|
|
34
|
+
* - v_objectBoxSize (vec2): Size of the object bounding box in pixels
|
|
35
|
+
* - v_patternUV (vec2): UV coordinates for pattern with global sizing (rotation, scale, offset, etc) applied (used for shapes 1-3)
|
|
36
|
+
* - v_patternBoxSize (vec2): Size of the pattern bounding box in pixels
|
|
37
|
+
*
|
|
38
|
+
* Vertex shader uniforms:
|
|
39
|
+
* - u_resolution (vec2): Canvas resolution in pixels
|
|
40
|
+
* - u_pixelRatio (float): Device pixel ratio
|
|
41
|
+
* - u_originX (float): Reference point for positioning world width in the canvas (0 to 1)
|
|
42
|
+
* - u_originY (float): Reference point for positioning world height in the canvas (0 to 1)
|
|
43
|
+
* - u_worldWidth (float): Virtual width of the graphic before it's scaled to fit the canvas
|
|
44
|
+
* - u_worldHeight (float): Virtual height of the graphic before it's scaled to fit the canvas
|
|
45
|
+
* - u_fit (float): How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)
|
|
46
|
+
* - u_scale (float): Overall zoom level of the graphics (0.01 to 4)
|
|
47
|
+
* - u_rotation (float): Overall rotation angle of the graphics in degrees (0 to 360)
|
|
48
|
+
* - u_offsetX (float): Horizontal offset of the graphics center (-1 to 1)
|
|
49
|
+
* - u_offsetY (float): Vertical offset of the graphics center (-1 to 1)
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare const grainGradientFragmentShader: string;
|
|
53
|
+
export interface GrainGradientUniforms extends ShaderSizingUniforms {
|
|
54
|
+
u_colorBack: [number, number, number, number];
|
|
55
|
+
u_colors: vec4[];
|
|
56
|
+
u_colorsCount: number;
|
|
57
|
+
u_softness: number;
|
|
58
|
+
u_intensity: number;
|
|
59
|
+
u_noise: number;
|
|
60
|
+
u_shape: (typeof GrainGradientShapes)[GrainGradientShape];
|
|
61
|
+
u_noiseTexture?: HTMLImageElement;
|
|
62
|
+
}
|
|
63
|
+
export interface GrainGradientParams extends ShaderSizingParams, ShaderMotionParams {
|
|
64
|
+
colorBack?: string;
|
|
65
|
+
colors?: string[];
|
|
66
|
+
softness?: number;
|
|
67
|
+
intensity?: number;
|
|
68
|
+
noise?: number;
|
|
69
|
+
shape?: GrainGradientShape;
|
|
70
|
+
}
|
|
71
|
+
export declare const GrainGradientShapes: {
|
|
72
|
+
wave: number;
|
|
73
|
+
dots: number;
|
|
74
|
+
truchet: number;
|
|
75
|
+
corners: number;
|
|
76
|
+
ripple: number;
|
|
77
|
+
blob: number;
|
|
78
|
+
sphere: number;
|
|
79
|
+
};
|
|
80
|
+
export type GrainGradientShape = keyof typeof GrainGradientShapes;
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
2
|
+
* Paper Shaders *
|
|
3
|
+
* https://github.com/paper-design/shaders *
|
|
4
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
} from "../shader-sizing.js";
|
|
8
|
+
import {
|
|
9
|
+
simplexNoise,
|
|
10
|
+
declarePI,
|
|
11
|
+
rotation2,
|
|
12
|
+
textureRandomizerR,
|
|
13
|
+
proceduralHash11
|
|
14
|
+
} from "../shader-utils.js";
|
|
15
|
+
const grainGradientMeta = {
|
|
16
|
+
maxColorCount: 7
|
|
17
|
+
};
|
|
18
|
+
const grainGradientFragmentShader = `#version 300 es
|
|
19
|
+
precision lowp float;
|
|
20
|
+
|
|
21
|
+
uniform mediump float u_time;
|
|
22
|
+
uniform mediump vec2 u_resolution;
|
|
23
|
+
uniform mediump float u_pixelRatio;
|
|
24
|
+
|
|
25
|
+
uniform sampler2D u_noiseTexture;
|
|
26
|
+
|
|
27
|
+
uniform vec4 u_colorBack;
|
|
28
|
+
uniform vec4 u_colors[${grainGradientMeta.maxColorCount}];
|
|
29
|
+
uniform float u_colorsCount;
|
|
30
|
+
uniform float u_softness;
|
|
31
|
+
uniform float u_intensity;
|
|
32
|
+
uniform float u_noise;
|
|
33
|
+
uniform float u_shape;
|
|
34
|
+
|
|
35
|
+
uniform mediump float u_worldWidth;
|
|
36
|
+
uniform mediump float u_worldHeight;
|
|
37
|
+
uniform mediump float u_fit;
|
|
38
|
+
|
|
39
|
+
uniform mediump float u_scale;
|
|
40
|
+
uniform mediump float u_rotation;
|
|
41
|
+
uniform mediump float u_offsetX;
|
|
42
|
+
uniform mediump float u_offsetY;
|
|
43
|
+
|
|
44
|
+
in vec2 v_objectUV;
|
|
45
|
+
in vec2 v_patternUV;
|
|
46
|
+
in vec2 v_objectBoxSize;
|
|
47
|
+
in vec2 v_patternBoxSize;
|
|
48
|
+
|
|
49
|
+
out vec4 fragColor;
|
|
50
|
+
|
|
51
|
+
${declarePI}
|
|
52
|
+
${simplexNoise}
|
|
53
|
+
${rotation2}
|
|
54
|
+
${textureRandomizerR}
|
|
55
|
+
|
|
56
|
+
float valueNoiseR(vec2 st) {
|
|
57
|
+
vec2 i = floor(st);
|
|
58
|
+
vec2 f = fract(st);
|
|
59
|
+
float a = randomR(i);
|
|
60
|
+
float b = randomR(i + vec2(1.0, 0.0));
|
|
61
|
+
float c = randomR(i + vec2(0.0, 1.0));
|
|
62
|
+
float d = randomR(i + vec2(1.0, 1.0));
|
|
63
|
+
vec2 u = f * f * (3.0 - 2.0 * f);
|
|
64
|
+
float x1 = mix(a, b, u.x);
|
|
65
|
+
float x2 = mix(c, d, u.x);
|
|
66
|
+
return mix(x1, x2, u.y);
|
|
67
|
+
}
|
|
68
|
+
vec4 fbmR(vec2 n0, vec2 n1, vec2 n2, vec2 n3) {
|
|
69
|
+
float amplitude = 0.2;
|
|
70
|
+
vec4 total = vec4(0.);
|
|
71
|
+
for (int i = 0; i < 3; i++) {
|
|
72
|
+
n0 = rotate(n0, 0.3);
|
|
73
|
+
n1 = rotate(n1, 0.3);
|
|
74
|
+
n2 = rotate(n2, 0.3);
|
|
75
|
+
n3 = rotate(n3, 0.3);
|
|
76
|
+
total.x += valueNoiseR(n0) * amplitude;
|
|
77
|
+
total.y += valueNoiseR(n1) * amplitude;
|
|
78
|
+
total.z += valueNoiseR(n2) * amplitude;
|
|
79
|
+
total.z += valueNoiseR(n3) * amplitude;
|
|
80
|
+
n0 *= 1.99;
|
|
81
|
+
n1 *= 1.99;
|
|
82
|
+
n2 *= 1.99;
|
|
83
|
+
n3 *= 1.99;
|
|
84
|
+
amplitude *= 0.6;
|
|
85
|
+
}
|
|
86
|
+
return total;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
${proceduralHash11}
|
|
90
|
+
|
|
91
|
+
vec2 truchet(vec2 uv, float idx){
|
|
92
|
+
idx = fract(((idx - .5) * 2.));
|
|
93
|
+
if (idx > 0.75) {
|
|
94
|
+
uv = vec2(1.0) - uv;
|
|
95
|
+
} else if (idx > 0.5) {
|
|
96
|
+
uv = vec2(1.0 - uv.x, uv.y);
|
|
97
|
+
} else if (idx > 0.25) {
|
|
98
|
+
uv = 1.0 - vec2(1.0 - uv.x, uv.y);
|
|
99
|
+
}
|
|
100
|
+
return uv;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
void main() {
|
|
104
|
+
|
|
105
|
+
const float firstFrameOffset = 7.;
|
|
106
|
+
float t = .1 * (u_time + firstFrameOffset);
|
|
107
|
+
|
|
108
|
+
vec2 shape_uv = vec2(0.);
|
|
109
|
+
vec2 grain_uv = vec2(0.);
|
|
110
|
+
|
|
111
|
+
float r = u_rotation * PI / 180.;
|
|
112
|
+
float cr = cos(r);
|
|
113
|
+
float sr = sin(r);
|
|
114
|
+
mat2 graphicRotation = mat2(cr, sr, -sr, cr);
|
|
115
|
+
vec2 graphicOffset = vec2(-u_offsetX, u_offsetY);
|
|
116
|
+
|
|
117
|
+
if (u_shape > 3.5) {
|
|
118
|
+
shape_uv = v_objectUV;
|
|
119
|
+
grain_uv = shape_uv;
|
|
120
|
+
|
|
121
|
+
// apply inverse transform to grain_uv so it respects the originXY
|
|
122
|
+
grain_uv = transpose(graphicRotation) * grain_uv;
|
|
123
|
+
grain_uv *= u_scale;
|
|
124
|
+
grain_uv -= graphicOffset;
|
|
125
|
+
grain_uv *= v_objectBoxSize;
|
|
126
|
+
grain_uv *= .7;
|
|
127
|
+
} else {
|
|
128
|
+
shape_uv = .5 * v_patternUV;
|
|
129
|
+
grain_uv = 100. * v_patternUV;
|
|
130
|
+
|
|
131
|
+
// apply inverse transform to grain_uv so it respects the originXY
|
|
132
|
+
grain_uv = transpose(graphicRotation) * grain_uv;
|
|
133
|
+
grain_uv *= u_scale;
|
|
134
|
+
if (u_fit > 0.) {
|
|
135
|
+
vec2 givenBoxSize = vec2(u_worldWidth, u_worldHeight);
|
|
136
|
+
givenBoxSize = max(givenBoxSize, vec2(1.)) * u_pixelRatio;
|
|
137
|
+
float patternBoxRatio = givenBoxSize.x / givenBoxSize.y;
|
|
138
|
+
vec2 patternBoxGivenSize = vec2(
|
|
139
|
+
(u_worldWidth == 0.) ? u_resolution.x : givenBoxSize.x,
|
|
140
|
+
(u_worldHeight == 0.) ? u_resolution.y : givenBoxSize.y
|
|
141
|
+
);
|
|
142
|
+
patternBoxRatio = patternBoxGivenSize.x / patternBoxGivenSize.y;
|
|
143
|
+
float patternBoxNoFitBoxWidth = patternBoxRatio * min(patternBoxGivenSize.x / patternBoxRatio, patternBoxGivenSize.y);
|
|
144
|
+
grain_uv /= (patternBoxNoFitBoxWidth / v_patternBoxSize.x);
|
|
145
|
+
}
|
|
146
|
+
vec2 patternBoxScale = u_resolution.xy / v_patternBoxSize;
|
|
147
|
+
grain_uv -= graphicOffset / patternBoxScale;
|
|
148
|
+
grain_uv *= 1.6;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
float shape = 0.;
|
|
153
|
+
|
|
154
|
+
if (u_shape < 1.5) {
|
|
155
|
+
// Sine wave
|
|
156
|
+
|
|
157
|
+
float wave = cos(.5 * shape_uv.x - 4. * t) * sin(1.5 * shape_uv.x + 2. * t) * (.75 + .25 * cos(6. * t));
|
|
158
|
+
shape = 1. - smoothstep(-1., 1., shape_uv.y + wave);
|
|
159
|
+
|
|
160
|
+
} else if (u_shape < 2.5) {
|
|
161
|
+
// Grid (dots)
|
|
162
|
+
|
|
163
|
+
float stripeIdx = floor(2. * shape_uv.x / TWO_PI);
|
|
164
|
+
float rand = hash11(stripeIdx * 100.);
|
|
165
|
+
rand = sign(rand - .5) * pow(4. * abs(rand), .3);
|
|
166
|
+
shape = sin(shape_uv.x) * cos(shape_uv.y - 5. * rand * t);
|
|
167
|
+
shape = pow(abs(shape), 4.);
|
|
168
|
+
|
|
169
|
+
} else if (u_shape < 3.5) {
|
|
170
|
+
// Truchet pattern
|
|
171
|
+
|
|
172
|
+
float n2 = valueNoiseR(shape_uv * .4 - 3.75 * t);
|
|
173
|
+
shape_uv.x += 10.;
|
|
174
|
+
shape_uv *= .6;
|
|
175
|
+
|
|
176
|
+
vec2 tile = truchet(fract(shape_uv), randomR(floor(shape_uv)));
|
|
177
|
+
|
|
178
|
+
float distance1 = length(tile);
|
|
179
|
+
float distance2 = length(tile - vec2(1.));
|
|
180
|
+
|
|
181
|
+
n2 -= .5;
|
|
182
|
+
n2 *= .1;
|
|
183
|
+
shape = smoothstep(.2, .55, distance1 + n2) * (1. - smoothstep(.45, .8, distance1 - n2));
|
|
184
|
+
shape += smoothstep(.2, .55, distance2 + n2) * (1. - smoothstep(.45, .8, distance2 - n2));
|
|
185
|
+
|
|
186
|
+
shape = pow(shape, 1.5);
|
|
187
|
+
|
|
188
|
+
} else if (u_shape < 4.5) {
|
|
189
|
+
// Corners
|
|
190
|
+
|
|
191
|
+
shape_uv *= .6;
|
|
192
|
+
vec2 outer = vec2(.5);
|
|
193
|
+
|
|
194
|
+
vec2 bl = smoothstep(vec2(0.), outer, shape_uv + vec2(.1 + .1 * sin(3. * t), .2 - .1 * sin(5.25 * t)));
|
|
195
|
+
vec2 tr = smoothstep(vec2(0.), outer, 1. - shape_uv);
|
|
196
|
+
shape = 1. - bl.x * bl.y * tr.x * tr.y;
|
|
197
|
+
|
|
198
|
+
shape_uv = -shape_uv;
|
|
199
|
+
bl = smoothstep(vec2(0.), outer, shape_uv + vec2(.1 + .1 * sin(3. * t), .2 - .1 * cos(5.25 * t)));
|
|
200
|
+
tr = smoothstep(vec2(0.), outer, 1. - shape_uv);
|
|
201
|
+
shape -= bl.x * bl.y * tr.x * tr.y;
|
|
202
|
+
|
|
203
|
+
shape = 1. - smoothstep(0., 1., shape);
|
|
204
|
+
|
|
205
|
+
} else if (u_shape < 5.5) {
|
|
206
|
+
// Ripple
|
|
207
|
+
|
|
208
|
+
shape_uv *= 2.;
|
|
209
|
+
float dist = length(.4 * shape_uv);
|
|
210
|
+
float waves = sin(pow(dist, 1.2) * 5. - 3. * t) * .5 + .5;
|
|
211
|
+
shape = waves;
|
|
212
|
+
|
|
213
|
+
} else if (u_shape < 6.5) {
|
|
214
|
+
// Blob
|
|
215
|
+
|
|
216
|
+
t *= 2.;
|
|
217
|
+
|
|
218
|
+
vec2 f1_traj = .25 * vec2(1.3 * sin(t), .2 + 1.3 * cos(.6 * t + 4.));
|
|
219
|
+
vec2 f2_traj = .2 * vec2(1.2 * sin(-t), 1.3 * sin(1.6 * t));
|
|
220
|
+
vec2 f3_traj = .25 * vec2(1.7 * cos(-.6 * t), cos(-1.6 * t));
|
|
221
|
+
vec2 f4_traj = .3 * vec2(1.4 * cos(.8 * t), 1.2 * sin(-.6 * t - 3.));
|
|
222
|
+
|
|
223
|
+
shape = .5 * pow(1. - clamp(0., 1., length(shape_uv + f1_traj)), 5.);
|
|
224
|
+
shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f2_traj)), 5.);
|
|
225
|
+
shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f3_traj)), 5.);
|
|
226
|
+
shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f4_traj)), 5.);
|
|
227
|
+
|
|
228
|
+
shape = smoothstep(.0, .9, shape);
|
|
229
|
+
float edge = smoothstep(.25, .3, shape);
|
|
230
|
+
shape = mix(.0, shape, edge);
|
|
231
|
+
|
|
232
|
+
} else {
|
|
233
|
+
// Sphere
|
|
234
|
+
|
|
235
|
+
shape_uv *= 2.;
|
|
236
|
+
float d = 1. - pow(length(shape_uv), 2.);
|
|
237
|
+
vec3 pos = vec3(shape_uv, sqrt(max(d, 0.)));
|
|
238
|
+
vec3 lightPos = normalize(vec3(cos(1.5 * t), .8, sin(1.25 * t)));
|
|
239
|
+
shape = .5 + .5 * dot(lightPos, pos);
|
|
240
|
+
shape *= step(0., d);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
float baseNoise = snoise(grain_uv * .5);
|
|
244
|
+
vec4 fbmVals = fbmR(
|
|
245
|
+
.002 * grain_uv + 10.,
|
|
246
|
+
.003 * grain_uv,
|
|
247
|
+
.001 * grain_uv,
|
|
248
|
+
rotate(.4 * grain_uv, 2.)
|
|
249
|
+
);
|
|
250
|
+
float grainDist = baseNoise * snoise(grain_uv * .2) - fbmVals.x - fbmVals.y;
|
|
251
|
+
float rawNoise = .75 * baseNoise - fbmVals.w - fbmVals.z;
|
|
252
|
+
float noise = clamp(rawNoise, 0., 1.);
|
|
253
|
+
|
|
254
|
+
shape += u_intensity * 2. / u_colorsCount * (grainDist + .5);
|
|
255
|
+
shape += u_noise * 10. / u_colorsCount * noise;
|
|
256
|
+
|
|
257
|
+
float aa = fwidth(shape);
|
|
258
|
+
|
|
259
|
+
shape = clamp(shape - .5 / u_colorsCount, 0., 1.);
|
|
260
|
+
float totalShape = smoothstep(0., u_softness + 2. * aa, clamp(shape * u_colorsCount, 0., 1.));
|
|
261
|
+
float mixer = shape * (u_colorsCount - 1.);
|
|
262
|
+
|
|
263
|
+
int cntStop = int(u_colorsCount) - 1;
|
|
264
|
+
vec4 gradient = u_colors[0];
|
|
265
|
+
gradient.rgb *= gradient.a;
|
|
266
|
+
for (int i = 1; i < ${grainGradientMeta.maxColorCount}; i++) {
|
|
267
|
+
if (i > cntStop) break;
|
|
268
|
+
|
|
269
|
+
float localT = clamp(mixer - float(i - 1), 0., 1.);
|
|
270
|
+
localT = smoothstep(.5 - .5 * u_softness - aa, .5 + .5 * u_softness + aa, localT);
|
|
271
|
+
|
|
272
|
+
vec4 c = u_colors[i];
|
|
273
|
+
c.rgb *= c.a;
|
|
274
|
+
gradient = mix(gradient, c, localT);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
vec3 color = gradient.rgb * totalShape;
|
|
278
|
+
float opacity = gradient.a * totalShape;
|
|
279
|
+
|
|
280
|
+
vec3 bgColor = u_colorBack.rgb * u_colorBack.a;
|
|
281
|
+
color = color + bgColor * (1.0 - opacity);
|
|
282
|
+
opacity = opacity + u_colorBack.a * (1.0 - opacity);
|
|
283
|
+
|
|
284
|
+
fragColor = vec4(color, opacity);
|
|
285
|
+
}
|
|
286
|
+
`;
|
|
287
|
+
const GrainGradientShapes = {
|
|
288
|
+
wave: 1,
|
|
289
|
+
dots: 2,
|
|
290
|
+
truchet: 3,
|
|
291
|
+
corners: 4,
|
|
292
|
+
ripple: 5,
|
|
293
|
+
blob: 6,
|
|
294
|
+
sphere: 7
|
|
295
|
+
};
|
|
296
|
+
export {
|
|
297
|
+
GrainGradientShapes,
|
|
298
|
+
grainGradientFragmentShader,
|
|
299
|
+
grainGradientMeta
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=grain-gradient.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shaders/grain-gradient.ts"],
|
|
4
|
+
"sourcesContent": ["import type { vec4 } from '../types.js';\r\nimport type { ShaderMotionParams } from '../shader-mount.js';\r\nimport {\r\n type ShaderSizingParams,\r\n type ShaderSizingUniforms,\r\n} from '../shader-sizing.js';\r\nimport {\r\n simplexNoise,\r\n declarePI,\r\n rotation2,\r\n textureRandomizerR,\r\n proceduralHash11,\r\n} from '../shader-utils.js';\r\n\r\nexport const grainGradientMeta = {\r\n maxColorCount: 7,\r\n} as const;\r\n\r\n/**\r\n * Multi-color gradients with grainy, noise-textured distortion available in 7 animated abstract forms.\r\n *\r\n * Note: grains are calculated using gl_FragCoord & u_resolution, meaning grains don't react to scaling and fit\r\n *\r\n * Fragment shader uniforms:\r\n * - u_time (float): Animation time\r\n * - u_resolution (vec2): Canvas resolution in pixels\r\n * - u_pixelRatio (float): Device pixel ratio\r\n * - u_worldWidth (float): Virtual width of the graphic\r\n * - u_worldHeight (float): Virtual height of the graphic\r\n * - u_fit (float): Fit mode (0 = none, 1 = contain, 2 = cover)\r\n * - u_scale (float): Overall zoom level (0.01 to 4)\r\n * - u_rotation (float): Rotation angle in degrees (0 to 360)\r\n * - u_offsetX (float): Horizontal offset (-1 to 1)\r\n * - u_offsetY (float): Vertical offset (-1 to 1)\r\n * - u_colorBack (vec4): Background color in RGBA\r\n * - u_colors (vec4[]): Up to 7 gradient colors in RGBA\r\n * - u_colorsCount (float): Number of active colors\r\n * - u_softness (float): Color transition sharpness, 0 = hard edge, 1 = smooth gradient (0 to 1)\r\n * - u_intensity (float): Distortion between color bands (0 to 1)\r\n * - u_noise (float): Grainy noise overlay (0 to 1)\r\n * - u_shape (float): Shape type (1 = wave, 2 = dots, 3 = truchet, 4 = corners, 5 = ripple, 6 = blob, 7 = sphere)\r\n * - u_noiseTexture (sampler2D): Pre-computed randomizer source texture\r\n *\r\n * Vertex shader outputs (used in fragment shader):\r\n * - v_objectUV (vec2): Object box UV coordinates with global sizing (scale, rotation, offsets, etc) applied (used for shapes 4-7)\r\n * - v_objectBoxSize (vec2): Size of the object bounding box in pixels\r\n * - v_patternUV (vec2): UV coordinates for pattern with global sizing (rotation, scale, offset, etc) applied (used for shapes 1-3)\r\n * - v_patternBoxSize (vec2): Size of the pattern bounding box in pixels\r\n *\r\n * Vertex shader uniforms:\r\n * - u_resolution (vec2): Canvas resolution in pixels\r\n * - u_pixelRatio (float): Device pixel ratio\r\n * - u_originX (float): Reference point for positioning world width in the canvas (0 to 1)\r\n * - u_originY (float): Reference point for positioning world height in the canvas (0 to 1)\r\n * - u_worldWidth (float): Virtual width of the graphic before it's scaled to fit the canvas\r\n * - u_worldHeight (float): Virtual height of the graphic before it's scaled to fit the canvas\r\n * - u_fit (float): How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)\r\n * - u_scale (float): Overall zoom level of the graphics (0.01 to 4)\r\n * - u_rotation (float): Overall rotation angle of the graphics in degrees (0 to 360)\r\n * - u_offsetX (float): Horizontal offset of the graphics center (-1 to 1)\r\n * - u_offsetY (float): Vertical offset of the graphics center (-1 to 1)\r\n *\r\n */\r\n\r\n// language=GLSL\r\nexport const grainGradientFragmentShader: string = `#version 300 es\r\nprecision lowp float;\r\n\r\nuniform mediump float u_time;\r\nuniform mediump vec2 u_resolution;\r\nuniform mediump float u_pixelRatio;\r\n\r\nuniform sampler2D u_noiseTexture;\r\n\r\nuniform vec4 u_colorBack;\r\nuniform vec4 u_colors[${ grainGradientMeta.maxColorCount }];\r\nuniform float u_colorsCount;\r\nuniform float u_softness;\r\nuniform float u_intensity;\r\nuniform float u_noise;\r\nuniform float u_shape;\r\n\r\nuniform mediump float u_worldWidth;\r\nuniform mediump float u_worldHeight;\r\nuniform mediump float u_fit;\r\n\r\nuniform mediump float u_scale;\r\nuniform mediump float u_rotation;\r\nuniform mediump float u_offsetX;\r\nuniform mediump float u_offsetY;\r\n\r\nin vec2 v_objectUV;\r\nin vec2 v_patternUV;\r\nin vec2 v_objectBoxSize;\r\nin vec2 v_patternBoxSize;\r\n\r\nout vec4 fragColor;\r\n\r\n${ declarePI }\r\n${ simplexNoise }\r\n${ rotation2 }\r\n${ textureRandomizerR }\r\n\r\nfloat valueNoiseR(vec2 st) {\r\n vec2 i = floor(st);\r\n vec2 f = fract(st);\r\n float a = randomR(i);\r\n float b = randomR(i + vec2(1.0, 0.0));\r\n float c = randomR(i + vec2(0.0, 1.0));\r\n float d = randomR(i + vec2(1.0, 1.0));\r\n vec2 u = f * f * (3.0 - 2.0 * f);\r\n float x1 = mix(a, b, u.x);\r\n float x2 = mix(c, d, u.x);\r\n return mix(x1, x2, u.y);\r\n}\r\nvec4 fbmR(vec2 n0, vec2 n1, vec2 n2, vec2 n3) {\r\n float amplitude = 0.2;\r\n vec4 total = vec4(0.);\r\n for (int i = 0; i < 3; i++) {\r\n n0 = rotate(n0, 0.3);\r\n n1 = rotate(n1, 0.3);\r\n n2 = rotate(n2, 0.3);\r\n n3 = rotate(n3, 0.3);\r\n total.x += valueNoiseR(n0) * amplitude;\r\n total.y += valueNoiseR(n1) * amplitude;\r\n total.z += valueNoiseR(n2) * amplitude;\r\n total.z += valueNoiseR(n3) * amplitude;\r\n n0 *= 1.99;\r\n n1 *= 1.99;\r\n n2 *= 1.99;\r\n n3 *= 1.99;\r\n amplitude *= 0.6;\r\n }\r\n return total;\r\n}\r\n\r\n${ proceduralHash11 }\r\n\r\nvec2 truchet(vec2 uv, float idx){\r\n idx = fract(((idx - .5) * 2.));\r\n if (idx > 0.75) {\r\n uv = vec2(1.0) - uv;\r\n } else if (idx > 0.5) {\r\n uv = vec2(1.0 - uv.x, uv.y);\r\n } else if (idx > 0.25) {\r\n uv = 1.0 - vec2(1.0 - uv.x, uv.y);\r\n }\r\n return uv;\r\n}\r\n\r\nvoid main() {\r\n\r\n const float firstFrameOffset = 7.;\r\n float t = .1 * (u_time + firstFrameOffset);\r\n\r\n vec2 shape_uv = vec2(0.);\r\n vec2 grain_uv = vec2(0.);\r\n\r\n float r = u_rotation * PI / 180.;\r\n float cr = cos(r);\r\n float sr = sin(r);\r\n mat2 graphicRotation = mat2(cr, sr, -sr, cr);\r\n vec2 graphicOffset = vec2(-u_offsetX, u_offsetY);\r\n\r\n if (u_shape > 3.5) {\r\n shape_uv = v_objectUV;\r\n grain_uv = shape_uv;\r\n\r\n // apply inverse transform to grain_uv so it respects the originXY\r\n grain_uv = transpose(graphicRotation) * grain_uv;\r\n grain_uv *= u_scale;\r\n grain_uv -= graphicOffset;\r\n grain_uv *= v_objectBoxSize;\r\n grain_uv *= .7;\r\n } else {\r\n shape_uv = .5 * v_patternUV;\r\n grain_uv = 100. * v_patternUV;\r\n\r\n // apply inverse transform to grain_uv so it respects the originXY\r\n grain_uv = transpose(graphicRotation) * grain_uv;\r\n grain_uv *= u_scale;\r\n if (u_fit > 0.) {\r\n vec2 givenBoxSize = vec2(u_worldWidth, u_worldHeight);\r\n givenBoxSize = max(givenBoxSize, vec2(1.)) * u_pixelRatio;\r\n float patternBoxRatio = givenBoxSize.x / givenBoxSize.y;\r\n vec2 patternBoxGivenSize = vec2(\r\n (u_worldWidth == 0.) ? u_resolution.x : givenBoxSize.x,\r\n (u_worldHeight == 0.) ? u_resolution.y : givenBoxSize.y\r\n );\r\n patternBoxRatio = patternBoxGivenSize.x / patternBoxGivenSize.y;\r\n float patternBoxNoFitBoxWidth = patternBoxRatio * min(patternBoxGivenSize.x / patternBoxRatio, patternBoxGivenSize.y);\r\n grain_uv /= (patternBoxNoFitBoxWidth / v_patternBoxSize.x);\r\n }\r\n vec2 patternBoxScale = u_resolution.xy / v_patternBoxSize;\r\n grain_uv -= graphicOffset / patternBoxScale;\r\n grain_uv *= 1.6;\r\n }\r\n\r\n\r\n float shape = 0.;\r\n\r\n if (u_shape < 1.5) {\r\n // Sine wave\r\n\r\n float wave = cos(.5 * shape_uv.x - 4. * t) * sin(1.5 * shape_uv.x + 2. * t) * (.75 + .25 * cos(6. * t));\r\n shape = 1. - smoothstep(-1., 1., shape_uv.y + wave);\r\n\r\n } else if (u_shape < 2.5) {\r\n // Grid (dots)\r\n\r\n float stripeIdx = floor(2. * shape_uv.x / TWO_PI);\r\n float rand = hash11(stripeIdx * 100.);\r\n rand = sign(rand - .5) * pow(4. * abs(rand), .3);\r\n shape = sin(shape_uv.x) * cos(shape_uv.y - 5. * rand * t);\r\n shape = pow(abs(shape), 4.);\r\n\r\n } else if (u_shape < 3.5) {\r\n // Truchet pattern\r\n\r\n float n2 = valueNoiseR(shape_uv * .4 - 3.75 * t);\r\n shape_uv.x += 10.;\r\n shape_uv *= .6;\r\n\r\n vec2 tile = truchet(fract(shape_uv), randomR(floor(shape_uv)));\r\n\r\n float distance1 = length(tile);\r\n float distance2 = length(tile - vec2(1.));\r\n\r\n n2 -= .5;\r\n n2 *= .1;\r\n shape = smoothstep(.2, .55, distance1 + n2) * (1. - smoothstep(.45, .8, distance1 - n2));\r\n shape += smoothstep(.2, .55, distance2 + n2) * (1. - smoothstep(.45, .8, distance2 - n2));\r\n\r\n shape = pow(shape, 1.5);\r\n\r\n } else if (u_shape < 4.5) {\r\n // Corners\r\n\r\n shape_uv *= .6;\r\n vec2 outer = vec2(.5);\r\n\r\n vec2 bl = smoothstep(vec2(0.), outer, shape_uv + vec2(.1 + .1 * sin(3. * t), .2 - .1 * sin(5.25 * t)));\r\n vec2 tr = smoothstep(vec2(0.), outer, 1. - shape_uv);\r\n shape = 1. - bl.x * bl.y * tr.x * tr.y;\r\n\r\n shape_uv = -shape_uv;\r\n bl = smoothstep(vec2(0.), outer, shape_uv + vec2(.1 + .1 * sin(3. * t), .2 - .1 * cos(5.25 * t)));\r\n tr = smoothstep(vec2(0.), outer, 1. - shape_uv);\r\n shape -= bl.x * bl.y * tr.x * tr.y;\r\n\r\n shape = 1. - smoothstep(0., 1., shape);\r\n\r\n } else if (u_shape < 5.5) {\r\n // Ripple\r\n\r\n shape_uv *= 2.;\r\n float dist = length(.4 * shape_uv);\r\n float waves = sin(pow(dist, 1.2) * 5. - 3. * t) * .5 + .5;\r\n shape = waves;\r\n\r\n } else if (u_shape < 6.5) {\r\n // Blob\r\n\r\n t *= 2.;\r\n\r\n vec2 f1_traj = .25 * vec2(1.3 * sin(t), .2 + 1.3 * cos(.6 * t + 4.));\r\n vec2 f2_traj = .2 * vec2(1.2 * sin(-t), 1.3 * sin(1.6 * t));\r\n vec2 f3_traj = .25 * vec2(1.7 * cos(-.6 * t), cos(-1.6 * t));\r\n vec2 f4_traj = .3 * vec2(1.4 * cos(.8 * t), 1.2 * sin(-.6 * t - 3.));\r\n\r\n shape = .5 * pow(1. - clamp(0., 1., length(shape_uv + f1_traj)), 5.);\r\n shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f2_traj)), 5.);\r\n shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f3_traj)), 5.);\r\n shape += .5 * pow(1. - clamp(0., 1., length(shape_uv + f4_traj)), 5.);\r\n\r\n shape = smoothstep(.0, .9, shape);\r\n float edge = smoothstep(.25, .3, shape);\r\n shape = mix(.0, shape, edge);\r\n\r\n } else {\r\n // Sphere\r\n\r\n shape_uv *= 2.;\r\n float d = 1. - pow(length(shape_uv), 2.);\r\n vec3 pos = vec3(shape_uv, sqrt(max(d, 0.)));\r\n vec3 lightPos = normalize(vec3(cos(1.5 * t), .8, sin(1.25 * t)));\r\n shape = .5 + .5 * dot(lightPos, pos);\r\n shape *= step(0., d);\r\n }\r\n\r\n float baseNoise = snoise(grain_uv * .5);\r\n vec4 fbmVals = fbmR(\r\n .002 * grain_uv + 10.,\r\n .003 * grain_uv,\r\n .001 * grain_uv,\r\n rotate(.4 * grain_uv, 2.)\r\n );\r\n float grainDist = baseNoise * snoise(grain_uv * .2) - fbmVals.x - fbmVals.y;\r\n float rawNoise = .75 * baseNoise - fbmVals.w - fbmVals.z;\r\n float noise = clamp(rawNoise, 0., 1.);\r\n\r\n shape += u_intensity * 2. / u_colorsCount * (grainDist + .5);\r\n shape += u_noise * 10. / u_colorsCount * noise;\r\n\r\n float aa = fwidth(shape);\r\n\r\n shape = clamp(shape - .5 / u_colorsCount, 0., 1.);\r\n float totalShape = smoothstep(0., u_softness + 2. * aa, clamp(shape * u_colorsCount, 0., 1.));\r\n float mixer = shape * (u_colorsCount - 1.);\r\n\r\n int cntStop = int(u_colorsCount) - 1;\r\n vec4 gradient = u_colors[0];\r\n gradient.rgb *= gradient.a;\r\n for (int i = 1; i < ${ grainGradientMeta.maxColorCount }; i++) {\r\n if (i > cntStop) break;\r\n\r\n float localT = clamp(mixer - float(i - 1), 0., 1.);\r\n localT = smoothstep(.5 - .5 * u_softness - aa, .5 + .5 * u_softness + aa, localT);\r\n\r\n vec4 c = u_colors[i];\r\n c.rgb *= c.a;\r\n gradient = mix(gradient, c, localT);\r\n }\r\n\r\n vec3 color = gradient.rgb * totalShape;\r\n float opacity = gradient.a * totalShape;\r\n\r\n vec3 bgColor = u_colorBack.rgb * u_colorBack.a;\r\n color = color + bgColor * (1.0 - opacity);\r\n opacity = opacity + u_colorBack.a * (1.0 - opacity);\r\n\r\n fragColor = vec4(color, opacity);\r\n}\r\n`;\r\n\r\nexport interface GrainGradientUniforms extends ShaderSizingUniforms {\r\n u_colorBack: [number, number, number, number];\r\n u_colors: vec4[];\r\n u_colorsCount: number;\r\n u_softness: number;\r\n u_intensity: number;\r\n u_noise: number;\r\n u_shape: (typeof GrainGradientShapes)[GrainGradientShape];\r\n u_noiseTexture?: HTMLImageElement;\r\n}\r\n\r\nexport interface GrainGradientParams extends ShaderSizingParams, ShaderMotionParams {\r\n colorBack?: string;\r\n colors?: string[];\r\n softness?: number;\r\n intensity?: number;\r\n noise?: number;\r\n shape?: GrainGradientShape;\r\n}\r\n\r\nexport const GrainGradientShapes = {\r\n wave: 1,\r\n dots: 2,\r\n truchet: 3,\r\n corners: 4,\r\n ripple: 5,\r\n blob: 6,\r\n sphere: 7,\r\n};\r\n\r\nexport type GrainGradientShape = keyof typeof GrainGradientShapes;\r\n"],
|
|
5
|
+
"mappings": ";;;;;AAEA;AAAA,OAGO;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,oBAAoB;AAAA,EAC/B,eAAe;AACjB;AAiDO,MAAM,8BAAsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAU1B,kBAAkB,aAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBtD,SAAU;AAAA,EACV,YAAa;AAAA,EACb,SAAU;AAAA,EACV,kBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmCnB,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAiLK,kBAAkB,aAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0ClD,MAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AACV;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|