{"version":3,"file":"CursorMeshGradient.CMm9s7Pg.mjs","names":["React.useRef"],"sources":["https:/framerusercontent.com/modules/7Me1TbrAhZHttBtlJlQm/2RBzux1bvgC00vWuEwsZ/CursorMeshGradient.js"],"sourcesContent":["// @framerSupportedLayoutWidth any\n// @framerSupportedLayoutHeight any\n// @framerIntrinsicWidth 1200\n// @framerIntrinsicHeight 980\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export const defaultSize={width:1200,height:980};const BAKED_AMPLITUDE=1.37// baked-in: overall morph gain\n;function hexToRgb01(hex){const h=hex.replace(\"#\",\"\").trim();const full=h.length===3?h.split(\"\").map(c=>c+c).join(\"\"):h;const n=parseInt(full,16);const r=n>>16&255;const g=n>>8&255;const b=n&255;return[r/255,g/255,b/255];}function parseColorToRgb01(input,fallbackHex){const s=(input??\"\").trim();if(!s)return hexToRgb01(fallbackHex);if(s.startsWith(\"#\"))return hexToRgb01(s);const m=s.match(/rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)/i);if(m){const r=Math.max(0,Math.min(255,Number(m[1])));const g=Math.max(0,Math.min(255,Number(m[2])));const b=Math.max(0,Math.min(255,Number(m[3])));return[r/255,g/255,b/255];}return hexToRgb01(fallbackHex);}function sameColorList(a,b){if(a.length!==b.length)return false;for(let i=0;i<a.length;i++){if((a[i]??\"\").trim().toLowerCase()!==(b[i]??\"\").trim().toLowerCase())return false;}return true;}const DEFAULT_CUSTOM_VOID=\"#000000\";function pickPalette5(listRaw){const list=(listRaw??[]).filter(Boolean);if(list.length<=0)return[\"#ffffff\",\"#ffffff\",\"#ffffff\",\"#ffffff\",\"#ffffff\"];if(list.length===1)return[list[0],list[0],list[0],list[0],list[0]];if(list.length<5){const out=[];for(let i=0;i<5;i++)out[i]=list[i]??list[list.length-1];return out;}// Sample across the full list so adding colors matters in Custom.\nconst last=list.length-1;const idx=t=>Math.max(0,Math.min(last,Math.round(t*last)));return[list[idx(0)],list[idx(.25)],list[idx(.5)],list[idx(.75)],list[idx(1)]];}const PRESETS={// Heatmap (inky navy void → cyan glow → magenta pockets + orange accents) + cool highlight\nHeatmap:[\"#0EA0C8\",\"#63E7F5\",\"#C13A8C\",\"#FF7A2E\",\"#F7FDFF\"],// Placeholder palettes\n// Aurora (pastel sky glow: powder blue → blush → lilac) + soft highlight\nAurora:[\"#A9D7F7\",\"#F2A1B7\",\"#B7A5E8\",\"#8EC8F1\",\"#FFF6F0\"],// Nebula (teal/cyan core + rusty embers on charcoal)\nNebula:[\"#0B0F14\",\"#0F6E78\",\"#42C8D3\",\"#B44E32\",\"#E7D8C8\"],// Forest (creamy chartreuse → lime → deep green) + soft warm highlight\nForest:[\"#0E4029\",\"#43AB75\",\"#79B63B\",\"#C8F06B\",\"#F3F3DD\"],// Glacier (icy teal → cobalt → deep navy) + cool highlight\nGlacier:[\"#41C6F2\",\"#5AC4DB\",\"#A1EFFF\",\"#33E0FF\",\"#15304D\"],// Smoke (charcoal → slate → fog) + soft highlight\nSmoke:[\"#0A0A0B\",\"#1C1D20\",\"#6C717A\",\"#C7CCD2\",\"#F2F1EC\"],// Saffron (warm orange field → buttery light) + soft highlight\nSaffron:[\"#F57A10\",\"#FFA35E\",\"#F7C22E\",\"#F4F6B2\",\"#FFF8DC\"],// CyanPeach (cyan glow → warm peach/orange → cream highlight)\nCyanPeach:[\"#0EA0C8\",\"#63E7F5\",\"#E0662B\",\"#F1B86A\",\"#FFF2D6\"],// WarmFuzz (lavender haze → blush → peach → butter gold) + warm highlight (less blowout)\nWarmFuzz:[\"#D8C7EC\",\"#F3B7C6\",\"#F7CFA3\",\"#E7B85A\",\"#F6E9DA\"],// Lime (electric lime → chartreuse → soft yellow) + creamy highlight\nLime:[\"#5FD81A\",\"#8CFF3A\",\"#CFFF6A\",\"#FFF08A\",\"#F8FFF0\"],// DeepGlow (inky navy → aurora purple → teal glow) + cool highlight\nDeepGlow:[\"#14223D\",\"#3A5474\",\"#B7A5E8\",\"#39D3B4\",\"#EAF2FF\"],// NorthernLights (inky void → aurora purple → teal → neon green) + icy highlight\nNorthernLights:[\"#18264D\",\"#B7A5E8\",\"#39D3B4\",\"#7CFFB7\",\"#EAF2FF\"]};const PRESET_VOID={// Deep inky base tones per palette (acts as the \"background\" stop)\n// Heatmap: inky navy base (matches reference)\nHeatmap:\"#070B1C\",Aurora:\"#07182C\",Nebula:\"#071214\",Forest:\"#79C969\",Glacier:\"#5FBEE3\",Smoke:\"#101115\",// Saffron: warm orange/brown \"paper\" base (avoid near-black voids)\nSaffron:\"#8A3A12\",// CyanPeach: warm beige void from reference\nCyanPeach:\"#E7CDB3\",// WarmFuzz: soft rosy-lavender base (light + warm, less blowout)\nWarmFuzz:\"#E2CBD6\",// Lime: light lime base (keeps it airy; avoids overexposure)\nLime:\"#D7FFB3\",// DeepGlow: inky blue void (matches reference)\nDeepGlow:\"#061226\",// NorthernLights: deep twilight navy\nNorthernLights:\"#040D20\"};// Vertex shader: fullscreen quad (TRIANGLE_STRIP)\nconst VERT=`\nattribute vec2 a_pos;\nvarying vec2 v_uv;\nvoid main() {\n  gl_Position = vec4(a_pos, 0.0, 1.0);\n  v_uv = a_pos * 0.5 + 0.5;\n}\n`;// Fragment shader: cursor-driven mesh gradient (u_mouse domain warping).\n// Uniforms: u_time, u_mouse, u_res, u_colors[].\nconst FRAG=`\nprecision highp float;\nvarying vec2 v_uv;\n\nuniform vec2 u_res;\nuniform vec2 u_mouse;   // smoothed cursor position (pixels)\nuniform float u_time;\nuniform vec3 u_voidColor;\nuniform vec3 u_colors[5];\n\nuniform float u_drift;\nuniform float u_scale; // band scale (isolated from cursor)\nuniform float u_warp;\nuniform float u_grainOverlay;\nuniform float u_grainMixer;\nuniform float u_bloom;\nuniform float u_renderScale;\n\n// ---- simplex noise DF field -------------------------------\nvec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec3 permute(vec3 x) { return mod289(((x * 34.0) + 1.0) * x); }\n\nvec2 random2(vec2 st) {\n  st = vec2(dot(st, vec2(97.1, 311.7)), dot(st, vec2(69.5, 183.3)));\n  return -1.0 + 2.0 * fract(sin(st) * 43758.5453123);\n}\n\nfloat mapRange(float value, float min1, float max1, float min2, float max2) {\n  return min2 + (value - min1) * (max2 - min2) / (max1 - min1);\n}\n\nfloat snoise(vec2 v) {\n  const vec4 C = vec4(\n    0.211324865405187,  // (3.0-sqrt(3.0))/6.0\n    0.366025403784439,  // 0.5*(sqrt(3.0)-1.0)\n    -0.577350269189626, // -1.0 + 2.0 * C.x\n    0.024390243902439   // 1.0 / 41.0\n  );\n  vec2 i  = floor(v + dot(v, C.yy));\n  vec2 x0 = v - i + dot(i, C.xx);\n  vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n  vec4 x12 = x0.xyxy + C.xxzz;\n  x12.xy -= i1;\n  i = mod289(i);\n  vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0));\n  vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy), dot(x12.zw, x12.zw)), 0.0);\n  m = m * m;\n  m = m * m;\n  vec3 x = 2.0 * fract(p * C.www) - 1.0;\n  vec3 h = abs(x) - 0.5;\n  vec3 ox = floor(x + 0.5);\n  vec3 a0 = x - ox;\n  m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n  vec3 g;\n  g.x  = a0.x * x0.x + h.x * x0.y;\n  g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n  return 130.0 * dot(m, g);\n}\n\n// --- Main -----------------------------------------------------------------\nvoid main() {\n  vec2 res = max(u_res, vec2(1.0));\n\n  // (3) Normalized coords: st from gl_FragCoord, aspect correction, upward bias\n  vec2 st = gl_FragCoord.xy / (res * u_renderScale);\n  st.x *= res.x / res.y;\n  st.y += 0.5;\n\n  // (A) Time + mouse Y adds subtle animated offset\n  float xoff = snoise(st + u_time * 0.015) * (u_mouse.y / res.y) * 0.1;\n  st.x += xoff;\n\n  // (B) Scale: higher = more zoomed in (fewer bands), lower = more zoomed out (more bands)\n  float sc = mix(0.68, 0.18, clamp(u_scale, 0.0, 2.5) / 2.5);\n  vec2 pos = st * vec2(1.0, 2.2) * sc;\n\n  // Wandering: sin/cos orbital path (cheap, smooth, graceful)\n  float t = u_time * u_drift;\n  float driftAmp = 0.12 * step(0.001, u_drift);\n  vec2 driftOff = vec2(sin(t * 0.018), cos(t * 0.023)) * driftAmp;\n  vec2 posDrift = pos + driftOff;\n\n  // (C) Domain warping: DF layers, one anchored to mouse (vel = u_mouse/res*0.9)\n  float DF = 0.0;\n  vec2 vel = vec2(20.3, 0.6);\n  float a1 = mapRange(u_mouse.x, 0.0, res.x, 0.2, 0.8);\n  float a2 = mapRange(u_mouse.x, 0.0, res.x, 0.1, 0.8);\n  DF += snoise(posDrift + vel) * a1;\n  vel = vec2(u_mouse / res * 0.9);\n  DF += snoise(posDrift + vel) * a2;\n  DF += 0.37;\n\n  // Drift: organic morphing — single rateMod, derived time bases (fewer snoise = perf)\n  float tSlow = t * 0.025;\n  float rateMod = clamp(0.5 + 0.5 * snoise(vec2(tSlow, 7.0)), 0.0, 1.0);\n  float dtWarp = t * (0.06 + 0.03 * rateMod);\n  float dA = snoise(vec2(dtWarp, 11.0));\n  float dB = snoise(vec2(dtWarp * 1.37 + 3.0, 23.0));\n  float morph = (0.18 + 0.55 * u_warp) * ${BAKED_AMPLITUDE};\n  vec2 warp = vec2(dA, dB) * morph * 0.52;\n\n  DF += snoise(posDrift + warp * vec2(1.0, 1.18)) * (u_mouse.y / res.y) * 0.10 * (0.65 + 0.55 * u_warp);\n  DF += snoise(posDrift * (1.0 + 0.12 * dA)) * (0.22 * morph);\n\n  // Shared monotonic base, phased (no r1/r2 = 2 fewer snoise calls)\n  float dtV1 = dtWarp * 0.88;\n  float dtV2 = dtWarp * 1.12;\n  float dtW1 = dtWarp * 0.92;\n  float dtW2 = dtWarp * 1.18;\n  float dtPA = dtWarp * 1.05;\n  float dtPB = dtWarp * 1.22;\n  float tA = snoise(st * 0.22 + vec2(17.0, 4.0));\n  float tB = snoise(st * 0.46 + vec2(3.0, 29.0));\n  float tF = clamp(0.5 + 0.5 * (0.65 * tA + 0.35 * tB), 0.0, 1.0);\n  float pivot = 0.52;\n  float dfScale = mix(0.60, 0.90, tF);\n  DF = pivot + (DF - pivot) * dfScale;\n  DF += (tF - 0.5) * 0.018;\n\n  vec3 color0 = u_voidColor;\n  vec3 c1 = u_colors[0];\n  vec3 c2 = u_colors[1];\n  vec3 c3 = u_colors[2];\n  vec3 c4 = u_colors[3];\n  vec3 cH = u_colors[4];\n\n  // Subtle void gradient:\n  // Use a smooth, deterministic spatial ramp (not macro-noise).\n  float vg = 0.5 + 0.5 * (0.85 * (v_uv.x - 0.5) - 0.65 * (v_uv.y - 0.5));\n  vg = clamp(vg, 0.0, 1.0);\n  float darkAmt = 0.06 + 0.18 * (1.0 - vg); // 0.06..0.24\n  vec3 voidBase = mix(color0, color0 * 0.55, darkAmt);\n\n  // Void richness (better anti-smear strategy):\n  // - Deep void stays clean (no macro blotches)\n  // - Richness lives ONLY near transitions (where it feels intentional)\n  // - Never allow void variation to darken below the base (prevents \"dirty smears\")\n  float v1 = snoise(st * 2.40 + vec2(12.3, 9.7) + dtV1 * 0.28);\n  float v2 = snoise(st * 4.20 + vec2(3.9, 21.1) + dtV2 * 0.18);\n  float voidTex = clamp(0.5 + 0.5 * (0.60 * v1 + 0.40 * v2), 0.0, 1.0); // 0..1\n\n  // Transition zone near the first band boundary (no deep-void macro texture)\n  float edgeLo = smoothstep(0.06, 0.18, DF);\n  float edgeHi = 1.0 - smoothstep(0.24, 0.42, DF);\n  float edgeZone = clamp(edgeLo * edgeHi, 0.0, 1.0);\n  edgeZone = edgeZone * edgeZone; // tighten\n\n  // Borrow richness from warm/mid bands + highlight (avoid muddy cool mixes)\n  vec3 midWarm = 0.5 * (c3 + c4);\n  vec3 voidTint = mix(voidBase, midWarm, 0.18);\n  voidTint = mix(voidTint, cH, 0.10);\n  vec3 voidRich = mix(voidBase, voidTint, (0.10 + 0.18 * voidTex) * edgeZone);\n\n  // Luma-safe: never let the richness locally darken below the base\n  float l0 = dot(voidBase, vec3(0.2126, 0.7152, 0.0722));\n  float lr = dot(voidRich, vec3(0.2126, 0.7152, 0.0722));\n  float dark = clamp((l0 - lr) * 6.0, 0.0, 1.0);\n  voidRich = mix(voidRich, voidBase, dark);\n\n  // Threshold widths: Edge Grain is an eased \"softness\" control for seams\n  // u_grainMixer is 0..3 from the Inspector; normalize to 0..1 for shaping.\n  float gm = clamp(u_grainMixer / 3.0, 0.0, 1.0);\n  gm = pow(gm, 1.9); // gentler ramp at low values\n  float soft = mix(0.06, 0.12, gm);\n\n  // Bandwidth floor (built-in):\n  // Expand threshold windows locally, but never shrink them, so the thinnest parts stay thick.\n  float w1 = snoise(st * 0.55 + vec2(2.0, 7.0) + dtW1 * 0.10);\n  float w2 = snoise(st * 0.95 + vec2(9.0, 1.0) + dtW2 * 0.07);\n  float w = clamp(0.5 + 0.5 * (0.70 * w1 + 0.30 * w2), 0.0, 1.0);\n  float bw = mix(0.030, 0.140, w); // expand-only (strong floor)\n  float softL = soft * (1.0 + 0.28 * (w - 0.5));\n  float th = (dB * 0.070 + dA * 0.045) * morph;\n\n  // Multi-stop blend for warmer, more cohesive transitions.\n  vec3 base0 = voidRich;\n\n  // Accent pockets (refined):\n  // Instead of blob islands (which can read as \"tumors\"), treat the accent stop (c3)\n  // as a subtle tint variation *within* the c4 region, so it blends naturally.\n  float pA = snoise(st * 1.10 + vec2(51.2, 12.7) + dtPA * 0.10);\n  float pB = snoise(st * 1.90 + vec2(8.9, 73.1) + dtPB * 0.07);\n  float pF = 0.5 + 0.5 * (0.62 * pA + 0.38 * pB); // 0..1\n  pF = smoothstep(0.25, 0.85, pF);\n  float hostLo = smoothstep(0.50, 0.62, DF);\n  float hostHi = 1.0 - smoothstep(0.70, 0.84, DF);\n  float host = clamp(hostLo * hostHi, 0.0, 1.0);\n  host = host * host;\n  float pocket = 0.14 * pF * host; // subtle\n  vec3 c4p = mix(c4, c3, pocket);\n\n  vec3 col = mix(base0, c1, smoothstep(0.08 - softL + th - bw*0.55, 0.38 + softL + th + bw*0.85, DF));\n  col = mix(col, c2, smoothstep(0.26 - softL + th - bw*0.45, 0.52 + softL + th + bw*0.70, DF));\n  col = mix(col, c3, smoothstep(0.36 - softL + th - bw*0.35, 0.64 + softL + th + bw*0.60, DF));\n  col = mix(col, c4p, smoothstep(0.48 - softL + th - bw*0.25, 0.76 + softL + th + bw*0.55, DF));\n  col = mix(col, base0, smoothstep(0.56 - softL + th - bw*0.20, 0.92 + softL + th + bw*0.45, DF));\n\n  // Procedural luminance grain: random2(st) → snoise → add equally to R/G/B (film-like, hides banding)\n  vec2 stGrain = gl_FragCoord.xy / (res * u_renderScale);\n  col += vec3(snoise(random2(stGrain)) * (0.05 * u_grainOverlay));\n\n  // Bloom (single-pass): highlight lift (not a blur/glow kernel).\n  float bloom = max(0.0, u_bloom);\n  bloom = pow(bloom, 1.35);\n  float luma = dot(col, vec3(0.2126, 0.7152, 0.0722));\n  float hi = smoothstep(0.45, 0.95, luma);\n  hi *= hi;\n  col += (col * 0.28 + cH * 0.22) * hi * bloom;\n\n  // Vignette (site has a strong dark mass / edge falloff)\n  vec2 p = (v_uv - 0.5);\n  p.x *= res.x / res.y;\n  float vv = length(p * vec2(1.05, 0.85));\n  float vign = smoothstep(1.10, 0.30, vv);\n  col *= mix(0.55, 1.0, vign);\n\n  gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);\n}\n`;function compileShader(gl,type,source){const sh=gl.createShader(type);if(!sh)throw new Error(\"Failed to create shader\");gl.shaderSource(sh,source);gl.compileShader(sh);if(!gl.getShaderParameter(sh,gl.COMPILE_STATUS)){const info=gl.getShaderInfoLog(sh)||\"Unknown shader error\";gl.deleteShader(sh);throw new Error(info);}return sh;}function createProgram(gl,vertSrc,fragSrc){const vs=compileShader(gl,gl.VERTEX_SHADER,vertSrc);const fs=compileShader(gl,gl.FRAGMENT_SHADER,fragSrc);const prog=gl.createProgram();if(!prog)throw new Error(\"Failed to create program\");gl.attachShader(prog,vs);gl.attachShader(prog,fs);gl.linkProgram(prog);gl.deleteShader(vs);gl.deleteShader(fs);if(!gl.getProgramParameter(prog,gl.LINK_STATUS)){const info=gl.getProgramInfoLog(prog)||\"Unknown link error\";gl.deleteProgram(prog);throw new Error(info);}return prog;}/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 980\n */export default function CursorMeshGradient(props){const{gradientSource=\"Preset\",preset=\"Aurora\",voidColor=\"#000000\",bandColors=PRESETS.Aurora,drift=.15,driftMode=true,liquidLag=.98,sensitivity=1.4,scale=1.85,warpStrength=2,grainStrength=1.4,grainMixerStrength=.18,bloomStrength=.22,style}=props;const containerRef=React.useRef(null);const canvasRef=React.useRef(null);const glRef=React.useRef(null);const programRef=React.useRef(null);const rafRef=React.useRef(null);const isAnimatingRef=React.useRef(false);const sizeRef=React.useRef({w:1,h:1,dpr:1});const renderScaleRef=React.useRef(1);const frameCountRef=React.useRef(0);const slowFrameCountRef=React.useRef(0);const fastFrameCountRef=React.useRef(0);const mouseTargetRef=React.useRef([0,0]);const mouseSmoothRef=React.useRef([0,0]);const phaseRef=React.useRef(0);const phaseTargetRef=React.useRef(0);const driftRef=React.useRef(drift);const driftModeRef=React.useRef(driftMode);const liquidLagRef=React.useRef(liquidLag);const sensitivityRef=React.useRef(sensitivity);const scaleRef=React.useRef(scale);const warpStrengthRef=React.useRef(warpStrength);const grainStrengthRef=React.useRef(grainStrength);const grainMixerStrengthRef=React.useRef(grainMixerStrength);const bloomStrengthRef=React.useRef(bloomStrength);const gradientSourceRef=React.useRef(gradientSource);const presetRef=React.useRef(preset);const voidColorRef=React.useRef(voidColor);const bandColorsRef=React.useRef(bandColors);const paletteDirtyRef=React.useRef(true);const packedRef=React.useRef(new Float32Array(5*3));const voidRgbRef=React.useRef([0,0,0]);const paletteSentRef=React.useRef(false);const isDrawingRef=React.useRef(false);const lastTimeRef=React.useRef(null);const customEditedRef=React.useRef(false);const mouseInitializedRef=React.useRef(false);const startLoopRef=React.useRef(null);React.useEffect(()=>{if(gradientSource!==\"Custom\")return;// Once the user changes any custom color away from the initial defaults,\n// keep that custom palette \"sticky\" across toggles.\nconst bands=(bandColors??[]).filter(Boolean);const isDefaultBands=sameColorList(bands,PRESETS.Heatmap);const isDefaultVoid=(voidColor??\"\").trim().toLowerCase()===DEFAULT_CUSTOM_VOID;if(!(isDefaultBands&&isDefaultVoid))customEditedRef.current=true;},[gradientSource,bandColors,voidColor]);React.useEffect(()=>{driftRef.current=drift;driftModeRef.current=driftMode;liquidLagRef.current=liquidLag;sensitivityRef.current=sensitivity;scaleRef.current=scale;warpStrengthRef.current=warpStrength;grainStrengthRef.current=grainStrength;grainMixerStrengthRef.current=grainMixerStrength;bloomStrengthRef.current=bloomStrength;},[drift,driftMode,liquidLag,sensitivity,scale,warpStrength,grainStrength,grainMixerStrength,bloomStrength]);React.useEffect(()=>{gradientSourceRef.current=gradientSource;presetRef.current=preset;voidColorRef.current=voidColor;bandColorsRef.current=bandColors;paletteDirtyRef.current=true;paletteSentRef.current=false;},[gradientSource,preset,voidColor,bandColors]);// (2) Capture mouse: mousemove updates target; transform X scale and Y offset\nReact.useEffect(()=>{const onMouseMove=e=>{const container=containerRef.current;if(!container)return;const rect=container.getBoundingClientRect();const sens=sensitivityRef.current;const mx=(e.clientX-rect.left)*sens;const my=(e.clientY-rect.top)*sens;mouseTargetRef.current=[mx,my];if(!mouseInitializedRef.current)mouseInitializedRef.current=true;};document.addEventListener(\"mousemove\",onMouseMove);return()=>document.removeEventListener(\"mousemove\",onMouseMove);},[]);// Pause when tab hidden, resume when visible (performance).\nReact.useEffect(()=>{const onVis=()=>{if(document.visibilityState===\"visible\"){frameCountRef.current=0;slowFrameCountRef.current=0;fastFrameCountRef.current=0;startLoopRef.current?.();}else{if(rafRef.current)cancelAnimationFrame(rafRef.current);rafRef.current=null;isAnimatingRef.current=false;lastTimeRef.current=null;}};document.addEventListener(\"visibilitychange\",onVis);return()=>document.removeEventListener(\"visibilitychange\",onVis);},[]);// Resize handling\nReact.useEffect(()=>{const canvas=canvasRef.current;const container=containerRef.current;if(!canvas||!container)return;const updateSize=()=>{const dpr=Math.max(1,Math.min(1.5,window.devicePixelRatio||1));const w=container.clientWidth;const h=container.clientHeight;sizeRef.current={w:Math.max(1,w),h:Math.max(1,h),dpr};};updateSize();const ro=new ResizeObserver(()=>updateSize());ro.observe(container);return()=>ro?.disconnect();},[]);// WebGL init + loop\nReact.useEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;const gl=canvas.getContext(\"webgl\",{alpha:true,antialias:false,depth:false,stencil:false,premultipliedAlpha:true,preserveDrawingBuffer:false})??null;if(!gl)return;glRef.current=gl;const QuadVerts=new Float32Array([1,1,-1,1,1,-1,-1,-1]);const setupProgram=()=>{try{const prog=createProgram(gl,VERT,FRAG);programRef.current=prog;gl.useProgram(prog);const buf=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,buf);gl.bufferData(gl.ARRAY_BUFFER,QuadVerts,gl.STATIC_DRAW);const aPos=gl.getAttribLocation(prog,\"a_pos\");gl.enableVertexAttribArray(aPos);gl.vertexAttribPointer(aPos,2,gl.FLOAT,false,0,0);return prog;}catch(e){console.warn(\"[CursorMeshGradient] Shader error:\",e);return null;}};let program=setupProgram();if(!program)return;const getUniforms=prog=>({uTime:gl.getUniformLocation(prog,\"u_time\"),uMouse:gl.getUniformLocation(prog,\"u_mouse\"),uRes:gl.getUniformLocation(prog,\"u_res\"),uVoid:gl.getUniformLocation(prog,\"u_voidColor\"),uColors0:gl.getUniformLocation(prog,\"u_colors[0]\"),uDrift:gl.getUniformLocation(prog,\"u_drift\"),uScale:gl.getUniformLocation(prog,\"u_scale\"),uWarp:gl.getUniformLocation(prog,\"u_warp\"),uGrainOverlay:gl.getUniformLocation(prog,\"u_grainOverlay\"),uGrainMixer:gl.getUniformLocation(prog,\"u_grainMixer\"),uBloom:gl.getUniformLocation(prog,\"u_bloom\"),uRenderScale:gl.getUniformLocation(prog,\"u_renderScale\")});let uniforms=getUniforms(program);const onContextLost=e=>{e.preventDefault();if(rafRef.current)cancelAnimationFrame(rafRef.current);rafRef.current=null;isAnimatingRef.current=false;};const onContextRestored=()=>{program=setupProgram();if(program){uniforms=getUniforms(program);startLoopRef.current?.();}};canvas.addEventListener(\"webglcontextlost\",onContextLost);canvas.addEventListener(\"webglcontextrestored\",onContextRestored);const ensurePalette=()=>{if(!paletteDirtyRef.current&&paletteSentRef.current)return;const gradientSourceNow=gradientSourceRef.current;const presetNow=presetRef.current;const voidColorNow=voidColorRef.current;const bandColorsNow=bandColorsRef.current;const presetCols=PRESETS[presetNow]??PRESETS.Aurora;const presetVoid=PRESET_VOID[presetNow]??\"#000000\";const customBands=(bandColorsNow??[]).filter(Boolean);const isDefaultBands=sameColorList(customBands,PRESETS.Heatmap);const isDefaultVoid=(voidColorNow??\"\").trim().toLowerCase()===DEFAULT_CUSTOM_VOID;const seedCustomFromPreset=gradientSourceNow===\"Custom\"&&!customEditedRef.current&&isDefaultBands&&isDefaultVoid;const colsRaw=gradientSourceNow===\"Custom\"?seedCustomFromPreset?presetCols:customBands:presetCols;const cols=pickPalette5(colsRaw);const packed=packedRef.current;for(let i=0;i<5;i++){const[r,g,b]=parseColorToRgb01(cols[i],\"#ffffff\");packed[i*3+0]=r;packed[i*3+1]=g;packed[i*3+2]=b;}const voidHex=gradientSourceNow===\"Custom\"?seedCustomFromPreset?presetVoid:voidColorNow:presetVoid;voidRgbRef.current=parseColorToRgb01(voidHex,presetVoid);paletteDirtyRef.current=false;paletteSentRef.current=true;};const drawFrame=nowMs=>{if(isDrawingRef.current)return;isDrawingRef.current=true;try{const glNow=glRef.current;const progNow=programRef.current;if(!glNow||!progNow)return;const last=lastTimeRef.current??nowMs;let dt=(nowMs-last)/1e3;dt=Math.max(0,Math.min(.1,dt));lastTimeRef.current=nowMs;const{w,h,dpr}=sizeRef.current;const fallbackMouse=[w/2,h/2];// (2) Low-pass filter: higher liquidLag = more lag (slower catch-up)\nconst lag=Math.max(.1,Math.min(1,liquidLagRef.current));const easing=Math.max(.005,.5-lag*.495)// 0.5 (fast) to 0.005 (slow)\n;const[targetX,targetY]=mouseInitializedRef.current?mouseTargetRef.current:fallbackMouse;let[smoothX,smoothY]=mouseSmoothRef.current;// Before first mousemove: keep smooth at center so cursor entry eases smoothly (no snap)\nif(!mouseInitializedRef.current){[smoothX,smoothY]=fallbackMouse;mouseSmoothRef.current=fallbackMouse;}const dx=targetX-smoothX;const dy=targetY-smoothY;smoothX=Math.abs(dx)>.05?smoothX+dx*easing:targetX;smoothY=Math.abs(dy)>.05?smoothY+dy*easing:targetY;// Clamp to scaled range so high sensitivity doesn't create dead zones (past 50% at sens=2)\nconst sens=sensitivityRef.current;const maxX=w*sens;const maxY=h*sens;smoothX=Math.max(0,Math.min(maxX,smoothX));smoothY=Math.max(0,Math.min(maxY,smoothY));mouseSmoothRef.current=[smoothX,smoothY];const dr=driftModeRef.current?Math.max(0,driftRef.current):0;phaseTargetRef.current+=dr*dt*10;phaseRef.current+=(phaseTargetRef.current-phaseRef.current)*.12;// Adaptive resolution scaling (built-in).\nconst renderScale=renderScaleRef.current;const effDpr=dpr*renderScale;const cw=Math.max(1,Math.floor(w*effDpr));const ch=Math.max(1,Math.floor(h*effDpr));if(canvas.width!==cw||canvas.height!==ch){canvas.width=cw;canvas.height=ch;glNow.viewport(0,0,cw,ch);}glNow.useProgram(progNow);ensurePalette();const u=uniforms;if(u.uTime)glNow.uniform1f(u.uTime,phaseRef.current);if(u.uMouse)glNow.uniform2f(u.uMouse,smoothX,smoothY);if(u.uRes)glNow.uniform2f(u.uRes,w,h);if(u.uColors0)glNow.uniform3fv(u.uColors0,packedRef.current);const[vr,vg,vb]=voidRgbRef.current;if(u.uVoid)glNow.uniform3f(u.uVoid,vr,vg,vb);if(u.uDrift)glNow.uniform1f(u.uDrift,driftModeRef.current?Math.max(0,dr):0);if(u.uScale)glNow.uniform1f(u.uScale,Math.max(0,Math.min(2.5,scaleRef.current)));if(u.uWarp)glNow.uniform1f(u.uWarp,Math.max(.2,warpStrengthRef.current));if(u.uGrainOverlay)glNow.uniform1f(u.uGrainOverlay,Math.max(0,grainStrengthRef.current));if(u.uGrainMixer)glNow.uniform1f(u.uGrainMixer,Math.max(0,grainMixerStrengthRef.current));if(u.uBloom)glNow.uniform1f(u.uBloom,Math.max(0,bloomStrengthRef.current));const rs=Math.max(.001,renderScale);if(u.uRenderScale)glNow.uniform1f(u.uRenderScale,rs);glNow.drawArrays(glNow.TRIANGLE_STRIP,0,4);// Adaptive resolution: warm-up + hysteresis to prevent preview shake\nframeCountRef.current+=1;if(isAnimatingRef.current&&frameCountRef.current>90){const targetScaleLow=.7;const targetScaleHigh=1;if(dt>.025){slowFrameCountRef.current+=1;fastFrameCountRef.current=0;if(slowFrameCountRef.current>=4&&renderScaleRef.current>targetScaleLow){renderScaleRef.current=Math.max(targetScaleLow,renderScaleRef.current-.05);slowFrameCountRef.current=0;}}else if(dt<.016&&dt>.001){fastFrameCountRef.current+=1;slowFrameCountRef.current=0;if(fastFrameCountRef.current>=6&&renderScaleRef.current<targetScaleHigh){renderScaleRef.current=Math.min(targetScaleHigh,renderScaleRef.current+.02);fastFrameCountRef.current=0;}}else{slowFrameCountRef.current=0;fastFrameCountRef.current=0;}}}finally{isDrawingRef.current=false;}};const tick=nowMs=>{drawFrame(nowMs);rafRef.current=requestAnimationFrame(tick);};startLoopRef.current=()=>{if(isAnimatingRef.current)return;isAnimatingRef.current=true;rafRef.current=requestAnimationFrame(tick);};startLoopRef.current();return()=>{canvas.removeEventListener(\"webglcontextlost\",onContextLost);canvas.removeEventListener(\"webglcontextrestored\",onContextRestored);startLoopRef.current=null;if(rafRef.current)cancelAnimationFrame(rafRef.current);rafRef.current=null;isAnimatingRef.current=false;lastTimeRef.current=null;try{if(programRef.current)gl.deleteProgram(programRef.current);}catch{}programRef.current=null;glRef.current=null;};},[]);const wrapperStyle={position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",pointerEvents:\"none\",...style};const canvasStyle={width:\"100%\",height:\"100%\",display:\"block\"};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:wrapperStyle,children:/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:canvasStyle})});}addPropertyControls(CursorMeshGradient,{gradientSource:{type:ControlType.Enum,title:\"Gradient\",options:[\"Preset\",\"Custom\"],optionTitles:[\"Preset\",\"Custom\"],defaultValue:\"Preset\",description:\"Preset or Custom (first Custom uses current preset).\"},preset:{type:ControlType.Enum,title:\"Preset\",description:\"Color palette preset.\",options:[\"Aurora\",\"Glacier\",\"Forest\",\"Smoke\",\"WarmFuzz\",\"NorthernLights\"],optionTitles:[\"Moonwash\",\"Glacier\",\"Cucumber\",\"Smoke\",\"Warm fuzz\",\"Northern lights\"],defaultValue:\"Smoke\",hidden(props){return props.gradientSource!==\"Preset\";}},voidColor:{type:ControlType.Color,title:\"Void\",description:'Base \"background\" color stop.',defaultValue:\"#000000\",hidden(props){return props.gradientSource!==\"Custom\";}},bandColors:{type:ControlType.Array,title:\"Bands\",control:{type:ControlType.Color},defaultValue:PRESETS.Heatmap,description:\"Band colors (sampled across; last acts as highlight).\",hidden(props){return props.gradientSource!==\"Custom\";}},driftMode:{type:ControlType.Boolean,title:\"Drift Mode\",description:\"When turned on, the gradient will drift and morph on its own even when there is no cursor movement.\",defaultValue:true},drift:{type:ControlType.Number,title:\"Drift\",description:\"How fast the gradient morphs on its own (warp, bands, void).\",defaultValue:.15,min:0,max:.6,step:.01,hidden(props){return!props.driftMode;}},scale:{type:ControlType.Number,title:\"Scale\",description:\"Higher = more zoomed in. Lower = more zoomed out.\",defaultValue:1.85,min:0,max:2.5,step:.05},sensitivity:{type:ControlType.Number,title:\"Sensitivity\",description:\"How much cursor motion drives the reaction (warp, morph). Scale is separate.\",defaultValue:1.4,min:.2,max:2,step:.01},warpStrength:{type:ControlType.Number,title:\"Distortion\",description:\"Shape distortion amount.\",defaultValue:2,min:.2,max:2,step:.01},liquidLag:{type:ControlType.Number,title:\"Liquid Lag\",description:\"Higher = more lag, cursor trails behind more.\",defaultValue:.98,min:.1,max:1,step:.02},grainStrength:{type:ControlType.Number,title:\"Grain\",description:\"More or less grainy.\",defaultValue:1.4,min:0,max:2,step:.01},grainMixerStrength:{type:ControlType.Number,title:\"Edge Grain\",description:\"Softness of color boundaries.\",defaultValue:.18,min:0,max:3,step:.005},bloomStrength:{type:ControlType.Number,title:\"Bloom\",description:\"Boosts bright areas.\\n\\nComponent by [SOSOTAR](https://www.framer.com/%40sosotar/)\",defaultValue:.22,min:0,max:2,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"defaultSize\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"CursorMeshGradient\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerIntrinsicHeight\":\"980\",\"framerIntrinsicWidth\":\"1200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CursorMeshGradient.map"],"mappings":"+LAKC,SAAS,EAAW,EAAI,CAAC,IAAM,EAAE,EAAI,QAAQ,IAAI,EAAE,CAAC,CAAC,KAAK,EAAQ,EAAK,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAQ,EAAE,SAAS,EAAK,EAAE,EAAQ,EAAE,GAAG,GAAG,IAAU,EAAE,GAAG,EAAE,IAAU,EAAE,EAAE,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG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