export declare const LOOM_WEAVE_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 threadsX = Math.round(map(S.rhythmicity, 0, 100, 4, 22));\n const threadsY = Math.round(map(S.volume, 0, 100, 4, 22));\n const margin = map(S.dynamicRange, 0, 100, 80, 220);\n const threadW = map(S.amplitude, 0, 100, 8, 26);\n const noiseFreq = map(S.harmonicity, 0, 100, 0.012, 0.035);\n const noiseAmp = map(S.aggression, 0, 100, 8, 38);\n const hueBase = map(S.hue, 0, 100, 0, 360);\n const warpHue = hueBase;\n const weftHue = (hueBase + 180) % 360;\n const brightness = map(S.brightness, 0, 100, 45, 75);\n const chroma = map(S.chroma, 0, 100, 70, 95);\n const alphaVal = map(S.attack, 0, 100, 0.8, 1.0);\n\n noStroke();\n\n for (let i = 0; i < threadsX; i++) {\n const xBase = margin + (width - 2 * margin) * (i / max(1, threadsX - 1));\n fill('hsla(' + warpHue + ',' + chroma + '%,' + brightness + '%,' + alphaVal + ')');\n beginShape();\n for (let y = 0; y <= height; y += 16) {\n const dx = map(noise(i * 0.25, y * noiseFreq), 0, 1, -noiseAmp, noiseAmp);\n vertex(xBase + dx - threadW / 2, y);\n }\n for (let y = height; y >= 0; y -= 16) {\n const dx = map(noise(i * 0.37, y * noiseFreq + 200), 0, 1, -noiseAmp, noiseAmp);\n vertex(xBase + dx + threadW / 2, y);\n }\n endShape(CLOSE);\n }\n\n for (let j = 0; j < threadsY; j++) {\n const yBase = margin + (height - 2 * margin) * (j / max(1, threadsY - 1));\n fill('hsla(' + weftHue + ',' + chroma + '%,' + brightness + '%,' + alphaVal + ')');\n beginShape();\n for (let x = 0; x <= width; x += 16) {\n const dy = map(noise(j * 0.25, x * noiseFreq), 0, 1, -noiseAmp, noiseAmp);\n vertex(x, yBase + dy - threadW / 2);\n }\n for (let x = width; x >= 0; x -= 16) {\n const dy = map(noise(j * 0.37, x * noiseFreq + 200), 0, 1, -noiseAmp, noiseAmp);\n vertex(x, yBase + dy + threadW / 2);\n }\n endShape(CLOSE);\n }\n}\n"; export default LOOM_WEAVE_SKETCH; //# sourceMappingURL=loomWeave.d.ts.map