[{"data":1,"prerenderedAt":272,"buildId":273},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Feffects-overlay\u002Froundrectsd":3,"github-stars":180,"guide-nav":182},{"id":4,"title":5,"body":6,"categoryId":164,"categorySlug":165,"categoryTitle":166,"curated":167,"description":168,"editUrl":169,"extension":170,"group":85,"groupTitle":171,"kind":172,"meta":173,"navigation":174,"path":175,"seo":176,"sourceUrl":177,"stem":178,"wordCount":169,"__hash__":179},"primitives\u002Fdocs\u002Fprimitives\u002F34.effects-overlay\u002F5.roundrectsd.md","roundRectSD",{"type":7,"value":8,"toc":161},"minimark",[9,13,34,80,94,101,106,157],[10,11,5],"h1",{"id":12},"roundrectsd",[14,15,16,17,21,22,25,26,29,30,33],"p",{},"Signed distance to a (rounded) rectangle: emits the classic sdRoundRect ",[18,19,20],"code",{},"q","\u002F",[18,23,24],{},"sd"," pair for the centre-relative point ",[18,27,28],{},"pp"," against half-extent ",[18,31,32],{},"half",".",[35,36,41],"pre",{"className":37,"code":38,"language":39,"meta":40,"style":40},"language-ts shiki shiki-themes github-dark","roundRectSD(\n  names: {q: string; sd: string},\n  opts: {pp: string; half: string; radius?: string},\n): string[]\n","ts","",[18,42,43,55,61,74],{"__ignoreMap":40},[44,45,48,51],"span",{"class":46,"line":47},"line",1,[44,49,5],{"class":50},"svObZ",[44,52,54],{"class":53},"s95oV","(\n",[44,56,58],{"class":46,"line":57},2,[44,59,60],{"class":53},"  names: {q: string; sd: string},\n",[44,62,64,67,71],{"class":46,"line":63},3,[44,65,66],{"class":53},"  opts: {pp: string; half: string; radius",[44,68,70],{"class":69},"snl16","?:",[44,72,73],{"class":53}," string},\n",[44,75,77],{"class":46,"line":76},4,[44,78,79],{"class":53},"): string[]\n",[14,81,82,83,86,87,90,91,33],{},"Import ",[18,84,85],{},"effects"," from ",[18,88,89],{},"shaders\u002Fstd"," and use ",[18,92,93],{},"effects.overlay.roundRectSD",[14,95,96,97,100],{},"With ",[18,98,99],{},"radius"," omitted the radius terms are not emitted at all (a sharp box, not a zero-radius one).",[102,103,105],"h2",{"id":104},"parameters","Parameters",[107,108,109,125],"table",{},[110,111,112],"thead",{},[113,114,115,119,122],"tr",{},[116,117,118],"th",{},"Name",[116,120,121],{},"Type",[116,123,124],{},"Notes",[126,127,128,143],"tbody",{},[113,129,130,136,141],{},[131,132,133],"td",{},[18,134,135],{},"names",[131,137,138],{},[18,139,140],{},"{q: string; sd: string}",[131,142],{},[113,144,145,150,155],{},[131,146,147],{},[18,148,149],{},"opts",[131,151,152],{},[18,153,154],{},"{pp: string; half: string; radius?: string}",[131,156],{},[158,159,160],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":40,"searchDepth":57,"depth":57,"links":162},[163],{"id":104,"depth":57,"text":105},"effects.overlay","effects-overlay","Overlays",false,"Signed distance to a (rounded) rectangle: emits the classic sdRoundRect `q`\u002F`sd` pair for the centre-relative point `pp` against half-extent `half`.",null,"md","Filters & effects","function",{},true,"\u002Fdocs\u002Fprimitives\u002Feffects-overlay\u002Froundrectsd",{"title":5,"description":168},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Feffects\u002Foverlay.ts#L31","docs\u002Fprimitives\u002F34.effects-overlay\u002F5.roundrectsd","z2-krwxB2T6BQzULtqCnRWpOJ5LnFkH0XWuomCHgdVM",{"stars":181},6080,[183,187,191,195,199,203,207,211,215,219,223,227,231,235,239,243,247,252,256,260,264,268],{"path":184,"title":185,"description":186,"category":18},"\u002Fdocs\u002Fguide","Getting started","Shaders is a desktop app where your AI agent designs interactive effects on an infinite canvas, and you shape them by hand.",{"path":188,"title":189,"description":190,"category":18},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":192,"title":193,"description":194,"category":18},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":196,"title":197,"description":198,"category":18},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":200,"title":201,"description":202,"category":18},"\u002Fdocs\u002Fguide\u002Fprops-reactivity","Props and reactivity","Bind props to your framework's state so effects update when it changes, and animate props with an animation library.",{"path":204,"title":205,"description":206,"category":18},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":208,"title":209,"description":210,"category":18},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":212,"title":213,"description":214,"category":18},"\u002Fdocs\u002Fguide\u002Flayout-positioning","Layout and positioning","Size and place a shader in your page with CSS, as a background, a fill, or an inline block.",{"path":216,"title":217,"description":218,"category":18},"\u002Fdocs\u002Fguide\u002Fsizing-and-units","Sizing and units","Size and place layers in CSS units (px, %, vw, rem, and canvas units) that stay correct as the canvas and window resize.",{"path":220,"title":221,"description":222,"category":18},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":224,"title":225,"description":226,"category":18},"\u002Fdocs\u002Fguide\u002Fshape-effects","Shape effects","Pick the 2D, 3D or custom SVG shape that Glass, Neon, Emboss and other shape effects draw inside.",{"path":228,"title":229,"description":230,"category":18},"\u002Fdocs\u002Fguide\u002Fcolor-space","Color space","Match colors to your design tool with the output color space, and keep bright layers from clipping with tone mapping.",{"path":232,"title":233,"description":234,"category":18},"\u002Fdocs\u002Fguide\u002Fhooks-events","Hooks and events","Run code when an effect is ready to show, and show a fallback when the GPU can't run it.",{"path":236,"title":237,"description":238,"category":18},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":240,"title":241,"description":242,"category":18},"\u002Fdocs\u002Fguide\u002Fcustom-shaders","Custom components","Write your own component in TypeScript, use it like any component in the library, and write WGSL by hand when you need to.",{"path":244,"title":245,"description":246,"category":18},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":248,"title":249,"description":250,"category":251},"\u002Fdocs\u002Fguide\u002Fmcp","Working with your agent","The Shaders MCP connects your AI agent to the desktop app, so it can design shaders on your canvas and install them in your project.","workflows",{"path":253,"title":254,"description":255,"category":251},"\u002Fdocs\u002Fguide\u002Fcli","Working with the CLI","The Shaders CLI installs shaders from your projects and the Pro library into your codebase as component files, and keeps them in sync as you keep designing.",{"path":257,"title":258,"description":259,"category":251},"\u002Fdocs\u002Fguide\u002Fframeworks","Supported frameworks","Shaders runs in any web project that renders in a browser with WebGPU, with components for React, Vue, Svelte and Solid and a JavaScript API for everything else.",{"path":261,"title":262,"description":263,"category":18},"\u002Fdocs\u002Fguide\u002Fagent-skill","Agent skill for the engine","Teach your coding agent to write Shaders code with the open-source engine, for when it's working in your codebase instead of on the canvas.",{"path":265,"title":266,"description":267,"category":18},"\u002Fdocs\u002Fguide\u002Fvideo-rendering","Rendering to video","Render a shader effect to video frame by frame, from Remotion, Hyperframes or your own headless Chrome script.",{"path":269,"title":270,"description":271,"category":18},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051185886,"06e02370-81a6-4d74-9931-661d71414be1"]