{"version":3,"file":"HaloEffect.BiFWoS8Y.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/9NXbeN5HAMC9vesOZCVu/siMCVOYsLSnfaQn3Qsp8/HaloEffect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Function to generate random colors\nconst getRandomColor=()=>{const letters=\"0123456789ABCDEF\";let color=\"#\";for(let i=0;i<6;i++){color+=letters[Math.floor(Math.random()*16)];}return color;};export default function HaloEffect({count1,count2,count3,size,speed,blur,color1,color2,color3}){const[circles,setCircles]=useState([]);useEffect(()=>{// Initialize circles with random starting positions\nconst initialCircles=[// Set 1: Circles with color1\n...Array.from({length:count1},()=>({id:Math.random(),initialX:Math.random()*(window.innerWidth-size),initialY:Math.random()*(window.innerHeight-size),x:Math.random()*(window.innerWidth-size),y:Math.random()*(window.innerHeight-size),color:color1})),// Set 2: Circles with color2\n...Array.from({length:count2},()=>({id:Math.random(),initialX:Math.random()*(window.innerWidth-size),initialY:Math.random()*(window.innerHeight-size),x:Math.random()*(window.innerWidth-size),y:Math.random()*(window.innerHeight-size),color:color2})),// Set 3: Circles with color3\n...Array.from({length:count3},()=>({id:Math.random(),initialX:Math.random()*(window.innerWidth-size),initialY:Math.random()*(window.innerHeight-size),x:Math.random()*(window.innerWidth-size),y:Math.random()*(window.innerHeight-size),color:color3}))];setCircles(initialCircles);// Set interval to update position after the initial rendering\nconst interval=setInterval(()=>{setCircles(prevCircles=>prevCircles.map(circle=>({...circle,x:Math.random()*(window.innerWidth-size),y:Math.random()*(window.innerHeight-size)})));},speed*1e3)// Update position based on the speed prop\n;return()=>clearInterval(interval);},[size,speed,blur,count1,count2,count3,color1,color2,color3])// Run this effect only when any relevant prop changes\n;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",minWidth:\"100px\",minHeight:\"100px\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:circles.map(circle=>/*#__PURE__*/_jsx(motion.div,{animate:{x:circle.x,y:circle.y},initial:{x:circle.initialX,y:circle.initialY},transition:{duration:speed,ease:\"easeInOut\"},style:{width:size,height:size,borderRadius:\"50%\",backgroundColor:circle.color,position:\"absolute\",filter:`blur(${blur}px)`}},circle.id))});}// Add controls to customize in Framer UI\naddPropertyControls(HaloEffect,{count1:{type:ControlType.Number,defaultValue:5,min:1,max:20,title:\"Set 1 Circles\"},count2:{type:ControlType.Number,defaultValue:5,min:1,max:20,title:\"Set 2 Circles\"},count3:{type:ControlType.Number,defaultValue:5,min:1,max:20,title:\"Set 3 Circles\"},size:{type:ControlType.Number,defaultValue:200,min:200,max:500,title:\"Size\"},speed:{type:ControlType.Number,defaultValue:3,min:1,max:10,title:\"Speed\"},blur:{type:ControlType.Number,defaultValue:0,min:0,max:100,title:\"Blur\"},color1:{type:ControlType.Color,defaultValue:\"#5EA9FF\",title:\"Color 1\"},color2:{type:ControlType.Color,defaultValue:\"#ADD3FF\",title:\"Color 2\"},color3:{type:ControlType.Color,defaultValue:\"#FFFFFF\",title:\"Color 3\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HaloEffect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HaloEffect.map"],"mappings":"gPAC2J,SAAwB,EAAW,CAAC,SAAO,SAAO,SAAO,OAAK,QAAM,OAAK,SAAO,SAAO,UAAQ,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,CAAC,CAAC,EAO/R,OAPiS,MAAc,CAChT,IAAM,EAAe,CACrB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAM,OAAO,CAAC,GAAG,KAAK,OAAO,EAAE,SAAS,KAAK,OAAO,GAAG,EAAO,WAAW,GAAM,SAAS,KAAK,OAAO,GAAG,EAAO,YAAY,GAAM,EAAE,KAAK,OAAO,GAAG,EAAO,WA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