[{"data":1,"prerenderedAt":320,"buildId":321},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs-trail\u002Fpointertrail":3,"github-stars":228,"guide-nav":230},{"id":4,"title":5,"body":6,"categoryId":212,"categorySlug":213,"categoryTitle":214,"curated":215,"description":216,"editUrl":217,"extension":218,"group":158,"groupTitle":219,"kind":220,"meta":221,"navigation":222,"path":223,"seo":224,"sourceUrl":225,"stem":226,"wordCount":217,"__hash__":227},"primitives\u002Fdocs\u002Fprimitives\u002F44.inputs-trail\u002F1.pointertrail.md","pointerTrail",{"type":7,"value":8,"toc":208},"minimark",[9,13,26,76,85,99,104,145,149,204],[10,11,5],"h1",{"id":12},"pointertrail",[14,15,16,17,21,22,25],"p",{},"The pointer's recent path as a field in ",[18,19,20],"code",{},".x"," (0–1), read by name: ",[18,23,24],{},"trail(uv).x",".",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-ts shiki shiki-themes github-dark","pointerTrail(opts: {decay?: number | PropRef; radius?: number | PropRef; resolution?: number} = {}): PointerTrailInput\n","ts","",[18,34,35],{"__ignoreMap":32},[36,37,40,43,47,51,54,57,60,62,65,67,70,73],"span",{"class":38,"line":39},"line",1,[36,41,5],{"class":42},"svObZ",[36,44,46],{"class":45},"s95oV","(opts: {decay?: number ",[36,48,50],{"class":49},"snl16","|",[36,52,53],{"class":45}," PropRef; radius",[36,55,56],{"class":49},"?:",[36,58,59],{"class":45}," number ",[36,61,50],{"class":49},[36,63,64],{"class":45}," PropRef; resolution",[36,66,56],{"class":49},[36,68,69],{"class":45}," number} ",[36,71,72],{"class":49},"=",[36,74,75],{"class":45}," {}): PointerTrailInput\n",[14,77,78,79,81,82,25],{},"Import ",[18,80,5],{}," from ",[18,83,84],{},"shaders\u002Fstd",[14,86,87,90,91,94,95,98],{},[18,88,89],{},"decay"," is how many seconds a mark takes to halve; ",[18,92,93],{},"radius"," the brush size as a fraction of the height. Both take a number or a prop (",[18,96,97],{},"p('reach')","), read live each frame.",[100,101,103],"h2",{"id":102},"parameters","Parameters",[105,106,107,123],"table",{},[108,109,110],"thead",{},[111,112,113,117,120],"tr",{},[114,115,116],"th",{},"Name",[114,118,119],{},"Type",[114,121,122],{},"Notes",[124,125,126],"tbody",{},[111,127,128,134,139],{},[129,130,131],"td",{},[18,132,133],{},"opts",[129,135,136],{},[18,137,138],{},"{decay?: number | PropRef; radius?: number | PropRef; resolution?: number}",[129,140,141,142,25],{},"Optional. Default ",[18,143,144],{},"{}",[100,146,148],{"id":147},"example","Example",[27,150,152],{"className":29,"code":151,"language":31,"meta":32,"style":32},"inputs: {trail: pointerTrail({decay: 0.6, radius: 0.04})},\neffect: wgsl`return mix(child, vec4f(1.0, 0.4, 0.1, 1.0), trail(uv).x);`,\n",[18,153,154,186],{"__ignoreMap":32},[36,155,156,159,162,165,168,170,173,177,180,183],{"class":38,"line":39},[36,157,158],{"class":42},"inputs",[36,160,161],{"class":45},": {",[36,163,164],{"class":42},"trail",[36,166,167],{"class":45},": ",[36,169,5],{"class":42},[36,171,172],{"class":45},"({decay: ",[36,174,176],{"class":175},"sDLfK","0.6",[36,178,179],{"class":45},", radius: ",[36,181,182],{"class":175},"0.04",[36,184,185],{"class":45},"})},\n",[36,187,189,192,194,197,201],{"class":38,"line":188},2,[36,190,191],{"class":42},"effect",[36,193,167],{"class":45},[36,195,196],{"class":42},"wgsl",[36,198,200],{"class":199},"sU2Wk","`return mix(child, vec4f(1.0, 0.4, 0.1, 1.0), trail(uv).x);`",[36,202,203],{"class":45},",\n",[205,206,207],"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":32,"searchDepth":188,"depth":188,"links":209},[210,211],{"id":102,"depth":188,"text":103},{"id":147,"depth":188,"text":148},"inputs.trail","inputs-trail","Pointer trail",false,"The pointer's recent path as a field in `.x` (0–1), read by name: `trail(uv).x`.",null,"md","Inputs","function",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs-trail\u002Fpointertrail",{"title":5,"description":216},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Ftrail.ts#L31","docs\u002Fprimitives\u002F44.inputs-trail\u002F1.pointertrail","6x9EFcT71QsLWjjgZrHSDyCB1GzvnazMOktCfLfyEqY",{"stars":229},6080,[231,235,239,243,247,251,255,259,263,267,271,275,279,283,287,291,295,300,304,308,312,316],{"path":232,"title":233,"description":234,"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":236,"title":237,"description":238,"category":18},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":240,"title":241,"description":242,"category":18},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":244,"title":245,"description":246,"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":248,"title":249,"description":250,"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":252,"title":253,"description":254,"category":18},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":256,"title":257,"description":258,"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":260,"title":261,"description":262,"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":264,"title":265,"description":266,"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":268,"title":269,"description":270,"category":18},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":272,"title":273,"description":274,"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":276,"title":277,"description":278,"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":280,"title":281,"description":282,"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":284,"title":285,"description":286,"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":288,"title":289,"description":290,"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":292,"title":293,"description":294,"category":18},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":296,"title":297,"description":298,"category":299},"\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":301,"title":302,"description":303,"category":299},"\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":305,"title":306,"description":307,"category":299},"\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":309,"title":310,"description":311,"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":313,"title":314,"description":315,"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":317,"title":318,"description":319,"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.",1796051186155,"06e02370-81a6-4d74-9931-661d71414be1"]