{"version":3,"file":"StickerDrag_prod.Do_Z9b4Q.mjs","names":["useRef","useState","useCallback","React","tick","e"],"sources":["https:/framerusercontent.com/modules/EwsosyUWyFy0lyKZ0Qej/jFjYW20qul3xFDI7CrV9/StickerDrag_prod.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React,{useEffect,useRef,useCallback,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{ComponentMessage}from\"https://framer.com/m/Utils-FINc.js\";// ============================================================================\n// CONSTANTS (matching original source exactly)\n// ============================================================================\nconst RENDER_SCALE=2;const PAD_BASE=20// Base padding in pixels\n;const MESH_GRID_SIZE=32// Must use grid for smooth wave deformation\n;const DRAG_Z_INDEX_BASE=1e3// Base z-index for dragged stickers\n;// Global counter to ensure each dragged sticker gets a unique, incrementing z-index\nlet zIndexCounter=DRAG_Z_INDEX_BASE;/**\n * Get the next z-index value for a dragged sticker\n * Increments the global counter so the most recently dragged sticker is always on top\n */function getNextZIndex(){zIndexCounter+=1;return zIndexCounter;}// Tweakables from original\nconst DRAG_TILT_SENSITIVITY=3;const DRAG_MAX_TILT_DEG=30;const DRAG_TILT_SMOOTHING=.05;const SHEEN_STRENGTH=.6;const SHEEN_TILT_SHIFT=.05;const SHEEN_TILT_DEADZONE=.035;const ANIM_SPEED=1.92;const HOLO_MOTION_BUMP=.15;const HOLO_MOTION_DECAY=.88;// ============================================================================\n// WebGL Shaders (from original source)\n// ============================================================================\nconst VERTEX_SHADER=`\nattribute vec2 aPos;\nattribute vec2 aUV;\nuniform float uPeel;\nuniform float uLift;\nuniform float uPeelAngle;\nuniform float uPasting;\nuniform float uScale;\nuniform float uElevation;\nvarying vec2 vUV;\nvarying float vHi;\nvarying float vSh;\n\nvoid main() {\n    vUV = aUV;\n    vec2 p = aPos;\n    vHi = 0.0;\n    vSh = 0.0;\n    \n    if (uPeel > 0.0) {\n        vec2 peelAxis = vec2(cos(uPeelAngle), sin(uPeelAngle));\n        vec2 uvCentered = aUV - vec2(0.5);\n        float proj = dot(uvCentered, peelAxis);\n        float diag = 0.5 - proj;\n        \n        // Peel line travels across sticker and EXITS completely\n        float peelLine = -0.3 + uPeel * 2.0;\n        \n        // How \"lifted\" is this vertex? 0 = flat, 1 = fully lifted\n        float rampWidth = 0.6;\n        float lifted = smoothstep(peelLine - rampWidth, peelLine, diag);\n        lifted = 1.0 - lifted;\n        \n        // Scale based on how lifted (uElevation controls magnitude)\n        float scale = 1.0 + lifted * uElevation;\n        p *= scale;\n        \n        // Curve outward at the ramp (creates the bent paper look)\n        float inRamp = smoothstep(peelLine - rampWidth, peelLine - rampWidth * 0.5, diag) *\n                       smoothstep(peelLine + 0.05, peelLine - rampWidth * 0.3, diag);\n        \n        float curveAmount = uPasting > 0.5 ? 0.06 : 0.12;\n        p += (-peelAxis) * inRamp * curveAmount;\n        \n        // Shading on the curved ramp\n        float t = smoothstep(peelLine - rampWidth, peelLine, diag);\n        vHi = inRamp * 0.75 * pow(1.0 - t, 1.2);\n        vSh = inRamp * 0.75 * pow(t, 1.2);\n    }\n    \n    // Apply scale to fit within padded canvas area\n    gl_Position = vec4(p * uScale, 0.0, 1.0);\n}\n`;const FRAGMENT_SHADER=`\nprecision mediump float;\nuniform sampler2D uTex;\nuniform vec2 uTilt;\nuniform float uSheenStrength;\nuniform float uSheenTiltShift;\nuniform float uSheenTiltDeadzone;\nuniform float uMaxTiltDeg;\nuniform float uHoloMode;\nuniform float uHoloMotion;\nvarying vec2 vUV;\nvarying float vHi;\nvarying float vSh;\n\nvec3 overlayBlend(vec3 base, vec3 blend) {\n    return mix(2.0 * base * blend, 1.0 - 2.0 * (1.0 - base) * (1.0 - blend), step(0.5, base));\n}\n\nvec3 hsl2rgb(float h, float s, float l) {\n    float c = (1.0 - abs(2.0 * l - 1.0)) * s;\n    float x = c * (1.0 - abs(mod(h * 6.0, 2.0) - 1.0));\n    float m = l - c * 0.5;\n    vec3 rgb;\n    if (h < 1.0/6.0) rgb = vec3(c, x, 0.0);\n    else if (h < 2.0/6.0) rgb = vec3(x, c, 0.0);\n    else if (h < 3.0/6.0) rgb = vec3(0.0, c, x);\n    else if (h < 4.0/6.0) rgb = vec3(0.0, x, c);\n    else if (h < 5.0/6.0) rgb = vec3(x, 0.0, c);\n    else rgb = vec3(c, 0.0, x);\n    return rgb + m;\n}\n\nvoid main() {\n    vec4 tex = texture2D(uTex, vUV);\n    if (tex.a < 0.01) discard;\n    \n    vec3 c = tex.rgb * 0.95;\n    \n    // Sheen/holo effect\n    float maxTilt = max(0.001, uMaxTiltDeg);\n    float tiltMag = clamp(length(uTilt) / maxTilt, 0.0, 1.0);\n    float tiltGate = smoothstep(uSheenTiltDeadzone, 1.0, tiltMag);\n    \n    float gradient = fract(vUV.x * 0.5 + vUV.y * 0.5 + uTilt.x * uSheenTiltShift + uTilt.y * uSheenTiltShift);\n    \n    if (uHoloMode > 0.5) {\n        float holoStrength = uSheenStrength * uHoloMotion;\n        float distFromWhite = length(tex.rgb - vec3(1.0));\n        float nonWhiteMask = smoothstep(0.06, 0.22, distFromWhite);\n        vec3 rainbow = hsl2rgb(gradient, 0.8, 0.55);\n        c = mix(c, rainbow, holoStrength * nonWhiteMask * tex.a);\n    } else {\n        float effectStrength = uSheenStrength * tiltGate;\n        float sheen = smoothstep(0.2, 0.5, gradient) * (1.0 - smoothstep(0.5, 0.8, gradient));\n        c = mix(c, vec3(1.0), sheen * effectStrength * tex.a);\n    }\n    \n    // Peel/paste lighting\n    float hiW = clamp(vHi, 0.0, 1.0) * 0.55;\n    float shW = clamp(vSh, 0.0, 1.0) * 0.60;\n\n    vec3 hi = overlayBlend(c, vec3(1.0));\n    c = mix(c, hi, hiW);\n\n    vec3 sh = overlayBlend(c, vec3(0.0));\n    c = mix(c, sh, shW);\n    c *= (1.0 - shW * 0.35);\n    \n    c = clamp(c, 0.0, 1.0);\n    gl_FragColor = vec4(c, tex.a);\n}\n`;// ============================================================================\n// UTILITIES\n// ============================================================================\nconst resolveImageSource=input=>{if(!input)return undefined;if(typeof input===\"string\")return input.trim()||undefined;return input.src||input.url||input.asset?.url||undefined;};/**\n * Calculates contained dimensions (like CSS object-fit: contain)\n * Maintains image aspect ratio while fitting within container bounds\n */function calculateContainedDimensions(containerWidth,containerHeight,imageAspectRatio){// If no image aspect ratio yet, use container dimensions\nif(!imageAspectRatio){return{width:containerWidth,height:containerHeight};}const containerAspect=containerWidth/containerHeight;if(containerAspect>imageAspectRatio){// Container is wider than image: fit to height\nreturn{width:containerHeight*imageAspectRatio,height:containerHeight};}else{// Container is taller than image: fit to width\nreturn{width:containerWidth,height:containerWidth/imageAspectRatio};}}const ELEVATION_DEFAULT=.12// how much the sticker scales/lifts during peel animation\n;const STATIC_SHADOW_DEFAULT=\"0px 1px 2px 0px rgba(0, 0, 0, 0.30)\";const DYNAMIC_SHADOW_DEFAULT=\"0px 13px 14px 0px rgba(0, 0, 0, 0.30)\";// Property panel uses 0–1 (elevation) and 0.1–1 (tilt); map to internal ranges\nconst TILT_DISPLAY_MIN=.1;const TILT_DISPLAY_MAX=1;const TILT_INTERNAL_MIN=.5;const TILT_INTERNAL_MAX=20;const ELEVATION_INTERNAL_MAX=.3;function mapTiltDisplayToInternal(display){const d=Math.max(TILT_DISPLAY_MIN,Math.min(TILT_DISPLAY_MAX,display));const t=(d-TILT_DISPLAY_MIN)/(TILT_DISPLAY_MAX-TILT_DISPLAY_MIN);return TILT_INTERNAL_MIN+t*(TILT_INTERNAL_MAX-TILT_INTERNAL_MIN);}function mapElevationDisplayToInternal(display){const d=Math.max(0,Math.min(1,display));return d*ELEVATION_INTERNAL_MAX;}// Default display values for property controls (map from internal defaults)\nconst TILT_DEFAULT_DISPLAY=TILT_DISPLAY_MIN+(DRAG_TILT_SENSITIVITY-TILT_INTERNAL_MIN)/(TILT_INTERNAL_MAX-TILT_INTERNAL_MIN)*(TILT_DISPLAY_MAX-TILT_DISPLAY_MIN);const ELEVATION_DEFAULT_DISPLAY=ELEVATION_DEFAULT/ELEVATION_INTERNAL_MAX;function parseBoxShadow(shadow){// Default values\nconst result={x:0,y:0,blur:0,color:\"rgba(0,0,0,0.3)\"};if(!shadow)return result;// Extract color (rgba, rgb, or hex)\nconst colorMatch=shadow.match(/(rgba?\\([^)]+\\)|#[0-9a-fA-F]{3,8}|\\b[a-z]+\\b(?=\\s*$))/i);if(colorMatch){result.color=colorMatch[0];}// Extract numeric values (px values)\nconst numbers=shadow.match(/-?\\d+(\\.\\d+)?(px)?/g);if(numbers){const vals=numbers.map(n=>parseFloat(n));if(vals.length>=1)result.x=vals[0];if(vals.length>=2)result.y=vals[1];if(vals.length>=3)result.blur=vals[2];// vals[3] would be spread, which we ignore for drop-shadow\n}return result;}function lerpShadow(a,b,t){const x=a.x+(b.x-a.x)*t;const y=a.y+(b.y-a.y)*t;const blur=a.blur+(b.blur-a.blur)*t;// Use the dynamic shadow's color when t > 0.5, otherwise static\nconst color=t>.5?b.color:a.color;return`drop-shadow(${x.toFixed(2)}px ${y.toFixed(2)}px ${blur.toFixed(2)}px ${color})`;}// ============================================================================\n// COMPONENT\n// ============================================================================\n/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 400\n * @framerDisableUnlink\n */export default function StickerDrag({image,tiltSensitivity:tiltSensitivityDisplay=TILT_DEFAULT_DISPLAY,tiltSmoothing=DRAG_TILT_SMOOTHING,sheenStrength=SHEEN_STRENGTH,sheenMode=\"sheen\",elevation:elevationDisplay=ELEVATION_DEFAULT_DISPLAY,staticShadow=STATIC_SHADOW_DEFAULT,dynamicShadow=DYNAMIC_SHADOW_DEFAULT,refresh=false,style}){// Map property panel values (0–1, 0.1–1) to internal ranges\nconst tiltSensitivity=mapTiltDisplayToInternal(tiltSensitivityDisplay);const elevation=mapElevationDisplayToInternal(elevationDisplay);// Check if image is missing\nconst imageSrc=resolveImageSource(image);const hasImage=!!imageSrc;// Show ComponentMessage if no image is provided\nif(!hasImage){return /*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",width:\"100%\",position:\"relative\",...style},children:/*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",width:\"100%\",position:\"relative\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(ComponentMessage,{style:{position:\"absolute\",inset:0},title:\"Sticker Drag\",subtitle:\"Add an image to create an interactive draggable sticker with 3D effects\"})})});}const containerRef=useRef(null);const stickerRef=useRef(null);const innerRef=useRef(null);const canvasRef=useRef(null);const zoomProbeRef=useRef(null);// Sizing div: prevents collapse when parent has size=fit; uses zoom probe so we don't react to editor zoom\nconst[sizingDimensions,setSizingDimensions]=useState({width:400,height:400});// WebGL context lost (too many stickers in canvas); refresh toggle re-initializes\nconst[contextLost,setContextLost]=useState(false);const[webglInitKey,setWebglInitKey]=useState(0);const previousRefreshRef=useRef(undefined);// When user toggles Refresh: clear context-lost message and trigger WebGL re-init.\n// We must set contextLost(false) first so the canvas is rendered again; then bump\n// webglInitKey so the WebGL effect runs after the canvas is in the DOM.\nuseEffect(()=>{if(previousRefreshRef.current===undefined){previousRefreshRef.current=refresh;return;}if(previousRefreshRef.current===refresh)return;previousRefreshRef.current=refresh;setContextLost(false);setWebglInitKey(k=>k+1);},[refresh]);// WebGL refs\nconst glRef=useRef(null);const programRef=useRef(null);const textureRef=useRef(null);const vboRef=useRef(null);const iboRef=useRef(null);const indexCountRef=useRef(0);// State refs (using refs instead of state for animation performance)\nconst stateRef=useRef({// Position\nx:0,y:0,width:200,height:200,// Image aspect ratio for contained sizing\nimageAspectRatio:null,// Scale factor for fitting content within padded canvas\nscale:1,// Drag state\nheld:false,peeling:false,sticking:false,dragStartX:0,dragStartY:0,dragOrigX:0,dragOrigY:0,// Peel/wave animation\npeel:0,lift:0,peelAngle:-Math.PI/4,// Tilt (CSS 3D transform)\ndragTiltX:0,dragTiltY:0,currentTiltX:0,currentTiltY:0,prevTiltX:0,prevTiltY:0,// Holo: only visible while cursor is moving (tilt changing)\nholoMotion:0,// Velocity tracking\nlastMoveX:0,lastMoveY:0,lastMoveT:0,// Animation\ntexReady:false});const animationRef=useRef(null);const lastTickTRef=useRef(null);// Draw function\nconst draw=useCallback(()=>{const gl=glRef.current;const program=programRef.current;const texture=textureRef.current;const state=stateRef.current;if(!gl||!program||!texture||!state.texReady)return;gl.viewport(0,0,gl.canvas.width,gl.canvas.height);gl.clearColor(0,0,0,0);gl.clear(gl.COLOR_BUFFER_BIT);gl.enable(gl.BLEND);gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);gl.useProgram(program);gl.bindBuffer(gl.ARRAY_BUFFER,vboRef.current);gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,iboRef.current);const aPos=gl.getAttribLocation(program,\"aPos\");const aUV=gl.getAttribLocation(program,\"aUV\");gl.enableVertexAttribArray(aPos);gl.enableVertexAttribArray(aUV);gl.vertexAttribPointer(aPos,2,gl.FLOAT,false,16,0);gl.vertexAttribPointer(aUV,2,gl.FLOAT,false,16,8);// Set uniforms\ngl.uniform1f(gl.getUniformLocation(program,\"uPeel\"),state.peel);gl.uniform1f(gl.getUniformLocation(program,\"uLift\"),state.lift);gl.uniform1f(gl.getUniformLocation(program,\"uPeelAngle\"),state.peelAngle);gl.uniform1f(gl.getUniformLocation(program,\"uPasting\"),state.sticking?1:0);gl.uniform1f(gl.getUniformLocation(program,\"uScale\"),state.scale);gl.uniform1f(gl.getUniformLocation(program,\"uElevation\"),elevation);gl.uniform2f(gl.getUniformLocation(program,\"uTilt\"),state.currentTiltX,state.currentTiltY);gl.uniform1f(gl.getUniformLocation(program,\"uSheenStrength\"),sheenStrength);gl.uniform1f(gl.getUniformLocation(program,\"uSheenTiltShift\"),SHEEN_TILT_SHIFT);gl.uniform1f(gl.getUniformLocation(program,\"uSheenTiltDeadzone\"),SHEEN_TILT_DEADZONE);gl.uniform1f(gl.getUniformLocation(program,\"uMaxTiltDeg\"),DRAG_MAX_TILT_DEG);gl.uniform1f(gl.getUniformLocation(program,\"uHoloMode\"),sheenMode===\"holo\"?1:0);gl.uniform1f(gl.getUniformLocation(program,\"uHoloMotion\"),state.holoMotion);gl.activeTexture(gl.TEXTURE0);gl.bindTexture(gl.TEXTURE_2D,texture);gl.uniform1i(gl.getUniformLocation(program,\"uTex\"),0);gl.drawElements(gl.TRIANGLES,indexCountRef.current,gl.UNSIGNED_SHORT,0);},[sheenStrength,sheenMode,elevation]);// Parse shadow props once (memoized)\nconst parsedStaticShadow=React.useMemo(()=>parseBoxShadow(staticShadow),[staticShadow]);const parsedDynamicShadow=React.useMemo(()=>parseBoxShadow(dynamicShadow),[dynamicShadow]);// Update shadow CSS based on peel/lift, interpolating between static and dynamic\nconst updateShadowCSS=useCallback(()=>{const canvas=canvasRef.current;const state=stateRef.current;if(!canvas)return;const tRaw=Math.max(state.lift,state.peel);const t=tRaw*tRaw*(3-2*tRaw)// smoothstep easing\n;canvas.style.filter=lerpShadow(parsedStaticShadow,parsedDynamicShadow,t);},[parsedStaticShadow,parsedDynamicShadow]);// Animation tick (from original source)\nconst tick=useCallback(timestamp=>{const state=stateRef.current;if(lastTickTRef.current===null){lastTickTRef.current=timestamp;}const dt=Math.min((timestamp-lastTickTRef.current)/1e3,.1);lastTickTRef.current=timestamp;const step=ANIM_SPEED*dt;let changed=false;if(state.peeling){// Peel and lift animate up together\nif(state.peel<1||state.lift<1){state.peel=Math.min(1,state.peel+step);state.lift=Math.min(1,state.lift+step);changed=true;}}if(state.sticking){// Paste animation: peel and lift animate down together\nif(state.peel>0||state.lift>0){state.peel=Math.max(0,state.peel-step);state.lift=Math.max(0,state.lift-step);changed=true;}else{state.sticking=false;}}// In holo mode, decay motion so effect fades when cursor stops moving\nconst holoDecayActive=sheenMode===\"holo\"&&state.holoMotion>.005;if(holoDecayActive){state.holoMotion*=HOLO_MOTION_DECAY;if(state.holoMotion<.005)state.holoMotion=0;changed=true;}if(changed){updateShadowCSS();}// Redraw while held, animating, or holo fading\nif(changed||state.held||holoDecayActive){draw();}// Continue ticking if needed\nif(state.held||state.peeling||state.sticking||holoDecayActive){animationRef.current=requestAnimationFrame(tick);}else{animationRef.current=null;lastTickTRef.current=null;}},[draw,updateShadowCSS,sheenMode]);// Start animation loop\nconst ensureTickRunning=useCallback(()=>{if(animationRef.current!==null)return;lastTickTRef.current=null;animationRef.current=requestAnimationFrame(tick);},[tick]);// Initialize WebGL (re-runs when refresh toggles or context restored)\nuseEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;setContextLost(false);const gl=canvas.getContext(\"webgl\",{alpha:true,antialias:true,premultipliedAlpha:false});if(!gl)return;glRef.current=gl;const handleContextLost=event=>{event.preventDefault();console.warn(\"WebGL context lost. Too many Sticker Drag components in Canvas. Use Refresh to see the sticker again.\");setContextLost(true);};const handleContextRestored=()=>{setContextLost(false);setWebglInitKey(k=>k+1);};canvas.addEventListener(\"webglcontextlost\",handleContextLost,false);canvas.addEventListener(\"webglcontextrestored\",handleContextRestored,false);// Compile shaders\nconst compileShader=(source,type)=>{const shader=gl.createShader(type);if(!shader)return null;gl.shaderSource(shader,source);gl.compileShader(shader);if(!gl.getShaderParameter(shader,gl.COMPILE_STATUS)){console.error(\"Shader compile error:\",gl.getShaderInfoLog(shader));gl.deleteShader(shader);return null;}return shader;};const vs=compileShader(VERTEX_SHADER,gl.VERTEX_SHADER);const fs=compileShader(FRAGMENT_SHADER,gl.FRAGMENT_SHADER);if(!vs||!fs)return;const program=gl.createProgram();if(!program)return;gl.attachShader(program,vs);gl.attachShader(program,fs);gl.linkProgram(program);if(!gl.getProgramParameter(program,gl.LINK_STATUS)){console.error(\"Program link error:\",gl.getProgramInfoLog(program));return;}programRef.current=program;// Create grid mesh (32x32 for smooth wave deformation)\nconst N=MESH_GRID_SIZE;const verts=[];const inds=[];for(let j=0;j<=N;j++){for(let i=0;i<=N;i++){// Position: -1 to 1\n// UV: 0 to 1 (flip V coordinate so image is right-side up)\nverts.push(i/N*2-1,j/N*2-1,i/N,1-j/N// Flip V coordinate\n);}}for(let j=0;j<N;j++){for(let i=0;i<N;i++){const a=j*(N+1)+i;inds.push(a,a+1,a+N+1,a+1,a+N+2,a+N+1);}}const vbo=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,vbo);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(verts),gl.STATIC_DRAW);vboRef.current=vbo;const ibo=gl.createBuffer();gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,ibo);gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,new Uint16Array(inds),gl.STATIC_DRAW);iboRef.current=ibo;indexCountRef.current=inds.length;// Clear immediately\ngl.viewport(0,0,canvas.width,canvas.height);gl.clearColor(0,0,0,0);gl.clear(gl.COLOR_BUFFER_BIT);return()=>{canvas.removeEventListener(\"webglcontextlost\",handleContextLost);canvas.removeEventListener(\"webglcontextrestored\",handleContextRestored);if(animationRef.current){cancelAnimationFrame(animationRef.current);}gl.deleteShader(vs);gl.deleteShader(fs);gl.deleteProgram(program);if(vboRef.current)gl.deleteBuffer(vboRef.current);if(iboRef.current)gl.deleteBuffer(iboRef.current);if(textureRef.current)gl.deleteTexture(textureRef.current);textureRef.current=null;glRef.current=null;programRef.current=null;vboRef.current=null;iboRef.current=null;stateRef.current.texReady=false;};},[refresh,webglInitKey]);// Resize handler\nconst handleResize=useCallback(()=>{const container=containerRef.current;const canvas=canvasRef.current;const sticker=stickerRef.current;const gl=glRef.current;const state=stateRef.current;if(!container||!canvas||!sticker||!gl)return;const containerWidth=container.clientWidth||200;const containerHeight=container.clientHeight||200;// Calculate contained dimensions (maintain aspect ratio)\nconst{width,height}=calculateContainedDimensions(containerWidth,containerHeight,state.imageAspectRatio);// Add padding to canvas for extra space to prevent clipping during animations\n// Padding scales with elevation to accommodate the lift/scale effect\nconst maxDim=Math.max(width,height);const elevationPad=maxDim*elevation*.6// extra padding based on elevation\n;const effectivePad=PAD_BASE+elevationPad;const canvasWidth=width+effectivePad*2;const canvasHeight=height+effectivePad*2;// Calculate scale factor to fit content within padded canvas\n// Use the smaller scale to ensure content fits in both dimensions\nconst scaleX=width/canvasWidth;const scaleY=height/canvasHeight;const scale=Math.min(scaleX,scaleY);// Center the sticker within the container\nconst x=(containerWidth-width)/2;const y=(containerHeight-height)/2;// Update canvas size (larger with padding)\ncanvas.width=Math.round(canvasWidth*RENDER_SCALE);canvas.height=Math.round(canvasHeight*RENDER_SCALE);canvas.style.width=`${canvasWidth}px`;canvas.style.height=`${canvasHeight}px`;// Center canvas within sticker element (canvas is larger due to padding)\ncanvas.style.position=\"absolute\";canvas.style.left=`${-effectivePad}px`;canvas.style.top=`${-effectivePad}px`;// Update sticker element size and position (centered, visible size without padding)\nsticker.style.width=`${width}px`;sticker.style.height=`${height}px`;sticker.style.left=`${x}px`;sticker.style.top=`${y}px`;// Update state\nstate.width=width;state.height=height;state.x=x;state.y=y;state.scale=scale;// Update WebGL viewport\ngl.viewport(0,0,canvas.width,canvas.height);// Redraw if texture is ready\nif(state.texReady){draw();}},[draw,elevation]);// Load image\nuseEffect(()=>{const imageSrc=resolveImageSource(image);if(!imageSrc)return;const gl=glRef.current;if(!gl||!programRef.current)return;const img=new Image;img.crossOrigin=\"anonymous\";img.onload=()=>{const state=stateRef.current;// Store image aspect ratio for contained sizing\nstate.imageAspectRatio=img.width/img.height;// Load texture\nif(textureRef.current){gl.deleteTexture(textureRef.current);}const texture=gl.createTexture();if(!texture)return;gl.bindTexture(gl.TEXTURE_2D,texture);gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL,false);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,img);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);textureRef.current=texture;state.texReady=true;// Resize with contained dimensions\nhandleResize();updateShadowCSS();};img.onerror=()=>{console.error(\"Failed to load image\");};img.src=imageSrc;return()=>{stateRef.current.texReady=false;};},[image,handleResize,updateShadowCSS,webglInitKey]);// Handle container resize\n// Debounced apply: avoid feedback loop (fit = grow forever) and perf storms\nconst applyResizeRef=useRef(null);const SIZING_THRESHOLD=5// only update sizing when container changed by this much (stops fit feedback loop)\n;const RESIZE_DEBOUNCE_MS=180;const scheduleResize=useCallback((measuredW,measuredH)=>{if(applyResizeRef.current)clearTimeout(applyResizeRef.current);applyResizeRef.current=setTimeout(()=>{applyResizeRef.current=null;setSizingDimensions(prev=>{const w=Math.max(1,Math.round(measuredW))||prev.width;const h=Math.max(1,Math.round(measuredH))||prev.height;// Only update if change is significant (prevents fit feedback + jitter)\nconst dw=Math.abs(w-prev.width);const dh=Math.abs(h-prev.height);if(dw<SIZING_THRESHOLD&&dh<SIZING_THRESHOLD)return prev;return{width:w,height:h};});handleResize();},RESIZE_DEBOUNCE_MS);},[handleResize]);// Resize detection: zoom-probe in canvas (ignore zoom), ResizeObserver in preview; sizing div prevents fit collapse\nuseEffect(()=>{const container=containerRef.current;if(!container)return;handleResize();const isCanvas=RenderTarget.current()===RenderTarget.canvas;if(isCanvas&&zoomProbeRef.current){let rafId=0;const TICK_MS=400// throttle probe checks\n;const EPS=2;const last={ts:0,zoom:0,w:0,h:0};const tick=now=>{const probe=zoomProbeRef.current;if(!container||!probe){rafId=requestAnimationFrame(tick);return;}// Use actual CSS pixel dimensions (don't divide by zoom - that causes exponential growth when zoomed out)\nconst cw=container.clientWidth||container.offsetWidth||0;const ch=container.clientHeight||container.offsetHeight||0;const zoom=probe.getBoundingClientRect().width/20;const timeOk=!last.ts||(now??performance.now())-last.ts>=TICK_MS;// Only call handleResize when zoom OR actual size changed; use actual CSS pixels for sizing\nconst zoomChanged=Math.abs(zoom-last.zoom)>.001;const sizeChanged=Math.abs(cw-last.w)>EPS||Math.abs(ch-last.h)>EPS;if(timeOk&&(sizeChanged||zoomChanged)){last.ts=now??performance.now();last.zoom=zoom;last.w=cw;last.h=ch;// Sizing div uses CSS pixels (cw, ch), not logical; handleResize for any zoom/size change\nif(cw>=1&&ch>=1){scheduleResize(cw,ch);}}rafId=requestAnimationFrame(tick);};rafId=requestAnimationFrame(tick);return()=>{cancelAnimationFrame(rafId);if(applyResizeRef.current)clearTimeout(applyResizeRef.current);};}const ro=new ResizeObserver(()=>{const w=container.clientWidth||container.offsetWidth||400;const h=container.clientHeight||container.offsetHeight||400;scheduleResize(w,h);});ro.observe(container);return()=>{ro.disconnect();if(applyResizeRef.current)clearTimeout(applyResizeRef.current);};},[handleResize,scheduleResize]);// Mouse down handler\nconst handleMouseDown=useCallback(e=>{e.preventDefault();const state=stateRef.current;const container=containerRef.current;const sticker=stickerRef.current;const inner=innerRef.current;if(!container||!sticker||!inner)return;const rect=sticker.getBoundingClientRect();// Calculate grab point for tilt pivot\nconst grabOffsetX=e.clientX-rect.left;const grabOffsetY=e.clientY-rect.top;inner.style.transformOrigin=`${grabOffsetX}px ${grabOffsetY}px`;// Calculate angle from sticker center to click point\nconst centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;const dx=e.clientX-centerX;const dy=e.clientY-centerY// Y goes down in screen coords, matches flipped UV\n;state.peelAngle=Math.atan2(dy,dx);// Store drag start\nstate.dragStartX=e.clientX;state.dragStartY=e.clientY;state.dragOrigX=state.x;state.dragOrigY=state.y;// Reset state for new peel\nstate.peel=0;state.lift=0;state.held=true;state.peeling=true;state.sticking=false;// Reset velocity tracking\nstate.lastMoveX=e.clientX;state.lastMoveY=e.clientY;state.lastMoveT=performance.now();// Bring container to front by setting incrementing z-index\ncontainer.style.zIndex=`${getNextZIndex()}`;// Start animation loop\nensureTickRunning();},[ensureTickRunning]);// Mouse move handler\nuseEffect(()=>{const handleMouseMove=e=>{const state=stateRef.current;if(!state.held)return;const sticker=stickerRef.current;const inner=innerRef.current;if(!sticker||!inner)return;// Update position\nstate.x=state.dragOrigX+(e.clientX-state.dragStartX);state.y=state.dragOrigY+(e.clientY-state.dragStartY);sticker.style.left=`${state.x}px`;sticker.style.top=`${state.y}px`;// Calculate velocity\nconst now=performance.now();const dt=Math.max(1,now-state.lastMoveT);const velX=(e.clientX-state.lastMoveX)/dt*16// normalize to ~60fps\n;const velY=(e.clientY-state.lastMoveY)/dt*16;state.lastMoveX=e.clientX;state.lastMoveY=e.clientY;state.lastMoveT=now;// Tilt based on velocity (clamped)\nconst targetTiltY=Math.max(-DRAG_MAX_TILT_DEG,Math.min(DRAG_MAX_TILT_DEG,velX*tiltSensitivity));const targetTiltX=Math.max(-DRAG_MAX_TILT_DEG,Math.min(DRAG_MAX_TILT_DEG,-velY*tiltSensitivity));// Smooth toward target\nstate.dragTiltX+=(targetTiltX-state.dragTiltX)*tiltSmoothing;state.dragTiltY+=(targetTiltY-state.dragTiltY)*tiltSmoothing;// Store for shader\nstate.currentTiltX=state.dragTiltX;state.currentTiltY=state.dragTiltY;// In holo mode, show effect only while tilting (cursor moving)\nif(sheenMode===\"holo\"){const tiltDelta=Math.abs(state.dragTiltX-state.prevTiltX)+Math.abs(state.dragTiltY-state.prevTiltY);state.holoMotion=Math.min(1,state.holoMotion+tiltDelta*HOLO_MOTION_BUMP);state.prevTiltX=state.dragTiltX;state.prevTiltY=state.dragTiltY;}// Apply CSS 3D transform for tilt\ninner.style.transform=`rotateX(${state.dragTiltX}deg) rotateY(${state.dragTiltY}deg)`;};const handleMouseUp=()=>{const state=stateRef.current;if(!state.held)return;const inner=innerRef.current;state.held=false;state.peeling=false;state.sticking=true;// Reverse peel angle for paste if peel completed\nif(state.peel>=.95&&inner){const rect=inner.getBoundingClientRect();const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;const dx=state.lastMoveX-centerX;const dy=state.lastMoveY-centerY// Y goes down in screen coords\n;state.peelAngle=Math.atan2(-dy,-dx);state.peel=1;}// Animate tilt back to zero\nconst settleTilt=()=>{state.dragTiltX*=.9;state.dragTiltY*=.9;state.currentTiltX=state.dragTiltX;state.currentTiltY=state.dragTiltY;if(inner){inner.style.transform=`rotateX(${state.dragTiltX}deg) rotateY(${state.dragTiltY}deg)`;}if(Math.abs(state.dragTiltX)>.1||Math.abs(state.dragTiltY)>.1){requestAnimationFrame(settleTilt);}else{state.dragTiltX=0;state.dragTiltY=0;state.currentTiltX=0;state.currentTiltY=0;state.prevTiltX=0;state.prevTiltY=0;if(inner){inner.style.transform=\"\";}}};settleTilt();// Continue animation for paste (and holo fade in holo mode)\nensureTickRunning();};window.addEventListener(\"mousemove\",handleMouseMove);window.addEventListener(\"mouseup\",handleMouseUp);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);window.removeEventListener(\"mouseup\",handleMouseUp);};},[tiltSensitivity,tiltSmoothing,ensureTickRunning,sheenMode]);// Touch handlers\nconst handleTouchStart=useCallback(e=>{e.preventDefault();const touch=e.touches[0];if(!touch)return;const state=stateRef.current;const container=containerRef.current;const sticker=stickerRef.current;const inner=innerRef.current;if(!container||!sticker||!inner)return;const rect=sticker.getBoundingClientRect();const grabOffsetX=touch.clientX-rect.left;const grabOffsetY=touch.clientY-rect.top;inner.style.transformOrigin=`${grabOffsetX}px ${grabOffsetY}px`;const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;const dx=touch.clientX-centerX;const dy=touch.clientY-centerY// Y goes down in screen coords, matches flipped UV\n;state.peelAngle=Math.atan2(dy,dx);state.dragStartX=touch.clientX;state.dragStartY=touch.clientY;state.dragOrigX=state.x;state.dragOrigY=state.y;state.peel=0;state.lift=0;state.held=true;state.peeling=true;state.sticking=false;state.lastMoveX=touch.clientX;state.lastMoveY=touch.clientY;state.lastMoveT=performance.now();// Bring container to front by setting incrementing z-index\ncontainer.style.zIndex=`${getNextZIndex()}`;ensureTickRunning();},[ensureTickRunning]);useEffect(()=>{const handleTouchMove=e=>{const touch=e.touches[0];if(!touch)return;const state=stateRef.current;if(!state.held)return;const sticker=stickerRef.current;const inner=innerRef.current;if(!sticker||!inner)return;state.x=state.dragOrigX+(touch.clientX-state.dragStartX);state.y=state.dragOrigY+(touch.clientY-state.dragStartY);sticker.style.left=`${state.x}px`;sticker.style.top=`${state.y}px`;const now=performance.now();const dt=Math.max(1,now-state.lastMoveT);const velX=(touch.clientX-state.lastMoveX)/dt*16;const velY=(touch.clientY-state.lastMoveY)/dt*16;state.lastMoveX=touch.clientX;state.lastMoveY=touch.clientY;state.lastMoveT=now;const targetTiltY=Math.max(-DRAG_MAX_TILT_DEG,Math.min(DRAG_MAX_TILT_DEG,velX*tiltSensitivity));const targetTiltX=Math.max(-DRAG_MAX_TILT_DEG,Math.min(DRAG_MAX_TILT_DEG,-velY*tiltSensitivity));state.dragTiltX+=(targetTiltX-state.dragTiltX)*tiltSmoothing;state.dragTiltY+=(targetTiltY-state.dragTiltY)*tiltSmoothing;state.currentTiltX=state.dragTiltX;state.currentTiltY=state.dragTiltY;if(sheenMode===\"holo\"){const tiltDelta=Math.abs(state.dragTiltX-state.prevTiltX)+Math.abs(state.dragTiltY-state.prevTiltY);state.holoMotion=Math.min(1,state.holoMotion+tiltDelta*HOLO_MOTION_BUMP);state.prevTiltX=state.dragTiltX;state.prevTiltY=state.dragTiltY;}inner.style.transform=`rotateX(${state.dragTiltX}deg) rotateY(${state.dragTiltY}deg)`;};const handleTouchEnd=()=>{const state=stateRef.current;if(!state.held)return;const inner=innerRef.current;state.held=false;state.peeling=false;state.sticking=true;if(state.peel>=.95&&inner){const rect=inner.getBoundingClientRect();const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;const dx=state.lastMoveX-centerX;const dy=state.lastMoveY-centerY// Y goes down in screen coords\n;state.peelAngle=Math.atan2(-dy,-dx);state.peel=1;}const settleTilt=()=>{state.dragTiltX*=.9;state.dragTiltY*=.9;state.currentTiltX=state.dragTiltX;state.currentTiltY=state.dragTiltY;if(inner){inner.style.transform=`rotateX(${state.dragTiltX}deg) rotateY(${state.dragTiltY}deg)`;}if(Math.abs(state.dragTiltX)>.1||Math.abs(state.dragTiltY)>.1){requestAnimationFrame(settleTilt);}else{state.dragTiltX=0;state.dragTiltY=0;state.currentTiltX=0;state.currentTiltY=0;state.prevTiltX=0;state.prevTiltY=0;if(inner){inner.style.transform=\"\";}}};settleTilt();ensureTickRunning();};window.addEventListener(\"touchmove\",handleTouchMove,{passive:false});window.addEventListener(\"touchend\",handleTouchEnd);return()=>{window.removeEventListener(\"touchmove\",handleTouchMove);window.removeEventListener(\"touchend\",handleTouchEnd);};},[tiltSensitivity,tiltSmoothing,ensureTickRunning,sheenMode]);// Show warning when WebGL context is lost (too many stickers in canvas)\nif(contextLost){return /*#__PURE__*/_jsx(ComponentMessage,{title:\"⚠️ Don't worry, this is normal.\",subtitle:\"There are currently more stickers in Canvas than Browsers can handle. Tweak Refresh to see the sticker re-appear. If you don't add too many stickers, you won't have issues in preview or deployed website.\"});}return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"visible\",perspective:\"800px\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:sizingDimensions.width,height:sizingDimensions.height,minWidth:sizingDimensions.width,minHeight:sizingDimensions.height,opacity:0,pointerEvents:\"none\",userSelect:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{ref:zoomProbeRef,style:{position:\"absolute\",width:20,height:20,top:0,left:0,opacity:0,pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{ref:stickerRef,style:{position:\"absolute\",width:\"100%\",height:\"100%\",cursor:\"grab\",userSelect:\"none\",perspective:\"800px\",transformStyle:\"preserve-3d\",willChange:\"transform\",overflow:\"visible\"},onMouseDown:handleMouseDown,onTouchStart:handleTouchStart,children:/*#__PURE__*/_jsx(\"div\",{ref:innerRef,style:{position:\"absolute\",width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{display:\"block\",pointerEvents:\"none\",position:\"absolute\"}})})})]});}// ============================================================================\n// PROPERTY CONTROLS\n// ============================================================================\naddPropertyControls(StickerDrag,{refresh:{type:ControlType.Boolean,title:\"Refresh\",defaultValue:false,enabledTitle:\"•\",disabledTitle:\"•\",description:\"Toggle if the sticker is showing an error to see it again\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},tiltSensitivity:{type:ControlType.Number,title:\"Tilt\",min:TILT_DISPLAY_MIN,max:TILT_DISPLAY_MAX,step:.1,defaultValue:.5},sheenStrength:{type:ControlType.Number,title:\"Lighting\",min:0,max:1,step:.1,defaultValue:SHEEN_STRENGTH},sheenMode:{type:ControlType.Enum,title:\"Sheen\",options:[\"sheen\",\"holo\"],optionTitles:[\"Sheen\",\"Holographic\"],defaultValue:\"sheen\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},elevation:{type:ControlType.Number,title:\"Elevation\",min:0,max:1,step:.1,defaultValue:ELEVATION_DEFAULT_DISPLAY},staticShadow:{//@ts-ignore\ntype:ControlType.BoxShadow,title:\"Static\",defaultValue:STATIC_SHADOW_DEFAULT},dynamicShadow:{//@ts-ignore\ntype:ControlType.BoxShadow,title:\"Elevated\",defaultValue:DYNAMIC_SHADOW_DEFAULT,description:\"More components at [Framer University](https://frameruni.link/cc).\"}});StickerDrag.displayName=\"Sticker Drag\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StickerDrag\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickerDrag_prod.map"],"mappings":"kRAUG,SAAS,IAAe,CAAkB,MAAjB,IAAe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