[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"github-stars":3,"guide-nav":5,"doc-\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Fpointstars":129},{"stars":4},5505,[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":307,"categorySlug":307,"categoryTitle":559,"curated":560,"description":142,"editUrl":561,"extension":562,"group":563,"groupTitle":564,"kind":565,"meta":566,"navigation":567,"path":568,"seo":569,"sourceUrl":570,"stem":571,"wordCount":561,"__hash__":572},"primitives\u002Fdocs\u002Fprimitives\u002F14.materials\u002F49.pointstars.md","pointStars",{"type":133,"value":134,"toc":553},"minimark",[135,139,143,302,317,333,338,386,394,397,401,512,516,539,543,549],[136,137,131],"h1",{"id":138},"pointstars",[140,141,142],"p",{},"A plane of sparse glinting points: stars, glitter, dust.",[144,145,150],"pre",{"className":146,"code":147,"language":148,"meta":149,"style":149},"language-ts shiki shiki-themes github-dark","pointStars(p: Expr, opts: {\n    \u002F** Frequency of the per-point variation field relative to `p` (slow, about 0.1). *\u002F\n    variationFreq: number\n    \u002F** Point radius as `[base, jitter]`: base plus variation times jitter. *\u002F\n    radius: [number, number]\n    \u002F** The band of the variation field that keeps a point at all. Narrower is sparser. *\u002F\n    keep: [number, number]\n    \u002F** Brightness as `[base, gain]`: base plus variation squared times gain. *\u002F\n    brightness: [number, number]\n    \u002F** A per-point shimmer factor built from the variation field (see `twinkle`). *\u002F\n    shimmer?: (variation: Expr) => Expr\n    \u002F** Overall gain. *\u002F\n    gain: Expr\n    \u002F** Color the glints: variation mixes `from` to `to`, scaled by the glint times `gain`. *\u002F\n    tint?: {from: [number, number, number]; to: [number, number, number]; gain: number}\n    hint?: string\n}): {glint: Expr; variation: Expr; rgb?: Expr}\n","ts","",[10,151,152,164,171,177,183,189,195,201,207,213,219,251,257,263,269,280,291],{"__ignoreMap":149},[153,154,157,160],"span",{"class":155,"line":156},"line",1,[153,158,131],{"class":159},"svObZ",[153,161,163],{"class":162},"s95oV","(p: Expr, opts: {\n",[153,165,167],{"class":155,"line":166},2,[153,168,170],{"class":169},"sAwPA","    \u002F** Frequency of the per-point variation field relative to `p` (slow, about 0.1). *\u002F\n",[153,172,174],{"class":155,"line":173},3,[153,175,176],{"class":162},"    variationFreq: number\n",[153,178,180],{"class":155,"line":179},4,[153,181,182],{"class":169},"    \u002F** Point radius as `[base, jitter]`: base plus variation times jitter. *\u002F\n",[153,184,186],{"class":155,"line":185},5,[153,187,188],{"class":162},"    radius: [number, number]\n",[153,190,192],{"class":155,"line":191},6,[153,193,194],{"class":169},"    \u002F** The band of the variation field that keeps a point at all. Narrower is sparser. *\u002F\n",[153,196,198],{"class":155,"line":197},7,[153,199,200],{"class":162},"    keep: [number, number]\n",[153,202,204],{"class":155,"line":203},8,[153,205,206],{"class":169},"    \u002F** Brightness as `[base, gain]`: base plus variation squared times gain. *\u002F\n",[153,208,210],{"class":155,"line":209},9,[153,211,212],{"class":162},"    brightness: [number, number]\n",[153,214,216],{"class":155,"line":215},10,[153,217,218],{"class":169},"    \u002F** A per-point shimmer factor built from the variation field (see `twinkle`). *\u002F\n",[153,220,222,225,229,232,236,239,242,245,248],{"class":155,"line":221},11,[153,223,224],{"class":162},"    shimmer",[153,226,228],{"class":227},"snl16","?:",[153,230,231],{"class":162}," (",[153,233,235],{"class":234},"s9osk","variation",[153,237,238],{"class":227},":",[153,240,241],{"class":159}," Expr",[153,243,244],{"class":162},") ",[153,246,247],{"class":227},"=>",[153,249,250],{"class":162}," Expr\n",[153,252,254],{"class":155,"line":253},12,[153,255,256],{"class":169},"    \u002F** Overall gain. *\u002F\n",[153,258,260],{"class":155,"line":259},13,[153,261,262],{"class":162},"    gain: Expr\n",[153,264,266],{"class":155,"line":265},14,[153,267,268],{"class":169},"    \u002F** Color the glints: variation mixes `from` to `to`, scaled by the glint times `gain`. *\u002F\n",[153,270,272,275,277],{"class":155,"line":271},15,[153,273,274],{"class":162},"    tint",[153,276,228],{"class":227},[153,278,279],{"class":162}," {from: [number, number, number]; to: [number, number, number]; gain: number}\n",[153,281,283,286,288],{"class":155,"line":282},16,[153,284,285],{"class":162},"    hint",[153,287,228],{"class":227},[153,289,290],{"class":162}," string\n",[153,292,294,297,299],{"class":155,"line":293},17,[153,295,296],{"class":162},"}): {glint: Expr; variation: Expr; rgb",[153,298,228],{"class":227},[153,300,301],{"class":162}," Expr}\n",[140,303,304,305,308,309,312,313,316],{},"Import ",[10,306,307],{},"materials"," from ",[10,310,311],{},"shaders\u002Fstd"," and use ",[10,314,315],{},"materials.pointStars",".",[140,318,319,321,322,324,325,328,329,332],{},[10,320,140],{}," is the plane coordinate; scale it to set density. Returns the glint intensity, the slow per-point ",[10,323,235],{}," field, and ",[10,326,327],{},"rgb"," when ",[10,330,331],{},"tint"," is given. Radii are in the cellular noise's squared-distance units, so they are small (0.004–0.02).",[334,335,337],"h2",{"id":336},"parameters","Parameters",[339,340,341,357],"table",{},[342,343,344],"thead",{},[345,346,347,351,354],"tr",{},[348,349,350],"th",{},"Name",[348,352,353],{},"Type",[348,355,356],{},"Notes",[358,359,360,374],"tbody",{},[345,361,362,367,372],{},[363,364,365],"td",{},[10,366,140],{},[363,368,369],{},[10,370,371],{},"Expr",[363,373],{},[345,375,376,381,384],{},[363,377,378],{},[10,379,380],{},"opts",[363,382,383],{},"`{",[363,385],{},[144,387,392],{"className":388,"code":390,"language":391},[389],"language-text","\u002F** Frequency of the per-point variation field relative to `p` (slow, about 0.1). *\u002F\nvariationFreq: number\n\u002F** Point radius as `[base, jitter]`: base plus variation times jitter. *\u002F\nradius: [number, number]\n\u002F** The band of the variation field that keeps a point at all. Narrower is sparser. *\u002F\nkeep: [number, number]\n\u002F** Brightness as `[base, gain]`: base plus variation squared times gain. *\u002F\nbrightness: [number, number]\n\u002F** A per-point shimmer factor built from the variation field (see `twinkle`). *\u002F\nshimmer?: (variation: Expr) => Expr\n\u002F** Overall gain. *\u002F\ngain: Expr\n\u002F** Color the glints: variation mixes `from` to `to`, scaled by the glint times `gain`. *\u002F\ntint?: {from: [number, number, number]; to: [number, number, number]; gain: number}\nhint?: string\n","text",[10,393,390],{"__ignoreMap":149},[140,395,396],{},"}` |  |",[334,398,400],{"id":399},"example","Example",[144,402,404],{"className":146,"code":403,"language":148,"meta":149,"style":149},"const stars = pointStars(mul(pat, 40), {variationFreq: 0.13, radius: [0.004, 0.013], keep: [0.35, 0.75], brightness: [0.3, 1.2], gain: u.stars, tint: {from: [0.72, 0.82, 1], to: [1, 0.92, 0.82], gain: 1.6}})\n",[10,405,406],{"__ignoreMap":149},[153,407,408,411,415,418,421,424,427,430,433,436,439,442,445,448,451,454,457,459,462,465,468,470,473,476,479,481,484,486,489,492,494,496,499,501,503,506,509],{"class":155,"line":156},[153,409,410],{"class":227},"const",[153,412,414],{"class":413},"sDLfK"," stars",[153,416,417],{"class":227}," =",[153,419,420],{"class":159}," pointStars",[153,422,423],{"class":162},"(",[153,425,426],{"class":159},"mul",[153,428,429],{"class":162},"(pat, ",[153,431,432],{"class":413},"40",[153,434,435],{"class":162},"), {variationFreq: ",[153,437,438],{"class":413},"0.13",[153,440,441],{"class":162},", radius: [",[153,443,444],{"class":413},"0.004",[153,446,447],{"class":162},", ",[153,449,450],{"class":413},"0.013",[153,452,453],{"class":162},"], keep: [",[153,455,456],{"class":413},"0.35",[153,458,447],{"class":162},[153,460,461],{"class":413},"0.75",[153,463,464],{"class":162},"], brightness: [",[153,466,467],{"class":413},"0.3",[153,469,447],{"class":162},[153,471,472],{"class":413},"1.2",[153,474,475],{"class":162},"], gain: u.stars, tint: {from: [",[153,477,478],{"class":413},"0.72",[153,480,447],{"class":162},[153,482,483],{"class":413},"0.82",[153,485,447],{"class":162},[153,487,488],{"class":413},"1",[153,490,491],{"class":162},"], to: [",[153,493,488],{"class":413},[153,495,447],{"class":162},[153,497,498],{"class":413},"0.92",[153,500,447],{"class":162},[153,502,483],{"class":413},[153,504,505],{"class":162},"], gain: ",[153,507,508],{"class":413},"1.6",[153,510,511],{"class":162},"}})\n",[334,513,515],{"id":514},"see-also","See also",[517,518,519,530],"ul",{},[520,521,522,529],"li",{},[523,524,526],"a",{"href":525},"\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Ftwinkle",[10,527,528],{},"twinkle"," — A brightness factor that shimmers over time, different for each element.",[520,531,532,538],{},[523,533,535],{"href":534},"\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Fcellnoiseat",[10,536,537],{},"cellNoiseAt"," — Cellular noise at a 2D point: 0 at each cell's seed point, rising toward the cell walls.",[334,540,542],{"id":541},"used-by","Used by",[140,544,545],{},[523,546,548],{"href":547},"\u002Fdocs\u002Fcomponents\u002Fnebula","Nebula",[550,551,552],"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 .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}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}",{"title":149,"searchDepth":166,"depth":166,"links":554},[555,556,557,558],{"id":336,"depth":166,"text":337},{"id":399,"depth":166,"text":400},{"id":514,"depth":166,"text":515},{"id":541,"depth":166,"text":542},"Materials & surfaces",false,null,"md","light","Noise, light & materials","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Fpointstars",{"title":131,"description":142},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fpaint\u002Fmaterials.ts#L1192","docs\u002Fprimitives\u002F14.materials\u002F49.pointstars","WmEf41zhNu7JdrmSHklFRQUmj3A7Z2n_nCDwHiRXl5o"]