export declare const BELL_FIELD_VERTEX_SHADER = "\n attribute vec2 position;\n void main() { gl_Position = vec4(position, 0.0, 1.0); }\n "; export declare const BELL_FIELD_FRAGMENT_SHADER = "\n precision highp float;\n uniform vec2 u_resolution;\n uniform float u_time;\n uniform vec2 u_mouse;\n uniform float u_strike;\n\n #define PI 3.14159265359\n\n float hash(vec2 p) { return fract(sin(dot(p, vec2(23.71, 91.37))) * 41537.1234); }\n\n // damped-cosine stand-in for the Bessel envelope of a circular mode\n float bess(float x) { return cos(x - 0.785398) / sqrt(1.0 + abs(x)); }\n\n void main() {\n vec2 uv = gl_FragCoord.xy / u_resolution.xy;\n vec2 p = uv * 2.0 - 1.0;\n p.x *= u_resolution.x / u_resolution.y;\n p.y += 0.08;\n\n vec2 m = u_mouse / u_resolution.xy * 2.0 - 1.0;\n m.y = -m.y;\n m.x *= u_resolution.x / u_resolution.y;\n p -= m * 0.11;\n\n float t = u_time * 0.09;\n float r = length(p);\n float a = atan(p.y, p.x);\n\n // the bell drifts between partials the way a struck bell does\n float ang = 3.0 + 1.6 * sin(t * 0.37) + sin(t * 0.19 + 1.7);\n float k = 3.1 + 1.0 * sin(t * 0.23 + 0.6);\n\n float amp = 1.0 + (1.0 - u_strike) * 0.55;\n float f1 = bess(r * k * PI - t * 2.2) * cos(ang * a + t * 0.5);\n float f2 = bess(r * k * 1.6 * PI + t * 1.4) * cos((ang * 2.0 + 1.0) * a - t * 0.31);\n float f = (f1 + f2 * 0.30) * amp;\n\n // nodal lines \u2014 where the metal stands still\n float node = 1.0 - smoothstep(0.0, 0.075 + 0.075 * r, abs(f));\n // antinodes \u2014 where it moves, and glows hot\n float anti = smoothstep(0.40, 0.95, abs(f));\n\n // the crown stays quiet \u2014 clears a reading zone under the type\n float open = smoothstep(0.14, 0.92, r);\n node *= open;\n anti *= open;\n\n vec3 deep = vec3(0.031, 0.055, 0.051);\n vec3 patina = vec3(0.306, 0.608, 0.541);\n vec3 bronze = vec3(0.847, 0.608, 0.247);\n vec3 ash = vec3(0.937, 0.914, 0.863);\n\n vec3 col = deep;\n col = mix(col, patina, node * 0.50);\n col = mix(col, bronze, anti * 0.22);\n col += ash * pow(node, 3.0) * 0.13;\n\n // shock ring travelling out from the strike\n float ring = smoothstep(0.06, 0.0, abs(r - u_strike * 2.3)) * (1.0 - u_strike);\n col += mix(bronze, ash, 0.4) * ring * 0.7;\n\n col *= mix(0.10, 1.0, smoothstep(2.0, 0.28, r));\n col += (hash(gl_FragCoord.xy) - 0.5) * 0.022;\n\n gl_FragColor = vec4(col, 1.0);\n }\n "; //# sourceMappingURL=bellFieldShaders.d.ts.map