[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-nav":3,"github-stars":127,"doc-\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fshare":129},[4,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,70,74,78,82,86,91,95,99,103,107,111,115,119,123],{"path":5,"title":6,"description":7,"category":8},"\u002Fdocs\u002Fguide","Getting started","Shaders is a library of GPU effect components for Vue, React, Svelte, Solid, JavaScript and Framer, with a design editor for building with them.","code",{"path":10,"title":11,"description":12,"category":8},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":14,"title":15,"description":16,"category":8},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":18,"title":19,"description":20,"category":8},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":22,"title":23,"description":24,"category":8},"\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":26,"title":27,"description":28,"category":8},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":30,"title":31,"description":32,"category":8},"\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":34,"title":35,"description":36,"category":8},"\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":38,"title":39,"description":40,"category":8},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":42,"title":43,"description":44,"category":8},"\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":46,"title":47,"description":48,"category":8},"\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":50,"title":51,"description":52,"category":8},"\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":54,"title":55,"description":56,"category":8},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":58,"title":59,"description":60,"category":8},"\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":62,"title":63,"description":64,"category":8},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":66,"title":67,"description":68,"category":69},"\u002Fdocs\u002Fguide\u002Fmcp","Shaders MCP","Connect your AI coding agent to Shaders so it can find, install and edit effects in your codebase.","workflows",{"path":71,"title":72,"description":73,"category":69},"\u002Fdocs\u002Fguide\u002Fcli","Shaders CLI","Install your own shaders and Pro shaders into your codebase as component files, and keep them in sync with the design editor.",{"path":75,"title":76,"description":77,"category":69},"\u002Fdocs\u002Fguide\u002Fagent-skill","Agent skill","Give your coding agent a skill that teaches it to build with Shaders components, the CLI and Pro shaders.",{"path":79,"title":80,"description":81,"category":8},"\u002Fdocs\u002Fguide\u002Fvideo-rendering","Rendering to video","Turn a shader effect into a video file, from the design editor or from a frame-by-frame pipeline such as Remotion, Hyperframes or Puppeteer.",{"path":83,"title":84,"description":85,"category":8},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",{"path":87,"title":88,"description":89,"category":90},"\u002Fdocs\u002Fguide\u002Fquick-tour-of-the-design-editor","Quick tour of the design editor","A short walkthrough of the full Shaders workflow, from designing on the infinite canvas to exporting code.","editor",{"path":92,"title":93,"description":94,"category":90},"\u002Fdocs\u002Fguide\u002Fintro-to-the-interface","Intro to the interface","A tour of the design editor interface: the canvas, layers, the Properties panel, and the ways to share and export.",{"path":96,"title":97,"description":98,"category":90},"\u002Fdocs\u002Fguide\u002Fcomposing-your-first-shader-effect","Composing your first shader effect","Building a first shader effect in the design editor by stacking and nesting components as layers.",{"path":100,"title":101,"description":102,"category":90},"\u002Fdocs\u002Fguide\u002Fmasking-and-blending","Masking and blending","How blend modes and masks combine components in the design editor.",{"path":104,"title":105,"description":106,"category":90},"\u002Fdocs\u002Fguide\u002Fdynamic-prop-mapping","Dynamic prop mapping","Turning static props into dynamic ones in the design editor: mapping one layer's output into another's prop, following the cursor, or animating automatically.",{"path":108,"title":109,"description":110,"category":90},"\u002Fdocs\u002Fguide\u002Fcustom-media-and-transformations","Custom media and transformations","Uploading images, videos, and SVG files to the media gallery, adding them to a composition, and placing them with transformations.",{"path":112,"title":113,"description":114,"category":90},"\u002Fdocs\u002Fguide\u002Finstalling-a-shader-via-mcp","Installing a shader via MCP","Installing a shader from the design editor into a hero section with the Shaders MCP.",{"path":116,"title":117,"description":118,"category":90},"\u002Fdocs\u002Fguide\u002Fexploring-shape-effects","Exploring shape effects","Applying shape effects such as liquid glass, liquid metal, and glowing edges to built-in shapes and your own SVG.",{"path":120,"title":121,"description":122,"category":90},"\u002Fdocs\u002Fguide\u002Fglass-component-spotlight","Component spotlight: Glass","A short look at the Glass component and the liquid-glass look it creates.",{"path":124,"title":125,"description":126,"category":90},"\u002Fdocs\u002Fguide\u002Fdigital-looks-component-spotlight","Component spotlight: Digital looks","A look at the digital stylization components for glitchy, futuristic, or technical effects.",{"stars":128},5507,{"id":130,"title":131,"body":132,"categoryId":168,"categorySlug":168,"categoryTitle":345,"curated":346,"description":141,"editUrl":347,"extension":348,"group":168,"groupTitle":349,"kind":350,"meta":351,"navigation":352,"path":353,"seo":354,"sourceUrl":355,"stem":356,"wordCount":347,"__hash__":357},"primitives\u002Fdocs\u002Fprimitives\u002F6.paint\u002F13.share.md","share",{"type":133,"value":134,"toc":339},"minimark",[135,138,142,163,178,191,196,233,237,285,295,299,320,324,335],[136,137,131],"h1",{"id":131},[139,140,141],"p",{},"Evaluates a field once and lets several words read the same result.",[143,144,149],"pre",{"className":145,"code":146,"language":147,"meta":148,"style":148},"language-ts shiki shiki-themes github-dark","share(field: Field): Field\n","ts","",[8,150,151],{"__ignoreMap":148},[152,153,156,159],"span",{"class":154,"line":155},"line",1,[152,157,131],{"class":158},"svObZ",[152,160,162],{"class":161},"s95oV","(field: Field): Field\n",[139,164,165,166,169,170,173,174,177],{},"Import ",[8,167,168],{},"paint"," from ",[8,171,172],{},"shaders\u002Fstd"," and use ",[8,175,176],{},"paint.share",".",[139,179,180,181,183,184,187,188,177],{},"Wrap a field in ",[8,182,131],{}," when it feeds two places, such as a ",[8,185,186],{},"threshold"," and a ",[8,189,190],{},"pulse",[192,193,195],"h2",{"id":194},"parameters","Parameters",[197,198,199,215],"table",{},[200,201,202],"thead",{},[203,204,205,209,212],"tr",{},[206,207,208],"th",{},"Name",[206,210,211],{},"Type",[206,213,214],{},"Notes",[216,217,218],"tbody",{},[203,219,220,226,231],{},[221,222,223],"td",{},[8,224,225],{},"field",[221,227,228],{},[8,229,230],{},"Field",[221,232],{},[192,234,236],{"id":235},"example","Example",[143,238,240],{"className":145,"code":239,"language":147,"meta":148,"style":148},"const pattern = share(flowField({detail: p('detail')}))\n\u002F\u002F then: threshold(pattern, ...) and pulse(pattern, ...)\n",[8,241,242,278],{"__ignoreMap":148},[152,243,244,248,252,255,258,261,264,267,269,271,275],{"class":154,"line":155},[152,245,247],{"class":246},"snl16","const",[152,249,251],{"class":250},"sDLfK"," pattern",[152,253,254],{"class":246}," =",[152,256,257],{"class":158}," share",[152,259,260],{"class":161},"(",[152,262,263],{"class":158},"flowField",[152,265,266],{"class":161},"({detail: ",[152,268,139],{"class":158},[152,270,260],{"class":161},[152,272,274],{"class":273},"sU2Wk","'detail'",[152,276,277],{"class":161},")}))\n",[152,279,281],{"class":154,"line":280},2,[152,282,284],{"class":283},"sAwPA","\u002F\u002F then: threshold(pattern, ...) and pulse(pattern, ...)\n",[286,287,288],"blockquote",{},[139,289,290,294],{},[291,292,293],"strong",{},"Tip."," One result per layer, whatever coordinate it is asked for. Do not use it to sample the same field at two offsets.",[192,296,298],{"id":297},"see-also","See also",[300,301,302,312],"ul",{},[303,304,305,311],"li",{},[306,307,309],"a",{"href":308},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fflowfield",[8,310,263],{}," — A swirling, animated wave pattern from −1 to 1.",[303,313,314,319],{},[306,315,317],{"href":316},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fpulse",[8,318,190],{}," — A gentle brightness pulse that follows a pattern field, hovering around 1.",[192,321,323],{"id":322},"used-by","Used by",[139,325,326,330,331],{},[306,327,329],{"href":328},"\u002Fdocs\u002Fcomponents\u002Fswirl","Swirl",", ",[306,332,334],{"href":333},"\u002Fdocs\u002Fcomponents\u002Fvoronoi","Voronoi",[336,337,338],"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 .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 .snl16, html code.shiki .snl16{--shiki-default:#F97583}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":148,"searchDepth":280,"depth":280,"links":340},[341,342,343,344],{"id":194,"depth":280,"text":195},{"id":235,"depth":280,"text":236},{"id":297,"depth":280,"text":298},{"id":322,"depth":280,"text":323},"Fields, palettes & ramps",false,null,"md","Painting","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fshare",{"title":131,"description":141},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fpaint\u002Ffields.ts#L460","docs\u002Fprimitives\u002F6.paint\u002F13.share","TgRLGNwV5IcH-BXY7XhvQ2-HmZc8HqbM0BNQYH0w38Q"]