[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"github-stars":3,"guide-nav":5,"doc-\u002Fdocs\u002Fprimitives\u002Fpaint\u002Frampover":129},{"stars":4},5507,[6,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,72,76,80,84,88,93,97,101,105,109,113,117,121,125],{"path":7,"title":8,"description":9,"category":10},"\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":12,"title":13,"description":14,"category":10},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":16,"title":17,"description":18,"category":10},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":20,"title":21,"description":22,"category":10},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":24,"title":25,"description":26,"category":10},"\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":28,"title":29,"description":30,"category":10},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":32,"title":33,"description":34,"category":10},"\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":36,"title":37,"description":38,"category":10},"\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":40,"title":41,"description":42,"category":10},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":44,"title":45,"description":46,"category":10},"\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":48,"title":49,"description":50,"category":10},"\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":52,"title":53,"description":54,"category":10},"\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":56,"title":57,"description":58,"category":10},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":60,"title":61,"description":62,"category":10},"\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":64,"title":65,"description":66,"category":10},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":68,"title":69,"description":70,"category":71},"\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":73,"title":74,"description":75,"category":71},"\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":77,"title":78,"description":79,"category":71},"\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":81,"title":82,"description":83,"category":10},"\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":85,"title":86,"description":87,"category":10},"\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":89,"title":90,"description":91,"category":92},"\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":94,"title":95,"description":96,"category":92},"\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":98,"title":99,"description":100,"category":92},"\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":102,"title":103,"description":104,"category":92},"\u002Fdocs\u002Fguide\u002Fmasking-and-blending","Masking and blending","How blend modes and masks combine components in the design editor.",{"path":106,"title":107,"description":108,"category":92},"\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":110,"title":111,"description":112,"category":92},"\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":114,"title":115,"description":116,"category":92},"\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":118,"title":119,"description":120,"category":92},"\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":122,"title":123,"description":124,"category":92},"\u002Fdocs\u002Fguide\u002Fglass-component-spotlight","Component spotlight: Glass","A short look at the Glass component and the liquid-glass look it creates.",{"path":126,"title":127,"description":128,"category":92},"\u002Fdocs\u002Fguide\u002Fdigital-looks-component-spotlight","Component spotlight: Digital looks","A look at the digital stylization components for glitchy, futuristic, or technical effects.",{"id":130,"title":131,"body":132,"categoryId":176,"categorySlug":176,"categoryTitle":542,"curated":543,"description":142,"editUrl":544,"extension":545,"group":176,"groupTitle":546,"kind":547,"meta":548,"navigation":549,"path":550,"seo":551,"sourceUrl":552,"stem":553,"wordCount":544,"__hash__":554},"primitives\u002Fdocs\u002Fprimitives\u002F6.paint\u002F1.rampover.md","rampOver",{"type":133,"value":134,"toc":535},"minimark",[135,139,143,171,186,218,223,289,293,373,387,391,457,461,531],[136,137,131],"h1",{"id":138},"rampover",[140,141,142],"p",{},"A paint that colors each pixel by looking its field value up in a palette.",[144,145,150],"pre",{"className":146,"code":147,"language":148,"meta":149,"style":149},"language-ts shiki shiki-themes github-dark","rampOver(field: Field, palette: Palette, opts?: {edges?: PropRef}): Paint\n","ts","",[10,151,152],{"__ignoreMap":149},[153,154,157,160,164,168],"span",{"class":155,"line":156},"line",1,[153,158,131],{"class":159},"svObZ",[153,161,163],{"class":162},"s95oV","(field: Field, palette: Palette, opts",[153,165,167],{"class":166},"snl16","?:",[153,169,170],{"class":162}," {edges?: PropRef}): Paint\n",[140,172,173,174,177,178,181,182,185],{},"Import ",[10,175,176],{},"paint"," from ",[10,179,180],{},"shaders\u002Fstd"," and use ",[10,183,184],{},"paint.rampOver",".",[140,187,188,189,192,193,196,197,196,200,196,203,206,207,210,211,214,215,185],{},"Pass an ",[10,190,191],{},"edges"," prop (values ",[10,194,195],{},"stretch",", ",[10,198,199],{},"transparent",[10,201,202],{},"mirror",[10,204,205],{},"wrap",", marked ",[10,208,209],{},"compileTime",") to choose what happens where the field runs past 0–1: hold the end colors, fade to transparent, bounce back, or repeat. Without it the value goes to the palette as is, which is right for fields that already stay in range such as ",[10,212,213],{},"rings"," or ",[10,216,217],{},"tone",[219,220,222],"h2",{"id":221},"parameters","Parameters",[224,225,226,242],"table",{},[227,228,229],"thead",{},[230,231,232,236,239],"tr",{},[233,234,235],"th",{},"Name",[233,237,238],{},"Type",[233,240,241],{},"Notes",[243,244,245,260,274],"tbody",{},[230,246,247,253,258],{},[248,249,250],"td",{},[10,251,252],{},"field",[248,254,255],{},[10,256,257],{},"Field",[248,259],{},[230,261,262,267,272],{},[248,263,264],{},[10,265,266],{},"palette",[248,268,269],{},[10,270,271],{},"Palette",[248,273],{},[230,275,276,281,286],{},[248,277,278],{},[10,279,280],{},"opts",[248,282,283],{},[10,284,285],{},"{edges?: PropRef}",[248,287,288],{},"Optional.",[219,290,292],{"id":291},"example","Example",[144,294,296],{"className":146,"code":295,"language":148,"meta":149,"style":149},"paint: rampOver(dist.linear({from: p('start'), to: p('end'), angle: p('angle')}), stops(p('colorSpace')), {edges: p('edges')})\n",[10,297,298],{"__ignoreMap":149},[153,299,300,302,305,307,310,313,316,318,321,325,328,330,332,335,338,340,342,345,348,351,353,355,357,360,363,365,367,370],{"class":155,"line":156},[153,301,176],{"class":159},[153,303,304],{"class":162},": ",[153,306,131],{"class":159},[153,308,309],{"class":162},"(dist.",[153,311,312],{"class":159},"linear",[153,314,315],{"class":162},"({from: ",[153,317,140],{"class":159},[153,319,320],{"class":162},"(",[153,322,324],{"class":323},"sU2Wk","'start'",[153,326,327],{"class":162},"), to: ",[153,329,140],{"class":159},[153,331,320],{"class":162},[153,333,334],{"class":323},"'end'",[153,336,337],{"class":162},"), angle: ",[153,339,140],{"class":159},[153,341,320],{"class":162},[153,343,344],{"class":323},"'angle'",[153,346,347],{"class":162},")}), ",[153,349,350],{"class":159},"stops",[153,352,320],{"class":162},[153,354,140],{"class":159},[153,356,320],{"class":162},[153,358,359],{"class":323},"'colorSpace'",[153,361,362],{"class":162},")), {edges: ",[153,364,140],{"class":159},[153,366,320],{"class":162},[153,368,369],{"class":323},"'edges'",[153,371,372],{"class":162},")})\n",[374,375,376],"blockquote",{},[140,377,378,382,383,386],{},[379,380,381],"strong",{},"Tip."," This is the whole recipe for a gradient: a ",[10,384,385],{},"dist.*"," field, a palette, done.",[219,388,390],{"id":389},"see-also","See also",[392,393,394,405,418,436,444],"ul",{},[395,396,397,404],"li",{},[398,399,401],"a",{"href":400},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fdist",[10,402,403],{},"dist"," — Distance fields: the shape of a gradient, as a number that grows away from a line or point.",[395,406,407,413,414,417],{},[398,408,410],{"href":409},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fpair",[10,411,412],{},"pair"," — A palette of two color props, mixed in the color space named by the ",[10,415,416],{},"space"," prop.",[395,419,420,425,426,196,428,431,432,435],{},[398,421,423],{"href":422},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Fstops",[10,424,350],{}," — The standard multi-stop palette, read from the ",[10,427,350],{},[10,429,430],{},"colorA"," and ",[10,433,434],{},"colorB"," props.",[395,437,438,443],{},[398,439,441],{"href":440},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Frings",[10,442,213],{}," — Repeats a field as concentric bands.",[395,445,446,452,453,456],{},[398,447,449],{"href":448},"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Ftiles",[10,450,451],{},"tiles"," — Repeats a field ",[10,454,455],{},"count"," times, always wrapping.",[219,458,460],{"id":459},"used-by","Used by",[140,462,463,196,467,196,471,196,475,196,479,196,483,196,487,196,491,196,495,196,499,196,503,196,507,196,511,196,515,196,519,196,523,196,527],{},[398,464,466],{"href":465},"\u002Fdocs\u002Fcomponents\u002Fblocknoise","BlockNoise",[398,468,470],{"href":469},"\u002Fdocs\u002Fcomponents\u002Fbluenoise","BlueNoise",[398,472,474],{"href":473},"\u002Fdocs\u002Fcomponents\u002Fconicgradient","ConicGradient",[398,476,478],{"href":477},"\u002Fdocs\u002Fcomponents\u002Fcurlnoise","CurlNoise",[398,480,482],{"href":481},"\u002Fdocs\u002Fcomponents\u002Fdiamondgradient","DiamondGradient",[398,484,486],{"href":485},"\u002Fdocs\u002Fcomponents\u002Ferosionnoise","ErosionNoise",[398,488,490],{"href":489},"\u002Fdocs\u002Fcomponents\u002Fgabornoise","GaborNoise",[398,492,494],{"href":493},"\u002Fdocs\u002Fcomponents\u002Flineargradient","LinearGradient",[398,496,498],{"href":497},"\u002Fdocs\u002Fcomponents\u002Fperlinnoise","PerlinNoise",[398,500,502],{"href":501},"\u002Fdocs\u002Fcomponents\u002Fplasma","Plasma",[398,504,506],{"href":505},"\u002Fdocs\u002Fcomponents\u002Fradialgradient","RadialGradient",[398,508,510],{"href":509},"\u002Fdocs\u002Fcomponents\u002Fscratches","Scratches",[398,512,514],{"href":513},"\u002Fdocs\u002Fcomponents\u002Fsimplexnoise","SimplexNoise",[398,516,518],{"href":517},"\u002Fdocs\u002Fcomponents\u002Fspiral","Spiral",[398,520,522],{"href":521},"\u002Fdocs\u002Fcomponents\u002Fswirl","Swirl",[398,524,526],{"href":525},"\u002Fdocs\u002Fcomponents\u002Fvoronoi","Voronoi",[398,528,530],{"href":529},"\u002Fdocs\u002Fcomponents\u002Fwaveletnoise","WaveletNoise",[532,533,534],"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 .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}",{"title":149,"searchDepth":536,"depth":536,"links":537},2,[538,539,540,541],{"id":221,"depth":536,"text":222},{"id":291,"depth":536,"text":292},{"id":389,"depth":536,"text":390},{"id":459,"depth":536,"text":460},"Fields, palettes & ramps",false,null,"md","Painting","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fpaint\u002Frampover",{"title":131,"description":142},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fpaint\u002Ffields.ts#L214","docs\u002Fprimitives\u002F6.paint\u002F1.rampover","itsJ_CXtLHtguh5ib38E3-hpwkU33u88RClI_4XS28I"]