{"version":3,"file":"Image2Particles.BaVTES3t.mjs","names":["useRef","useState","p"],"sources":["https:/framerusercontent.com/modules/FdlXa6Hj3mJXDTSVjZc6/RRBjLJL0GiYKYKJUDVs8/Image2Particles.js"],"sourcesContent":["/*\n * Copyright (c) 2025 Fred Moon (x.com/fw3d). All rights reserved.\n *\n * This code is the exclusive property of Fred Moon. Any unauthorized use,\n * reproduction, modification, distribution, or incorporation into other\n * software, in whole or in part, is strictly prohibited without the express\n * written permission of the author.\n *\n * This code is provided \"AS IS\" without warranty of any kind, either\n * expressed or implied, including but not limited to the implied warranties\n * of merchantability and fitness for a particular purpose.\n *\n * For licensing inquiries, please contact Fred Moon at x.com/fw3d\n *\n * This copyright notice and permission notice shall be included in all\n * copies or substantial portions of this software.\n *\n * Note: This code uses third-party libraries (e.g. P5) which are\n * subject to their own licenses and are excluded from this copyright claim.\n */// @framerSupportedLayoutWidth any\n// @framerSupportedLayoutHeight any\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 400\n */export default function ParticleSystem(props){const{imageSource,mouseSize,particleSize,speed,resolution,backgroundColor,zoomLevel,safetyMargin,resizeDebounceTime,minResizeThreshold}=props;const containerRef=useRef(null);const canvasRef=useRef(null);const[loaded,setLoaded]=useState(false);const[containerDimensions,setContainerDimensions]=useState({width:0,height:0});const previousDimensionsRef=useRef({width:0,height:0});const resizeTimeoutRef=useRef(null);const p5InstanceRef=useRef(null);// Track container dimensions with debounce for mobile\nuseEffect(()=>{if(!containerRef.current)return;const updateDimensions=()=>{if(containerRef.current){const newWidth=containerRef.current.offsetWidth;const newHeight=containerRef.current.offsetHeight;const prevWidth=previousDimensionsRef.current.width;const prevHeight=previousDimensionsRef.current.height;// Calculate the percentage change\nconst widthChange=prevWidth?Math.abs(newWidth-prevWidth)/prevWidth:1;const heightChange=prevHeight?Math.abs(newHeight-prevHeight)/prevHeight:1;const significantChange=widthChange>minResizeThreshold||heightChange>minResizeThreshold;// Clear any existing timeout\nif(resizeTimeoutRef.current){clearTimeout(resizeTimeoutRef.current);}// Only update if it's a significant change or we're debouncing\nif(significantChange||resizeDebounceTime>0){resizeTimeoutRef.current=setTimeout(()=>{setContainerDimensions({width:newWidth,height:newHeight});previousDimensionsRef.current={width:newWidth,height:newHeight};},significantChange?0:resizeDebounceTime);}}};// Initial measurement\nupdateDimensions();// Set up resize observer to handle size changes\nconst resizeObserver=new ResizeObserver(updateDimensions);resizeObserver.observe(containerRef.current);return()=>{if(containerRef.current){resizeObserver.unobserve(containerRef.current);}if(resizeTimeoutRef.current){clearTimeout(resizeTimeoutRef.current);}};},[resizeDebounceTime,minResizeThreshold]);useEffect(()=>{// Only run in browser environment\nif(typeof window===\"undefined\")return;// Load p5.js from CDN\nconst script=document.createElement(\"script\");script.src=\"https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js\";script.async=true;script.onload=()=>{setLoaded(true);};document.body.appendChild(script);return()=>{if(script.parentNode){document.body.removeChild(script);}};},[]);useEffect(()=>{if(!loaded||!canvasRef.current||!containerDimensions.width)return;// Clean up previous p5 instance to avoid memory leaks\nif(p5InstanceRef.current){p5InstanceRef.current.remove();p5InstanceRef.current=null;}// Create p5 sketch\nconst sketch=p=>{let img=null;let particles=[];const closeEnoughTarget=50;let ready=false;let isImageProcessed=false;let lastProcessedWidth=0;let lastProcessedHeight=0;// Calculate the canvas dimensions with safety margins\nconst canvasWidth=containerDimensions.width+safetyMargin*2;const canvasHeight=containerDimensions.height+safetyMargin*2;// Calculate offsets to center the canvas\nconst offsetX=-safetyMargin;const offsetY=-safetyMargin;// Simple custom vector operations\nconst createVector=(x,y)=>({x,y});const addVectors=(v1,v2)=>({x:v1.x+v2.x,y:v1.y+v2.y});const subVectors=(v1,v2)=>({x:v1.x-v2.x,y:v1.y-v2.y});const multVector=(v,scalar)=>({x:v.x*scalar,y:v.y*scalar});const normalizeVector=v=>{const mag=Math.sqrt(v.x*v.x+v.y*v.y);if(mag===0)return{x:0,y:0};return{x:v.x/mag,y:v.y/mag};};const vectorMagnitude=v=>Math.sqrt(v.x*v.x+v.y*v.y);const limitVector=(v,max)=>{const mag=vectorMagnitude(v);if(mag>max){const ratio=max/mag;return{x:v.x*ratio,y:v.y*ratio};}return v;};// Particle constructor\nfunction Particle(x,y){this.pos=createVector(x,y);this.vel=createVector(0,0);this.acc=createVector(0,0);this.target=createVector(0,0);this.isKilled=false;this.maxSpeed=p.random(.25,2);this.maxForce=p.random(8,15);this.currentColor=p.color(0);this.endColor=p.color(0);this.colorBlendRate=p.random(.01,.05);this.currentSize=0;this.distToTarget=0;}// Detect if this is a mobile device\nconst isMobileDevice=()=>{return typeof window!==\"undefined\"&&(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));};const isMobile=isMobileDevice();Particle.prototype.move=function(){this.distToTarget=p.dist(this.pos.x,this.pos.y,this.target.x,this.target.y);let proximityMult;if(this.distToTarget<closeEnoughTarget){proximityMult=this.distToTarget/closeEnoughTarget;this.vel=multVector(this.vel,.9);}else{proximityMult=1;this.vel=multVector(this.vel,.95);}if(this.distToTarget>1){const direction=subVectors(this.target,this.pos);const steer=normalizeVector(direction);const scaled=multVector(steer,this.maxSpeed*proximityMult*speed);this.acc=addVectors(this.acc,scaled);}// Adjust mouse position to account for canvas offset\nconst adjustedMouseX=p.mouseX;const adjustedMouseY=p.mouseY;const mouseDist=p.dist(this.pos.x,this.pos.y,adjustedMouseX,adjustedMouseY);if(mouseDist<mouseSize){let push;// On mobile, always use repelling effect regardless of whether pressed or not\nif(p.mouseIsPressed&&!isMobile){push=subVectors(createVector(adjustedMouseX,adjustedMouseY),this.pos);}else{push=subVectors(this.pos,createVector(adjustedMouseX,adjustedMouseY));}push=normalizeVector(push);push=multVector(push,(mouseSize-mouseDist)*.05);this.acc=addVectors(this.acc,push);}this.vel=addVectors(this.vel,this.acc);this.vel=limitVector(this.vel,this.maxForce*speed);this.pos=addVectors(this.pos,this.vel);this.acc=multVector(this.acc,0);};Particle.prototype.draw=function(){this.currentColor=p.lerpColor(this.currentColor,this.endColor,this.colorBlendRate);p.stroke(this.currentColor);let targetSize;if(!this.isKilled){targetSize=p.map(Math.min(this.distToTarget,closeEnoughTarget),closeEnoughTarget,0,0,particleSize);}else{targetSize=2;}this.currentSize=p.lerp(this.currentSize,targetSize,.1);p.strokeWeight(this.currentSize);p.point(this.pos.x,this.pos.y);};Particle.prototype.kill=function(){if(!this.isKilled){this.target=generateRandomPos(p.width/2,p.height/2,Math.max(p.width,p.height));this.endColor=p.color(0);this.isKilled=true;}};Particle.prototype.isOutOfBounds=function(){return this.pos.x<0||this.pos.x>p.width||this.pos.y<0||this.pos.y>p.height;};function generateRandomPos(x,y,mag){const pos=createVector(x,y);const randomDirection=createVector(p.random(p.width),p.random(p.height));const vel=subVectors(randomDirection,pos);const normalized=normalizeVector(vel);const scaled=multVector(normalized,mag);return addVectors(pos,scaled);}function processImage(){// Check if we've already processed this size and skip if dimensions haven't changed significantly\nif(isImageProcessed&&Math.abs(lastProcessedWidth-containerDimensions.width)<5&&Math.abs(lastProcessedHeight-containerDimensions.height)<5){return;}// Debug the image properties\nif(!img){return;}if(!img.pixels||img.pixels.length===0){try{img.loadPixels();}catch(e){return;}}// Clear existing particles\nparticles=[];// Calculate scale to fit image within content area (not including margins)\nconst contentWidth=containerDimensions.width;const contentHeight=containerDimensions.height;const scaleX=contentWidth/img.width;const scaleY=contentHeight/img.height;const scale=Math.min(scaleX,scaleY)*zoomLevel;// Calculate centered position (within the content area, adjusted for canvas offset)\nconst contentOffsetX=(contentWidth-img.width*scale)/2+safetyMargin;const contentOffsetY=(contentHeight-img.height*scale)/2+safetyMargin;// Sample the image and create particles\n// Adjust step size based on resolution - higher resolution = smaller step\nconst step=Math.max(1,Math.floor(10/resolution));let particleCount=0;for(let y=0;y<img.height;y+=step){for(let x=0;x<img.width;x+=step){// Calculate pixel index correctly\nconst i=4*(y*img.width+x);// Check bounds\nif(i>=img.pixels.length-4)continue;// Skip transparent pixels\nif(img.pixels[i+3]===0)continue;// Random sampling based on resolution\nif(p.random(1)>.045*resolution)continue;// Get pixel color\nconst pixelColor=p.color(img.pixels[i],img.pixels[i+1],img.pixels[i+2],img.pixels[i+3]);// Create a new particle - starting position is centered in the entire canvas\nconst particle=new Particle(p.width/2,p.height/2);// Position based on scale and offset to contain the image within the content area\nparticle.target.x=contentOffsetX+x*scale;particle.target.y=contentOffsetY+y*scale;particle.endColor=pixelColor;particles.push(particle);particleCount++;}}// Track that we've processed the image at these dimensions\nlastProcessedWidth=containerDimensions.width;lastProcessedHeight=containerDimensions.height;isImageProcessed=true;ready=true;}// Setup canvas and load image\np.setup=function(){// Create canvas with increased dimensions for safety margins\nconst canvas=p.createCanvas(canvasWidth,canvasHeight);// Position the canvas with negative offsets to center the content\ncanvas.position(offsetX,offsetY);// Prevent default touch behavior to avoid issues on mobile\nif(isMobileDevice()){canvas.touchStarted(event=>{// Prevent default touch handling\nreturn false;});canvas.touchMoved(event=>{// Prevent default scrolling\nreturn false;});canvas.touchEnded(event=>{// Prevent default touch handling\nreturn false;});}// Set a transparent clear color at the beginning\np.clear();// Initialize image loading if source is provided\nif(imageSource){// Create image loading handler\nconst onImageLoad=loadedImg=>{if(loadedImg&&loadedImg.width>0&&loadedImg.height>0){img=loadedImg;img.loadPixels();processImage();}};try{p.loadImage(imageSource,onImageLoad,()=>{});}catch(err){// Silent error handling\n}}else{// Create a default empty image with some colored pixels\nimg=p.createImage(100,100);img.loadPixels();for(let i=0;i<img.width;i++){for(let j=0;j<img.height;j++){img.set(i,j,p.color(p.random(255),p.random(255),p.random(255)));}}img.updatePixels();processImage();}};// Resize handler\np.windowResized=function(){if(canvasRef.current){// Update canvas size with safety margins\nconst newCanvasWidth=containerDimensions.width+safetyMargin*2;const newCanvasHeight=containerDimensions.height+safetyMargin*2;p.resizeCanvas(newCanvasWidth,newCanvasHeight);if(img&&img.pixels){processImage();}}};// Main draw loop\np.draw=function(){// Handle transparent background differently\nif(p.alpha(backgroundColor)===0){// For fully transparent backgrounds, use clear() instead of background()\np.clear();}else{// For any other background, use the specified color\np.background(backgroundColor);}if(!ready)return;// Update and render particles\nfor(let i=particles.length-1;i>=0;i--){particles[i].move();particles[i].draw();// Remove particles that are killed and out of bounds\nif(particles[i].isKilled&&particles[i].isOutOfBounds()){particles.splice(i,1);}}};// Key handler for debugging\np.keyPressed=function(){if(p.key===\" \"){processImage();}};};try{p5InstanceRef.current=new window.p5(sketch,canvasRef.current);}catch(err){// Silent error handling\n}return()=>{if(p5InstanceRef.current){p5InstanceRef.current.remove();p5InstanceRef.current=null;}};},[loaded,canvasRef,containerDimensions,imageSource,mouseSize,particleSize,speed,resolution,backgroundColor,zoomLevel,safetyMargin]);// Prevent scroll handling for touch events to avoid refreshing on mobile\nuseEffect(()=>{const preventScrollRefresh=event=>{// Check if it's a touch event (mobile)\nif(event.touches){event.preventDefault();}};// Check if we're in a browser environment\nif(typeof window!==\"undefined\"&&canvasRef.current){canvasRef.current.addEventListener(\"touchmove\",preventScrollRefresh,{passive:false});return()=>{if(canvasRef.current){canvasRef.current.removeEventListener(\"touchmove\",preventScrollRefresh);}};}},[canvasRef]);// Monitor orientation changes specifically\nuseEffect(()=>{if(typeof window===\"undefined\")return;const handleOrientationChange=()=>{// Force a resize after a brief delay to ensure the new dimensions are correct\nsetTimeout(()=>{if(containerRef.current){const newWidth=containerRef.current.offsetWidth;const newHeight=containerRef.current.offsetHeight;setContainerDimensions({width:newWidth,height:newHeight});previousDimensionsRef.current={width:newWidth,height:newHeight};}},300)// Slight delay to allow browser to settle\n;};// Listen for orientation changes\nwindow.addEventListener(\"orientationchange\",handleOrientationChange);return()=>{window.removeEventListener(\"orientationchange\",handleOrientationChange);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",backgroundColor:\"transparent\",overflow:\"visible\",position:\"relative\",touchAction:\"none\"},children:/*#__PURE__*/_jsx(\"div\",{ref:canvasRef,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"visible\",touchAction:\"none\"}})});}// Default props\nParticleSystem.defaultProps={imageSource:\"https://via.placeholder.com/400x400\",mouseSize:100,particleSize:8,speed:1,resolution:1,backgroundColor:\"#000000\",zoomLevel:1,safetyMargin:100,resizeDebounceTime:500,minResizeThreshold:.15};ParticleSystem.displayName=\"🚀 Image 2 Particles\";// Property controls\naddPropertyControls(ParticleSystem,{imageSource:{type:ControlType.Image,title:\"Image\"},mouseSize:{type:ControlType.Number,title:\"Mouse Size\",defaultValue:100,min:10,max:200,step:1},particleSize:{type:ControlType.Number,title:\"Particle Size\",defaultValue:8,min:1,max:20,step:1},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:5,step:.1},resolution:{type:ControlType.Number,title:\"Resolution\",defaultValue:1,min:.1,max:10,step:.1},zoomLevel:{type:ControlType.Number,title:\"Zoom\",defaultValue:1,min:.1,max:1,step:.05,displayStepper:true},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\",propertyControl:{type:\"color\",alpha:true}},safetyMargin:{type:ControlType.Number,title:\"Safety Margin\",defaultValue:100,min:0,max:500,step:10,displayStepper:true,description:\"Extra space around the component to allow particles to move freely\"},resizeDebounceTime:{type:ControlType.Number,title:\"Resize Debounce\",defaultValue:500,min:0,max:2e3,step:50,displayStepper:true,description:\"Delay in milliseconds before processing a resize (0 to disable debounce)\"},minResizeThreshold:{type:ControlType.Number,title:\"Resize Threshold\",defaultValue:.15,min:.01,max:.5,step:.01,displayStepper:true,description:\"Minimum percentage change to trigger reprocessing (e.g., 0.15 = 15%) \\n\\n[Created for Framer by Fred Moon (x.com/fw3d)](https://x.com/fw3d)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ParticleSystem\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"400\",\"framerDisableUnlink\":\"* @framerIntrinsicWidth 400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Image2Particles.map"],"mappings":"0TAyBG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,cAAY,YAAU,eAAa,QAAM,aAAW,kBAAgB,YAAU,eAAa,qBAAmB,qBAAmB,CAAC,EAAY,EAAaA,EAAO,MAAY,EAAUA,EAAO,MAAW,CAAC,EAAO,EAAU,CAACC,EAAS,IAAY,CAAC,EAAoB,EAAuB,CAACA,EAAS,CAAC,MAAM,EAAE,OAAO,EAAE,EAAQ,EAAsBD,EAAO,CAAC,MAAM,EAAE,OAAO,EAAE,EAAQ,EAAiBA,EAAO,MAAY,EAAcA,EAAO,MA6DzU,OA5DhK,MAAc,CAAC,GAAG,CAAC,EAAa,QAAQ,OAAO,IAAM,MAAqB,CAAC,GAAG,EAAa,QAAQ,CAAC,IAAM,EAAS,EAAa,QAAQ,YAAkB,EAAU,EAAa,QAAQ,aAAmB,EAAU,EAAsB,QAAQ,MAAY,EAAW,EAAsB,QAAQ,OACnS,EAAY,EAAU,KAAK,IAAI,EAAS,GAAW,EAAU,EAAQ,EAAa,EAAW,KAAK,IAAI,EAAU,GAAY,EAAW,EAAQ,EAAkB,EAAY,GAAoB,EAAa,EACjN,EAAiB,SAAS,aAAa,EAAiB,UACxD,GAAmB,EAAmB,KAAG,EAAiB,QAAQ,eAAe,CAAC,EAAuB,CAAC,MAAM,EAAS,OAAO,EAAU,EAAE,EAAsB,QAAQ,CAAC,MAAM,EAAS,OAAO,EAAU,AAAE,EAAC,EAAkB,EAAE,GAAsB,CAAC,EAC5P,IACA,IAAM,EAAe,IAAI,eAAe,GAA+D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