[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-nav":3,"doc-\u002Fdocs\u002Fprimitives\u002Fslots\u002Fiszero":127,"github-stars":373},[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.",{"id":128,"title":129,"body":130,"categoryId":357,"categorySlug":357,"categoryTitle":358,"curated":359,"description":360,"editUrl":361,"extension":362,"group":363,"groupTitle":364,"kind":365,"meta":366,"navigation":367,"path":368,"seo":369,"sourceUrl":370,"stem":371,"wordCount":361,"__hash__":372},"primitives\u002Fdocs\u002Fprimitives\u002F3.slots\u002F2.iszero.md","isZero",{"type":131,"value":132,"toc":350},"minimark",[133,137,145,166,176,187,192,228,232,257,261,303,307,346],[134,135,129],"h1",{"id":136},"iszero",[138,139,140,141,144],"p",{},"Skip the filter entirely while ",[8,142,143],{},"prop"," is exactly 0.",[146,147,152],"pre",{"className":148,"code":149,"language":150,"meta":151,"style":151},"language-ts shiki shiki-themes github-dark","isZero(prop: string): IdentityRule\n","ts","",[8,153,154],{"__ignoreMap":151},[155,156,159,162],"span",{"class":157,"line":158},"line",1,[155,160,129],{"class":161},"svObZ",[155,163,165],{"class":164},"s95oV","(prop: string): IdentityRule\n",[138,167,168,169,171,172,175],{},"Import ",[8,170,129],{}," from ",[8,173,174],{},"shaders\u002Fstd",".",[138,177,178,179,182,183,186],{},"Put it on ",[8,180,181],{},"identityWhen:",". An unset prop counts as its default. A prop that is mapped per pixel by a driver disables the skip automatically, since the value then varies across the canvas. Give the prop ",[8,184,185],{},"recompile: crosses(0)"," so the skip switches on and off.",[188,189,191],"h2",{"id":190},"parameters","Parameters",[193,194,195,211],"table",{},[196,197,198],"thead",{},[199,200,201,205,208],"tr",{},[202,203,204],"th",{},"Name",[202,206,207],{},"Type",[202,209,210],{},"Notes",[212,213,214],"tbody",{},[199,215,216,221,226],{},[217,218,219],"td",{},[8,220,143],{},[217,222,223],{},[8,224,225],{},"string",[217,227],{},[188,229,231],{"id":230},"example","Example",[146,233,235],{"className":148,"code":234,"language":150,"meta":151,"style":151},"identityWhen: isZero('intensity')\n",[8,236,237],{"__ignoreMap":151},[155,238,239,242,245,247,250,254],{"class":157,"line":158},[155,240,241],{"class":161},"identityWhen",[155,243,244],{"class":164},": ",[155,246,129],{"class":161},[155,248,249],{"class":164},"(",[155,251,253],{"class":252},"sU2Wk","'intensity'",[155,255,256],{"class":164},")\n",[188,258,260],{"id":259},"see-also","See also",[262,263,264,282,291],"ul",{},[265,266,267,274,275,277,278,281],"li",{},[268,269,271],"a",{"href":270},"\u002Fdocs\u002Fprimitives\u002Fslots\u002Fisvalue",[8,272,273],{},"isValue"," — Skip the filter entirely while ",[8,276,143],{}," equals ",[8,279,280],{},"value",", for a filter whose no-op is not 0.",[265,283,284,290],{},[268,285,287],{"href":286},"\u002Fdocs\u002Fprimitives\u002Fslots\u002Fallof",[8,288,289],{},"allOf"," — Skip the filter only while every rule holds, for a no-op that needs several props at rest.",[265,292,293,299,300,302],{},[268,294,296],{"href":295},"\u002Fdocs\u002Fprimitives\u002Fslots\u002Fcrosses",[8,297,298],{},"crosses"," — Rebuild the shader only when the prop crosses ",[8,301,280],{},", not on every change.",[188,304,306],{"id":305},"used-by","Used by",[138,308,309,313,314,313,318,313,322,313,326,313,330,313,334,313,338,313,342],{},[268,310,312],{"href":311},"\u002Fdocs\u002Fcomponents\u002Fbrightnesscontrast","BrightnessContrast",", ",[268,315,317],{"href":316},"\u002Fdocs\u002Fcomponents\u002Ffilmgrain","FilmGrain",[268,319,321],{"href":320},"\u002Fdocs\u002Fcomponents\u002Fgradientmap","GradientMap",[268,323,325],{"href":324},"\u002Fdocs\u002Fcomponents\u002Fhueshift","HueShift",[268,327,329],{"href":328},"\u002Fdocs\u002Fcomponents\u002Fsharpness","Sharpness",[268,331,333],{"href":332},"\u002Fdocs\u002Fcomponents\u002Fsolarize","Solarize",[268,335,337],{"href":336},"\u002Fdocs\u002Fcomponents\u002Fsparkle","Sparkle",[268,339,341],{"href":340},"\u002Fdocs\u002Fcomponents\u002Fvibrance","Vibrance",[268,343,345],{"href":344},"\u002Fdocs\u002Fcomponents\u002Fvignette","Vignette",[347,348,349],"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 .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}",{"title":151,"searchDepth":351,"depth":351,"links":352},2,[353,354,355,356],{"id":190,"depth":351,"text":191},{"id":230,"depth":351,"text":231},{"id":259,"depth":351,"text":260},{"id":305,"depth":351,"text":306},"slots","Identity & recompile rules",false,"Skip the filter entirely while `prop` is exactly 0.",null,"md","define","Defining a shader","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fslots\u002Fiszero",{"title":129,"description":360},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fslots.ts#L63","docs\u002Fprimitives\u002F3.slots\u002F2.iszero","DkTJwEAruCLx33sz5nZJ0DgQK0wgl4Gf_ID6pRqn_vI",{"stars":374},5507]