[{"data":1,"prerenderedAt":279,"buildId":280},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Fop\u002Freactdiffuse":3,"github-stars":187,"guide-nav":189},{"id":4,"title":5,"body":6,"categoryId":59,"categorySlug":59,"categoryTitle":172,"curated":173,"description":174,"editUrl":175,"extension":176,"group":177,"groupTitle":178,"kind":179,"meta":180,"navigation":181,"path":182,"seo":183,"sourceUrl":184,"stem":185,"wordCount":175,"__hash__":186},"primitives\u002Fdocs\u002Fprimitives\u002F47.op\u002F6.reactdiffuse.md","reactDiffuse",{"type":7,"value":8,"toc":167},"minimark",[9,13,26,54,68,89,94,131,135,163],[10,11,5],"h1",{"id":12},"reactdiffuse",[14,15,16,17,21,22,25],"p",{},"Gray-Scott reaction-diffusion on ",[18,19,20],"code",{},".x"," and ",[18,23,24],{},".y",".",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-ts shiki shiki-themes github-dark","reactDiffuse(config: {feed: OpArg; kill: OpArg; speed?: OpArg}): ReactDiffuseOp\n","ts","",[18,34,35],{"__ignoreMap":32},[36,37,40,43,47,51],"span",{"class":38,"line":39},"line",1,[36,41,5],{"class":42},"svObZ",[36,44,46],{"class":45},"s95oV","(config: {feed: OpArg; kill: OpArg; speed",[36,48,50],{"class":49},"snl16","?:",[36,52,53],{"class":45}," OpArg}): ReactDiffuseOp\n",[14,55,56,57,60,61,64,65,25],{},"Import ",[18,58,59],{},"op"," from ",[18,62,63],{},"shaders\u002Fstd"," and use ",[18,66,67],{},"op.reactDiffuse",[14,69,70,71,73,74,77,78,81,82,85,86,25],{},"Seed ",[18,72,24],{}," with ",[18,75,76],{},"init",". Classic settings: spots ",[18,79,80],{},"feed 0.035, kill 0.065","; mazes ",[18,83,84],{},"0.029, 0.057","; coral ",[18,87,88],{},"0.0545, 0.062",[90,91,93],"h2",{"id":92},"parameters","Parameters",[95,96,97,113],"table",{},[98,99,100],"thead",{},[101,102,103,107,110],"tr",{},[104,105,106],"th",{},"Name",[104,108,109],{},"Type",[104,111,112],{},"Notes",[114,115,116],"tbody",{},[101,117,118,124,129],{},[119,120,121],"td",{},[18,122,123],{},"config",[119,125,126],{},[18,127,128],{},"{feed: OpArg; kill: OpArg; speed?: OpArg}",[119,130],{},[90,132,134],{"id":133},"example","Example",[27,136,138],{"className":29,"code":137,"language":31,"meta":32,"style":32},"op.reactDiffuse({feed: 0.055, kill: 0.062})\n",[18,139,140],{"__ignoreMap":32},[36,141,142,145,147,150,154,157,160],{"class":38,"line":39},[36,143,144],{"class":45},"op.",[36,146,5],{"class":42},[36,148,149],{"class":45},"({feed: ",[36,151,153],{"class":152},"sDLfK","0.055",[36,155,156],{"class":45},", kill: ",[36,158,159],{"class":152},"0.062",[36,161,162],{"class":45},"})\n",[164,165,166],"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);}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}",{"title":32,"searchDepth":168,"depth":168,"links":169},2,[170,171],{"id":92,"depth":168,"text":93},{"id":133,"depth":168,"text":134},"Grid steps",false,"Gray-Scott reaction-diffusion on `.x` and `.y`.",null,"md","simulation","Simulation","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fop\u002Freactdiffuse",{"title":5,"description":174},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fops.ts#L143","docs\u002Fprimitives\u002F47.op\u002F6.reactdiffuse","e1NVxoPzVy3yZ1KFXK4mPKwdO48xZPAMnRNL2XksBgA",{"stars":188},6080,[190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,254,259,263,267,271,275],{"path":191,"title":192,"description":193,"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":195,"title":196,"description":197,"category":18},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":199,"title":200,"description":201,"category":18},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":203,"title":204,"description":205,"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":207,"title":208,"description":209,"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":211,"title":212,"description":213,"category":18},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":215,"title":216,"description":217,"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":219,"title":220,"description":221,"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":223,"title":224,"description":225,"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":227,"title":228,"description":229,"category":18},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":231,"title":232,"description":233,"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":235,"title":236,"description":237,"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":239,"title":240,"description":241,"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":243,"title":244,"description":245,"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":247,"title":248,"description":249,"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":251,"title":252,"description":253,"category":18},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":255,"title":256,"description":257,"category":258},"\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":260,"title":261,"description":262,"category":258},"\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":264,"title":265,"description":266,"category":258},"\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":268,"title":269,"description":270,"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":272,"title":273,"description":274,"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":276,"title":277,"description":278,"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.",1796051186248,"06e02370-81a6-4d74-9931-661d71414be1"]