{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/uPkD7RNUO1vmmtMstX6i/UuMuKV94f0TLVC5yiYVK/Dither_Archive.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{ControlType,addPropertyControls,RenderTarget}from\"framer\";import{useEffect,useMemo,useRef}from\"react\";import{useInView}from\"framer-motion\";// ------------------------------------------------------------ //\n// PROPERTY CONTROLS\n// ------------------------------------------------------------ //\naddPropertyControls(Dither,{image:{type:ControlType.ResponsiveImage},algorithm:{type:ControlType.Enum,title:\"Algorithm\",options:[\"floyd-steinberg\",\"ordered\",\"random\",\"atkinson\"],optionTitles:[\"Floyd-Steinberg\",\"Ordered (Bayer)\",\"Random\",\"Atkinson\"],defaultValue:\"floyd-steinberg\"},threshold:{type:ControlType.Number,title:\"Threshold\",defaultValue:128,min:0,max:255,step:1},brightness:{type:ControlType.Number,title:\"Brightness\",defaultValue:0,min:-100,max:100,step:1},midtones:{type:ControlType.Number,title:\"Midtones\",defaultValue:50,min:0,max:100,step:1},pixelSize:{type:ControlType.Number,title:\"Pixel Size\",defaultValue:1,min:1,max:100,step:1},glow:{type:ControlType.Number,title:\"Glow\",defaultValue:0,min:0,max:50,step:1},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},dotColor:{type:ControlType.Color,title:\"Pixel Color\",defaultValue:\"#FFFFFF\"},animation:{type:ControlType.Object,icon:\"effect\",title:\"Animation\",controls:{enabled:{type:ControlType.Boolean,title:\"Enabled\",defaultValue:false},canvasPreview:{type:ControlType.Boolean,title:\"Preview\",defaultValue:true,hidden:props=>!props.enabled},interval:{type:ControlType.Number,title:\"Interval\",defaultValue:.1,min:.01,max:5,step:.01,unit:\"s\",displayStepper:true,hidden:props=>!props.enabled},intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:10,min:0,max:100,hidden:props=>!props.enabled}}},radius:{// @ts-expect-error - BorderRadius is not in this NPM version\ntype:ControlType.BorderRadius,defaultValue:\"0px\",title:\"Radius\"},enabled:{type:ControlType.Boolean,title:\"Enabled\",defaultValue:true}});// ------------------------------------------------------------ //\n// DEFAULT PROPS\n// ------------------------------------------------------------ //\nDither.defaultProps={algorithm:\"floyd-steinberg\",threshold:128,pixelSize:1,brightness:0,glow:0,midtones:50,radius:0,backgroundColor:\"#000000\",dotColor:\"#ffffff\",animation:{enabled:false,canvasPreview:true,interval:.1,intensity:10},enabled:true};// ------------------------------------------------------------ //\n// MAIN COMPONENT\n// ------------------------------------------------------------ //\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n */export default function Dither(props){const isOnFramerCanvas=RenderTarget.hasRestrictions();const hasImage=\"image\"in props&&props.image;const canvasRef=useRef(null);const isInView=useInView(canvasRef,{once:false});const intensityTransformed=useMemo(()=>{return transformValue(props.animation.intensity,[0,100],[.001,10]);},[props.animation.intensity]);// Animation frame refs\nconst animationFrameRef=useRef(null);const lastTimeRef=useRef(0);const elapsedTimeRef=useRef(0);// Use refs instead of state for animated values\nconst animatedValuesRef=useRef({brightness:props.brightness,glow:props.glow});const handleProcessImage=()=>{if(!canvasRef.current)return;const canvas=canvasRef.current;const ctx=canvas.getContext(\"2d\",{willReadFrequently:true});if(!ctx)return;const img=new Image;img.crossOrigin=\"anonymous\";img.onload=()=>{try{// Calculate aspect ratio of original image\nconst aspectRatio=img.naturalWidth/img.naturalHeight;// Define a base resolution for consistent dithering (adjust as needed)\nconst baseResolution=800;// Calculate normalized dimensions based on pixel size and aspect ratio\nlet targetWidth,targetHeight;if(aspectRatio>=1){// Landscape or square\ntargetWidth=Math.floor(baseResolution/props.pixelSize);targetHeight=Math.floor(targetWidth/aspectRatio);}else{// Portrait\ntargetHeight=Math.floor(baseResolution/props.pixelSize);targetWidth=Math.floor(targetHeight*aspectRatio);}// Set canvas size to normalized dimensions\ncanvas.width=targetWidth;canvas.height=targetHeight;// Draw original image scaled to normalized size\nctx.imageSmoothingEnabled=false;ctx.drawImage(img,0,0,targetWidth,targetHeight);// Get image data\nconst imageData=ctx.getImageData(0,0,canvas.width,canvas.height);// Apply brightness adjustment using animated values\nconst brightAdjusted=DitherProcessor.adjustBrightness(imageData,animatedValuesRef.current.brightness);// Calculate adjusted threshold based on midtones\nconst adjustedThreshold=Math.round(props.threshold*props.midtones/50);// Apply selected dithering algorithm\nlet processedData;switch(props.algorithm){case\"floyd-steinberg\":processedData=DitherProcessor.floydSteinberg(brightAdjusted,adjustedThreshold,props.backgroundColor,props.dotColor);break;case\"ordered\":processedData=DitherProcessor.ordered(brightAdjusted,adjustedThreshold,props.backgroundColor,props.dotColor);break;case\"random\":processedData=DitherProcessor.random(brightAdjusted,adjustedThreshold,props.backgroundColor,props.dotColor);break;case\"atkinson\":processedData=DitherProcessor.atkinson(brightAdjusted,adjustedThreshold,props.backgroundColor,props.dotColor);break;default:processedData=DitherProcessor.floydSteinberg(brightAdjusted,adjustedThreshold,props.backgroundColor,props.dotColor);}// Apply glow effect using animated values\nconst glowProcessed=DitherProcessor.applyGlow(processedData,animatedValuesRef.current.glow);// Put processed image data back to canvas\nctx.putImageData(glowProcessed,0,0);}catch(err){console.error(\"Failed to process image\",err);}};img.src=props.image.src;};// Animation effect\nuseEffect(()=>{if(!props.animation.enabled||!isInView){animatedValuesRef.current={brightness:props.brightness,glow:props.glow};handleProcessImage();return;}if(isOnFramerCanvas&&!props.animation.canvasPreview){animatedValuesRef.current={brightness:props.brightness,glow:props.glow};handleProcessImage();return;}const generateRandomValue=baseValue=>{const variation=Math.abs(intensityTransformed);return baseValue+(Math.random()*2-1)*variation;};const animate=currentTime=>{if(!lastTimeRef.current){lastTimeRef.current=currentTime;}const deltaTime=currentTime-lastTimeRef.current;elapsedTimeRef.current+=deltaTime;// Check if enough time has passed based on interval\nif(elapsedTimeRef.current>=props.animation.interval*1e3){const newBrightness=generateRandomValue(props.brightness);animatedValuesRef.current={brightness:newBrightness,glow:props.glow};handleProcessImage()// Process image with new values\n;elapsedTimeRef.current=0// Reset elapsed time\n;}lastTimeRef.current=currentTime;animationFrameRef.current=requestAnimationFrame(animate);};// Start animation\nanimationFrameRef.current=requestAnimationFrame(animate);// Cleanup function\nreturn()=>{if(animationFrameRef.current){cancelAnimationFrame(animationFrameRef.current);}lastTimeRef.current=0;elapsedTimeRef.current=0;};},[props.animation.enabled,props.animation.interval,props.animation.intensity,props.animation.canvasPreview,props.brightness,props.glow,props.backgroundColor,props.dotColor,props.algorithm,props.threshold,props.pixelSize,props.midtones,isInView,props.enabled,intensityTransformed]);// Effect to handle image updates\nuseEffect(()=>{if(!hasImage)return;handleProcessImage();},[props.image,props.algorithm,props.threshold,props.pixelSize,props.midtones,props.backgroundColor,props.dotColor,hasImage,props.enabled]);const getAriaLabel=()=>{if(!props.image.alt){return`Image with ${props.algorithm} dithering applied`;}return`Dithered version of ${props.image.alt} with ${props.algorithm} dithering applied`;};if(!hasImage){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:\"#8855FF10\",color:\"#9966FF\",fontFamily:\"Inter\",fontSize:\"11px\",letterSpacing:\"-0.03em\",fontWeight:400,padding:\"40px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:\"Set up the component by uploading an image.\"});}return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:props.radius,overflow:\"hidden\"},children:[!props.enabled&&/*#__PURE__*/_jsx(\"img\",{src:props.image.src,alt:props.image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}),/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",imageRendering:\"pixelated\",opacity:props.enabled?1:0},\"aria-label\":getAriaLabel()})]});}// ------------------------------------------------------------ //\n// DITHERING ALGORITHMS\n// ------------------------------------------------------------ //\nclass DitherProcessor{// Utility function to convert hex color to RGB\nstatic hexToRgb(color){// Remove all whitespace from the color string\ncolor=color.replace(/\\s+/g,\"\");// Extract color value from var() if present\nconst varMatch=color.match(/var\\([^,]*,\\s*(.*?)\\)\\s*(?:\\/\\*|$)/);if(varMatch){color=varMatch[1].trim()// Get the color value between var(..., HERE)\n;}// Handle rgb() format with optional spaces\nconst rgbMatch=color.match(/^rgb\\((\\d+),(\\d+),(\\d+)\\)$/);if(rgbMatch){return{r:parseInt(rgbMatch[1],10),g:parseInt(rgbMatch[2],10),b:parseInt(rgbMatch[3],10)};}// Handle rgba() format with optional spaces and any decimal alpha\nconst rgbaMatch=color.match(/^rgba\\((\\d+),(\\d+),(\\d+),[\\d.]+\\)$/);if(rgbaMatch){return{r:parseInt(rgbaMatch[1],10),g:parseInt(rgbaMatch[2],10),b:parseInt(rgbaMatch[3],10)};}// Handle hex format (both with and without #)\nconst hexMatch=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(color);if(hexMatch){return{r:parseInt(hexMatch[1],16),g:parseInt(hexMatch[2],16),b:parseInt(hexMatch[3],16)};}// If we get here, log the problematic color for debugging\nconsole.warn(\"Could not parse color:\",color);// Try to extract numbers directly as a fallback\nconst numbers=color.match(/\\d+/g);if(numbers&&numbers.length>=3){return{r:parseInt(numbers[0],10),g:parseInt(numbers[1],10),b:parseInt(numbers[2],10)};}// Return black as last resort fallback\nreturn{r:0,g:0,b:0};}// Apply brightness adjustment to image data\nstatic adjustBrightness(imageData,brightness){const data=new Uint8ClampedArray(imageData.data);const factor=1+brightness/100;for(let i=0;i<data.length;i+=4){data[i]=Math.min(255,Math.max(0,Math.round(data[i]*factor)));data[i+1]=Math.min(255,Math.max(0,Math.round(data[i+1]*factor)));data[i+2]=Math.min(255,Math.max(0,Math.round(data[i+2]*factor)));}return new ImageData(data,imageData.width,imageData.height);}// Apply glow effect to image data\nstatic applyGlow(imageData,glowAmount){if(glowAmount===0)return imageData;const canvas=document.createElement(\"canvas\");canvas.width=imageData.width;canvas.height=imageData.height;const ctx=canvas.getContext(\"2d\",{willReadFrequently:true});// Draw original image data\nctx.putImageData(imageData,0,0);// Apply blur for glow effect\nctx.filter=`blur(${glowAmount/4}px)`;ctx.globalCompositeOperation=\"lighter\";ctx.drawImage(canvas,0,0);ctx.filter=\"none\";return ctx.getImageData(0,0,imageData.width,imageData.height);}// Floyd-Steinberg error diffusion dithering\nstatic floydSteinberg(imageData,threshold,backgroundColor,dotColor){const data=new Uint8ClampedArray(imageData.data);const width=imageData.width;const height=imageData.height;const bgColor=this.hexToRgb(backgroundColor);const dotColorRgb=this.hexToRgb(dotColor);for(let y=0;y<height;y++){for(let x=0;x<width;x++){const idx=(y*width+x)*4;// Calculate luminance\nconst luminance=Math.round(.299*data[idx]+.587*data[idx+1]+.114*data[idx+2]);// Determine which color to use based on luminance\nconst useDotColor=luminance>threshold;const targetColor=useDotColor?dotColorRgb:bgColor;// Calculate error for each channel\nconst errorR=data[idx]-targetColor.r;const errorG=data[idx+1]-targetColor.g;const errorB=data[idx+2]-targetColor.b;// Set current pixel color\ndata[idx]=targetColor.r;data[idx+1]=targetColor.g;data[idx+2]=targetColor.b;data[idx+3]=255// Alpha\n;// Distribute error to neighboring pixels\nif(x+1<width){data[(y*width+(x+1))*4]+=errorR*7/16;data[(y*width+(x+1))*4+1]+=errorG*7/16;data[(y*width+(x+1))*4+2]+=errorB*7/16;}if(y+1<height){if(x-1>=0){data[((y+1)*width+(x-1))*4]+=errorR*3/16;data[((y+1)*width+(x-1))*4+1]+=errorG*3/16;data[((y+1)*width+(x-1))*4+2]+=errorB*3/16;}data[((y+1)*width+x)*4]+=errorR*5/16;data[((y+1)*width+x)*4+1]+=errorG*5/16;data[((y+1)*width+x)*4+2]+=errorB*5/16;if(x+1<width){data[((y+1)*width+(x+1))*4]+=errorR/16;data[((y+1)*width+(x+1))*4+1]+=errorG/16;data[((y+1)*width+(x+1))*4+2]+=errorB/16;}}}}return new ImageData(data,width,height);}// Ordered/Bayer dithering\nstatic ordered(imageData,threshold,backgroundColor,dotColor){const data=new Uint8ClampedArray(imageData.data);const width=imageData.width;const height=imageData.height;const bgColor=this.hexToRgb(backgroundColor);const dotColorRgb=this.hexToRgb(dotColor);// 4x4 Bayer matrix\nconst bayerMatrix=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];for(let y=0;y<height;y++){for(let x=0;x<width;x++){const idx=(y*width+x)*4;// Convert to grayscale\nconst gray=Math.round(.299*data[idx]+.587*data[idx+1]+.114*data[idx+2]);// Get threshold modifier from Bayer matrix\nconst bayerValue=bayerMatrix[y%4][x%4];const adjustedThreshold=threshold+(bayerValue-7.5)*16;const useDotColor=gray>adjustedThreshold;const targetColor=useDotColor?dotColorRgb:bgColor;data[idx]=targetColor.r;data[idx+1]=targetColor.g;data[idx+2]=targetColor.b;}}return new ImageData(data,width,height);}// Random dithering\nstatic random(imageData,threshold,backgroundColor,dotColor){const data=new Uint8ClampedArray(imageData.data);const width=imageData.width;const height=imageData.height;const bgColor=this.hexToRgb(backgroundColor);const dotColorRgb=this.hexToRgb(dotColor);for(let y=0;y<height;y++){for(let x=0;x<width;x++){const idx=(y*width+x)*4;// Convert to grayscale\nconst gray=Math.round(.299*data[idx]+.587*data[idx+1]+.114*data[idx+2]);// Add random noise to threshold\nconst randomNoise=(Math.random()-.5)*100;const adjustedThreshold=threshold+randomNoise;const useDotColor=gray>adjustedThreshold;const targetColor=useDotColor?dotColorRgb:bgColor;data[idx]=targetColor.r;data[idx+1]=targetColor.g;data[idx+2]=targetColor.b;}}return new ImageData(data,width,height);}// Atkinson dithering\nstatic atkinson(imageData,threshold,backgroundColor,dotColor){const data=new Uint8ClampedArray(imageData.data);const width=imageData.width;const height=imageData.height;const bgColor=this.hexToRgb(backgroundColor);const dotColorRgb=this.hexToRgb(dotColor);for(let y=0;y<height;y++){for(let x=0;x<width;x++){const idx=(y*width+x)*4;// Calculate luminance\nconst luminance=Math.round(.299*data[idx]+.587*data[idx+1]+.114*data[idx+2]);// Determine which color to use based on luminance\nconst useDotColor=luminance>threshold;const targetColor=useDotColor?dotColorRgb:bgColor;// Calculate error for each channel\nconst errorR=data[idx]-targetColor.r;const errorG=data[idx+1]-targetColor.g;const errorB=data[idx+2]-targetColor.b;// Set current pixel color\ndata[idx]=targetColor.r;data[idx+1]=targetColor.g;data[idx+2]=targetColor.b;data[idx+3]=255// Alpha\n;// Distribute error using Atkinson pattern (1/8 to each neighbor)\nconst positions=[[1,0],[2,0],[-1,1],[0,1],[1,1],[0,2]];for(const[dx,dy]of positions){const newX=x+dx;const newY=y+dy;if(newX>=0&&newX<width&&newY>=0&&newY<height){const newIdx=(newY*width+newX)*4;data[newIdx]=Math.min(255,Math.max(0,data[newIdx]+errorR/8));data[newIdx+1]=Math.min(255,Math.max(0,data[newIdx+1]+errorG/8));data[newIdx+2]=Math.min(255,Math.max(0,data[newIdx+2]+errorB/8));}}}}return new ImageData(data,width,height);}}function transformValue(input,inputRange,outputRange,clamp=false){const[inputMin,inputMax]=inputRange;const[outputMin,outputMax]=outputRange;const progress=(input-inputMin)/(inputMax-inputMin);let result=outputMin+progress*(outputMax-outputMin);if(clamp){if(outputMax>outputMin){result=Math.min(Math.max(result,outputMin),outputMax);}else{result=Math.min(Math.max(result,outputMax),outputMin);}}return result;}Dither.displayName=\"Dither\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Dither\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Dither_Archive.map"],
  "mappings": "mIAGAA,EAAoBC,EAAO,CAAC,MAAM,CAAC,KAAKC,EAAY,eAAe,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK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IAAIF,EAAU,CAAC,IAAMG,EAAKb,EAAEW,EAASG,EAAKf,EAAEa,EAAG,GAAGC,GAAM,GAAGA,EAAKlB,GAAOmB,GAAM,GAAGA,EAAKlB,EAAO,CAAC,IAAMmB,GAAQD,EAAKnB,EAAMkB,GAAM,EAAEzB,EAAK2B,CAAM,EAAE,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE3B,EAAK2B,CAAM,EAAEZ,EAAO,CAAC,CAAC,EAAEf,EAAK2B,EAAO,CAAC,EAAE,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE3B,EAAK2B,EAAO,CAAC,EAAEX,EAAO,CAAC,CAAC,EAAEhB,EAAK2B,EAAO,CAAC,EAAE,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE3B,EAAK2B,EAAO,CAAC,EAAEV,EAAO,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,OAAO,IAAI,UAAUjB,EAAKO,EAAMC,CAAM,CAAE,CAAC,EAAC,SAAS9C,EAAekE,EAAMC,EAAWC,EAAYC,EAAM,GAAM,CAAC,GAAK,CAACC,EAASC,CAAQ,EAAEJ,EAAgB,CAACK,EAAUC,CAAS,EAAEL,EAAkBM,GAAUR,EAAMI,IAAWC,EAASD,GAAcK,EAAOH,EAAUE,GAAUD,EAAUD,GAAW,OAAGH,IAAUI,EAAUD,EAAWG,EAAO,KAAK,IAAI,KAAK,IAAIA,EAAOH,CAAS,EAAEC,CAAS,EAAQE,EAAO,KAAK,IAAI,KAAK,IAAIA,EAAOF,CAAS,EAAED,CAAS,GAAWG,CAAO,CAACvF,EAAO,YAAY",
  "names": ["addPropertyControls", "Dither", "ControlType", "props", "isOnFramerCanvas", "RenderTarget", "hasImage", "canvasRef", "pe", "isInView", "useInView", "intensityTransformed", "se", "transformValue", "animationFrameRef", "lastTimeRef", "elapsedTimeRef", "animatedValuesRef", "handleProcessImage", "canvas", "ctx", "img", "aspectRatio", "baseResolution", "targetWidth", "targetHeight", "imageData", "brightAdjusted", "DitherProcessor", "adjustedThreshold", "processedData", "glowProcessed", "err", "ue", "generateRandomValue", "baseValue", "variation", "animate", "currentTime", "deltaTime", "newBrightness", "getAriaLabel", "u", "p", "color", "varMatch", "rgbMatch", "rgbaMatch", "hexMatch", "numbers", "brightness", "data", "factor", "i", "glowAmount", "threshold", "backgroundColor", "dotColor", "width", "height", "bgColor", "dotColorRgb", "y", "x", "idx", "targetColor", "errorR", "errorG", "errorB", "bayerMatrix", "gray", "bayerValue", "randomNoise", "positions", "dx", "dy", "newX", "newY", "newIdx", "input", "inputRange", "outputRange", "clamp", "inputMin", "inputMax", "outputMin", "outputMax", "progress", "result"]
}
