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