[{"data":1,"prerenderedAt":316,"buildId":317},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Fop\u002Fsplat":3,"github-stars":224,"guide-nav":226},{"id":4,"title":5,"body":6,"categoryId":54,"categorySlug":54,"categoryTitle":209,"curated":210,"description":211,"editUrl":212,"extension":213,"group":214,"groupTitle":215,"kind":216,"meta":217,"navigation":218,"path":219,"seo":220,"sourceUrl":221,"stem":222,"wordCount":212,"__hash__":223},"primitives\u002Fdocs\u002Fprimitives\u002F47.op\u002F2.splat.md","splat",{"type":7,"value":8,"toc":203},"minimark",[9,12,21,49,64,69,106,110,156,160,199],[10,11,5],"h1",{"id":5},[13,14,15,16,20],"p",{},"A brush step: a soft round push into ",[17,18,19],"code",{},".x"," at the pointer, scaled by how fast it moves.",[22,23,28],"pre",{"className":24,"code":25,"language":26,"meta":27,"style":27},"language-ts shiki shiki-themes github-dark","splat(config: {at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef | number}): SplatOp\n","ts","",[17,29,30],{"__ignoreMap":27},[31,32,35,38,42,46],"span",{"class":33,"line":34},"line",1,[31,36,5],{"class":37},"svObZ",[31,39,41],{"class":40},"s95oV","(config: {at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef ",[31,43,45],{"class":44},"snl16","|",[31,47,48],{"class":40}," number}): SplatOp\n",[13,50,51,52,55,56,59,60,63],{},"Import ",[17,53,54],{},"op"," from ",[17,57,58],{},"shaders\u002Fstd"," and use ",[17,61,62],{},"op.splat",".",[65,66,68],"h2",{"id":67},"parameters","Parameters",[70,71,72,88],"table",{},[73,74,75],"thead",{},[76,77,78,82,85],"tr",{},[79,80,81],"th",{},"Name",[79,83,84],{},"Type",[79,86,87],{},"Notes",[89,90,91],"tbody",{},[76,92,93,99,104],{},[94,95,96],"td",{},[17,97,98],{},"config",[94,100,101],{},[17,102,103],{},"{at: PointerSignal; amount: PointerSpeedSignal; radius: PropRef | number}",[94,105],{},[65,107,109],{"id":108},"example","Example",[22,111,113],{"className":24,"code":112,"language":26,"meta":27,"style":27},"op.splat({at: pointer(), amount: pointerSpeed({max: 2}), radius: p('radius')})\n",[17,114,115],{"__ignoreMap":27},[31,116,117,120,122,125,128,131,134,137,141,144,146,149,153],{"class":33,"line":34},[31,118,119],{"class":40},"op.",[31,121,5],{"class":37},[31,123,124],{"class":40},"({at: ",[31,126,127],{"class":37},"pointer",[31,129,130],{"class":40},"(), amount: ",[31,132,133],{"class":37},"pointerSpeed",[31,135,136],{"class":40},"({max: ",[31,138,140],{"class":139},"sDLfK","2",[31,142,143],{"class":40},"}), radius: ",[31,145,13],{"class":37},[31,147,148],{"class":40},"(",[31,150,152],{"class":151},"sU2Wk","'radius'",[31,154,155],{"class":40},")})\n",[65,157,159],{"id":158},"see-also","See also",[161,162,163,178,187],"ul",{},[164,165,166,173,174,177],"li",{},[167,168,170],"a",{"href":169},"\u002Fdocs\u002Fprimitives\u002Fop\u002Fwave",[17,171,172],{},"wave"," — A wave step: the grid ripples outward from any disturbance and fades by ",[17,175,176],{},"damping"," (a prop or number, 0–20).",[164,179,180,186],{},[167,181,183],{"href":182},"\u002Fdocs\u002Fprimitives\u002Finvoke\u002Fctx-pointer",[17,184,185],{},"ctx.pointer"," — The mouse position in uv (0–1, y down).",[164,188,189,194,195,198],{},[167,190,192],{"href":191},"\u002Fdocs\u002Fprimitives\u002Fsignal\u002Fpointerspeed",[17,193,133],{}," — The pointer's speed, capped at ",[17,196,197],{},"max",", as the strength of a simulation step.",[200,201,202],"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}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}",{"title":27,"searchDepth":204,"depth":204,"links":205},2,[206,207,208],{"id":67,"depth":204,"text":68},{"id":108,"depth":204,"text":109},{"id":158,"depth":204,"text":159},"Grid steps",false,"A brush step: a soft round push into `.x` at the pointer, scaled by how fast it moves.",null,"md","simulation","Simulation","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fop\u002Fsplat",{"title":5,"description":211},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fops.ts#L108","docs\u002Fprimitives\u002F47.op\u002F2.splat","8lpQqob9M9hflqltq7Khm39h6RIH8c2l979WOeKp0A4",{"stars":225},6080,[227,231,235,239,243,247,251,255,259,263,267,271,275,279,283,287,291,296,300,304,308,312],{"path":228,"title":229,"description":230,"category":17},"\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":232,"title":233,"description":234,"category":17},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":236,"title":237,"description":238,"category":17},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":240,"title":241,"description":242,"category":17},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":244,"title":245,"description":246,"category":17},"\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":248,"title":249,"description":250,"category":17},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":252,"title":253,"description":254,"category":17},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":256,"title":257,"description":258,"category":17},"\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":260,"title":261,"description":262,"category":17},"\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":264,"title":265,"description":266,"category":17},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":268,"title":269,"description":270,"category":17},"\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":272,"title":273,"description":274,"category":17},"\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":276,"title":277,"description":278,"category":17},"\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":280,"title":281,"description":282,"category":17},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":284,"title":285,"description":286,"category":17},"\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":288,"title":289,"description":290,"category":17},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":292,"title":293,"description":294,"category":295},"\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":297,"title":298,"description":299,"category":295},"\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":301,"title":302,"description":303,"category":295},"\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":305,"title":306,"description":307,"category":17},"\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":309,"title":310,"description":311,"category":17},"\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":313,"title":314,"description":315,"category":17},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051186215,"06e02370-81a6-4d74-9931-661d71414be1"]