{"version":3,"file":"ImageMove.CXdlfbbf.mjs","names":[],"sources":["https:/framerusercontent.com/modules/5jI6UKs3kagKyeq7HvNY/JexF0tIH24YU2zcibV2D/ImageMove.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{useMotionValue,useSpring,motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function CursorMoveImage(props){const{image,movement,stiffness,damping}=props;const x=useMotionValue(0);const y=useMotionValue(0);const springX=useSpring(x,{stiffness,damping});const springY=useSpring(y,{stiffness,damping});const movementFactor=1+movement/10// Adjust this factor as needed\n;const handleMouseMove=event=>{x.set(event.clientX/window.innerWidth*20*movementFactor-10*movementFactor);y.set(event.clientY/window.innerHeight*20*movementFactor-10*movementFactor);};useEffect(()=>{window.addEventListener(\"mousemove\",handleMouseMove);return()=>window.removeEventListener(\"mousemove\",handleMouseMove);},[]);return /*#__PURE__*/_jsx(motion.div,{style:{x:springX,y:springY,zIndex:movement},children:/*#__PURE__*/_jsx(\"img\",{src:image,alt:\"Cursor Move\",style:{width:\"100%\",height:\"100%\"}})});}addPropertyControls(CursorMoveImage,{image:{type:ControlType.Image,title:\"Image\"},movement:{type:ControlType.Number,title:\"Movement\",defaultValue:0},stiffness:{type:ControlType.Number,title:\"Stiffness\",defaultValue:300},damping:{type:ControlType.Number,title:\"Damping\",defaultValue:30}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CursorMoveImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageMove.map"],"mappings":"oPAAuL,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,YAAU,WAAS,EAAY,EAAE,EAAe,EAAE,CAAO,EAAE,EAAe,EAAE,CAAO,EAAQ,EAAU,EAAE,CAAC,YAAU,UAAQ,CAAC,CAAO,EAAQ,EAAU,EAAE,CAAC,YAAU,UAAQ,CAAC,CAAO,EAAe,EAAE,EAAS,GAC/b,EAAgB,GAAO,CAAC,EAAE,IAAI,EAAM,QAAQ,EAAO,WAAW,GAAG,EAAe,GAAG,EAAe,CAAC,EAAE,IAAI,EAAM,QAAQ,EAAO,YAAY,GAAG,EAAe,GAAG,EAAe,EAA+I,OAA5I,OAAe,EAAO,iBAAiB,YAAY,EAAgB,KAAW,EAAO,oBAAoB,YAAY,EAAgB,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAQ,EAAE,EAAQ,OAAO,EAAS,CAAC,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAM,IAAI,cAAc,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,sBAD9c,IAA6B,IAA2D,IAAoD,CACoU,EAAoB,EAAgB,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,UAAU,aAAa,GAAG,CAAC,CAAC"}