export declare const PIXEL_GLYPHS_SKETCH = "\nfunction setup() {\n const bgMode = typeof backgroundMode !== 'undefined' ? backgroundMode : 'rgb';\n if (bgMode === 'white') background(245, 245, 245);\n else if (bgMode === 'black') background(10, 10, 10);\n else {\n const r = Math.floor((S.brightness / 100) * 255);\n const g = Math.floor((S.rhythmicity / 100) * 255);\n const b = Math.floor((S.harmonicity / 100) * 255);\n background(r, g, b);\n }\n\n const cols = Math.floor(map(S.length, 0, 100, 2, 18));\n const rows = Math.floor(map(S.length, 0, 100, 3, 24));\n const density = map(S.volume, 0, 100, 0.25, 0.6);\n const jitter = map(S.attack, 0, 100, 0, 0.25);\n const sparkRate = map(S.treble, 0, 100, 0.05, 0.45);\n const invertRate = map(S.dynamicRange, 0, 100, 0.05, 0.35);\n\n const margin = 140, gutter = 20, glyphRes = 7;\n const P = [[11,16,38],[255,51,102],[0,224,255],[255,209,102],[124,255,178],[138,43,226]];\n const cellW = (width - margin*2 - gutter*(cols - 1)) / cols;\n const cellH = (height - margin*2 - gutter*(rows - 1)) / rows;\n if (cellW <= 0 || cellH <= 0) return;\n\n noStroke();\n\n for (let gy = 0; gy < rows; gy++) {\n for (let gx = 0; gx < cols; gx++) {\n const cx = margin + gx * (cellW + gutter);\n const cy = margin + gy * (cellH + gutter);\n const invert = noise(gx * 0.4, gy * 0.3) < invertRate;\n const baseA = map(S.amplitude, 0, 100, 0.8, 1.0);\n const rndVal = noise(gx * 0.5, gy * 0.7);\n const baseIdx = 1 + Math.floor(rndVal * 5);\n const accentIdx = 1 + Math.floor(noise(gx + 3.3, gy + 4.4) * 5);\n const baseCol = invert ? [240, 245, 255] : P[baseIdx];\n const accCol = invert ? P[baseIdx] : P[accentIdx];\n\n const px = Math.floor((cellW * 0.84) / glyphRes);\n const py = Math.floor((cellH * 0.84) / glyphRes);\n const gw = px * glyphRes, gh = py * glyphRes;\n const ox = cx + Math.floor((cellW - gw) * 0.5);\n const oy = cy + Math.floor((cellH - gh) * 0.5);\n\n for (let j = 0; j < glyphRes; j++) {\n for (let i = 0; i < Math.ceil(glyphRes / 2); i++) {\n const pNoise = noise(gx * 0.51 + i * 0.19, gy * 0.47 + j * 0.21);\n const p = density + (pNoise - 0.5) * 0.35;\n if (random() < constrain(p, 0.05, 0.9)) {\n const jx = Math.floor((random() - 0.5) * jitter * px);\n const jy = Math.floor((random() - 0.5) * jitter * py);\n const x0 = ox + i * px + jx;\n const y0 = oy + j * py + jy;\n \n fill(baseCol[0], baseCol[1], baseCol[2], baseA * 255);\n rect(x0, y0, px, py);\n const mi = glyphRes - 1 - i;\n rect(ox + mi * px - jx, y0, px, py);\n \n if (random() < sparkRate) {\n fill(accCol[0], accCol[1], accCol[2], baseA * 255);\n rect(x0 + px * 0.2, y0 + py * 0.2, px * 0.6, py * 0.6);\n }\n }\n }\n }\n }\n }\n}\n"; export default PIXEL_GLYPHS_SKETCH; //# sourceMappingURL=pixelGlyphs.d.ts.map