[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"github-stars":3,"guide-nav":5,"doc-\u002Fdocs\u002Fprimitives\u002Fsim-fluids":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":2130,"categorySlug":2131,"categoryTitle":2132,"curated":412,"description":2133,"editUrl":2134,"extension":2135,"group":2136,"groupTitle":2137,"kind":2132,"meta":2138,"navigation":412,"path":2139,"seo":2140,"sourceUrl":2141,"stem":2142,"wordCount":416,"__hash__":2143},"primitives\u002Fdocs\u002Fprimitives\u002F38.sim-fluids\u002Findex.md","Fluids",{"type":133,"value":134,"toc":2124},"minimark",[135,139,156,209,216,245,250,346,350,1915,1919,2062,2066,2120],[136,137,131],"h1",{"id":138},"fluids",[140,141,142,143,147,148,155],"p",{},"Smoke, ink and fog that flow. A fluid is a square grid of velocity plus a ",[144,145,146],"strong",{},"dye"," (a density\nand an age, or a color) that the engine advances with a full fluid solve every frame:\nswirl, pressure, advection. ",[149,150,152],"a",{"href":151},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Ffluidsim",[10,153,154],{},"fluidSim"," owns the state buffers, the output texture, the solve\nchain, the pointer tracker, the clock and the idle gate that sleeps a settled field. You bring\nthe parts that make the look and declare them by role.",[140,157,158,161,162,168,169,175,176,179,180,186,187,193,194,197,198,204,205,208],{},[144,159,160],{},"Emitters"," put dye and momentum in: ",[149,163,165],{"href":164},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fsplat",[10,166,167],{},"splat"," at a fixed source (a cone from a point),\n",[149,170,172],{"href":171},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fcursorribbon",[10,173,174],{},"cursorRibbon"," along the pointer's stroke as a continuous ribbon of stamps. ",[144,177,178],{},"Solve stages","\nwrap every solve: ",[149,181,183],{"href":182},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fambientforce",[10,184,185],{},"ambientForce"," before it (a turbulence field), ",[149,188,190],{"href":189},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Frestoretoward",[10,191,192],{},"restoreToward"," after it (a\ncolor the solve would otherwise blur away). ",[144,195,196],{},"Init"," decides how the field starts:\n",[149,199,201],{"href":200},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fseededfieldinit",[10,202,203],{},"seededFieldInit"," seeds it and runs silent warm-up solves so the first visible frame already\nflows. The ",[10,206,207],{},"values"," function turns props, the clock and the pointer into the numbers every pass\nreads; positions and radii in it are in grid cells.",[140,210,211,212,215],{},"The fragment samples the output texture under the key you named and colors it however you\nlike. When an effect only needs a wave field or a displacement, ",[10,213,214],{},"simulate.grid"," says it with no\nGPU code.",[217,218,223],"pre",{"className":219,"code":220,"language":221,"meta":222,"style":222},"language-ts shiki shiki-themes github-dark","import {sim} from 'shaders\u002Fstd'\n","ts","",[10,224,225],{"__ignoreMap":222},[226,227,230,234,238,241],"span",{"class":228,"line":229},"line",1,[226,231,233],{"class":232},"snl16","import",[226,235,237],{"class":236},"s95oV"," {sim} ",[226,239,240],{"class":232},"from",[226,242,244],{"class":243},"sU2Wk"," 'shaders\u002Fstd'\n",[246,247,249],"h2",{"id":248},"reach-for-it-when","Reach for it when",[251,252,253,266],"table",{},[254,255,256],"thead",{},[257,258,259,263],"tr",{},[260,261,262],"th",{},"When you need",[260,264,265],{},"Use",[267,268,269,286,301,312,323,334],"tbody",{},[257,270,271,275],{},[272,273,274],"td",{},"smoke rising from a point, stirred by the cursor",[272,276,277,281,282],{},[149,278,279],{"href":151},[10,280,154],{}," with ",[149,283,284],{"href":164},[10,285,167],{},[257,287,288,291],{},[272,289,290],{},"smoke or ink painted along the pointer's stroke",[272,292,293,281,297],{},[149,294,295],{"href":151},[10,296,154],{},[149,298,299],{"href":171},[10,300,174],{},[257,302,303,306],{},[272,304,305],{},"fog that is already everywhere when the layer appears",[272,307,308],{},[149,309,310],{"href":200},[10,311,203],{},[257,313,314,317],{},[272,315,316],{},"a wind or turbulence over the whole field",[272,318,319],{},[149,320,321],{"href":182},[10,322,185],{},[257,324,325,328],{},[272,326,327],{},"a color that must not wash out over time",[272,329,330],{},[149,331,332],{"href":189},[10,333,192],{},[257,335,336,339],{},[272,337,338],{},"the simulation should sleep once the last stroke has faded",[272,340,341,342],{},"the fadeSeconds option of ",[149,343,344],{"href":171},[10,345,174],{},[246,347,349],{"id":348},"example","Example",[217,351,353],{"className":219,"code":352,"language":221,"meta":222,"style":222},"import {defineShader, p, sim, transformColor, transformPosition} from 'shaders\u002Fstd'\nimport {tgpu, d} from '@coreroot\u002Fgpu\u002Fkit'\nimport {buildStableFluidsKernels, buildEmitterSplatKernel, buildFluidOutputKernel, mixExpr, vec4, ZERO} from '@coreroot\u002Fgpu\u002Fporters'\nimport type {GpuFragmentParams, KitTexture, Expr} from '@coreroot\u002Fgpu\u002Fporters'\n\nconst {fluidSim, splat} = sim.fluids\n\nconst N = 256\nconst COUNT = N * N\n\n\u002F\u002F The values every pass reads each frame. dt, curlStrength, velFade, dyeFade and colorDecay are the\n\u002F\u002F solver's; the rest drive the emitter and the cursor shove.\nconst FluidParams = d.struct({\n  dt: d.f32, emitX: d.f32, emitY: d.f32, emitVelX: d.f32, emitVelY: d.f32,\n  perpDirX: d.f32, perpDirY: d.f32, spreadFactor: d.f32, emitRad: d.f32, emitIntensity: d.f32,\n  dyeFade: d.f32, velFade: d.f32, curlStrength: d.f32, gravity: d.f32, cursorX: d.f32, cursorY: d.f32,\n  cursorVelX: d.f32, cursorVelY: d.f32, mouseActive: d.f32, mouseRadSq: d.f32, colorDecay: d.f32,\n})\n\u002F\u002F The fluid's buffers, by the names the solver expects.\nconst fluidLayout = tgpu.bindGroupLayout({\n  velA: {storage: d.arrayOf(d.vec4f, COUNT), access: 'mutable'},\n  velB: {storage: d.arrayOf(d.vec4f, COUNT), access: 'mutable'},\n  dyeA: {storage: d.arrayOf(d.vec4f, COUNT), access: 'mutable'},\n  dyeB: {storage: d.arrayOf(d.vec4f, COUNT), access: 'mutable'},\n  pressure: {storage: d.arrayOf(d.f32, COUNT), access: 'mutable'},\n  divergence: {storage: d.arrayOf(d.f32, COUNT), access: 'mutable'},\n  params: {uniform: FluidParams},\n})\nconst outputLayout = tgpu.bindGroupLayout({\n  dyeA: {storage: d.arrayOf(d.vec4f, COUNT), access: 'readonly'},\n  outTex: {storageTexture: d.textureStorage2d('rgba16float', 'write-only')},\n})\n\n\u002F\u002F The one pass that is this shader's own: a cone emitter at a fixed source, plus the cursor shove.\nconst splatKernel = buildEmitterSplatKernel(fluidLayout, {n: N, namePrefix: 'smoke', cone: true, cursorPush: true, densityGain: 8, velocityBlendGain: 3})\n\u002F\u002F Everything else is the shared solve over a density-and-age dye.\nconst solverKernels = buildStableFluidsKernels(fluidLayout, {n: N, namePrefix: 'smoke', boundary: 'clamped', dye: 'densityAge', dyeDissipation: true, ageAdvance: true})\nconst outputKernel = buildFluidOutputKernel(outputLayout, {n: N, namePrefix: 'smoke', dye: 'densityAge'})\n\n\u002F\u002F Smoke: fresh smoke in colorA ages toward colorB as it rises and dissipates.\nexport const Smoke = defineShader({\n  name: 'Smoke',\n  usesPointer: true,\n  props: {\n    colorA: {default: '#fc83f9', transform: transformColor},\n    colorB: {default: '#c21c79', transform: transformColor},\n    emitFrom: {default: {x: 0.5, y: 1}, transform: transformPosition},\n    speed: {default: 20},\n    emitRadius: {default: 0.08},\n    dissipation: {default: 0.2},\n    detail: {default: 25},\n    mouseInfluence: {default: 0.1},\n  },\n  ...fluidSim(() => ({\n    resolution: N,\n    layout: fluidLayout, outputLayout, paramsSchema: FluidParams,\n    solver: {kernels: solverKernels, jacobiIters: 10},\n    output: {kernel: outputKernel, key: 'smokeTexture'},\n    pointer: {minDrag: 0.0005},\n    inject: [splat({kernel: splatKernel})],\n    values: (f) => {\n      const emit = f.getCpuValue('emitFrom') as {x: number; y: number} | undefined\n      const velMag = f.num('speed', 20) * N * 0.15\n      const ptr = f.ptr!\n      const mouseInf = f.num('mouseInfluence', 0.1)\n      const active = ptr.moving && mouseInf > 0\n      const mouseRadGrid = 0.1 * N\n      return {\n        dt: f.dt,\n        emitX: (emit?.x ?? 0.5) * N,\n        emitY: (1 - (emit?.y ?? 0)) * N,\n        emitVelX: 0, emitVelY: -velMag,\n        perpDirX: 1, perpDirY: 0,\n        spreadFactor: Math.tan(Math.PI \u002F 6),\n        emitRad: f.num('emitRadius', 0.08) * N,\n        emitIntensity: 1,\n        dyeFade: f.num('dissipation', 0.2),\n        velFade: 0.2,\n        curlStrength: f.num('detail', 25),\n        gravity: 0.5,\n        colorDecay: 0.4,\n        cursorX: active ? ptr.x * N : 0,\n        cursorY: active ? ptr.y * N : 0,\n        cursorVelX: active ? ptr.dx * N * 15 * mouseInf : 0,\n        cursorVelY: active ? ptr.dy * N * 15 * mouseInf : 0,\n        mouseActive: active ? 1 : 0,\n        mouseRadSq: mouseRadGrid * mouseRadGrid,\n      }\n    },\n  })),\n  gpu: {\n    fragment: ({ctx, computeOutputs, uniforms}: GpuFragmentParams): Expr => {\n      const field = computeOutputs?.smokeTexture as KitTexture | undefined\n      if (!field) return ZERO \u002F\u002F no GPU: transparent\n      const s = field.sample(ctx.uv, 'linearClamp') \u002F\u002F x = density, y = age\n      const color = mixExpr(uniforms.colorA, uniforms.colorB, s.member('y'))\n      return vec4(color.member('rgb'), color.member('a').mul(s.member('x')))\n    },\n  },\n})\n",[10,354,355,366,379,392,407,414,440,445,459,477,482,489,495,515,521,527,533,539,545,551,569,593,611,629,647,666,684,690,695,711,729,752,757,762,768,818,824,869,897,902,908,927,939,949,955,967,978,996,1007,1018,1029,1040,1051,1057,1074,1084,1090,1101,1112,1123,1134,1155,1211,1247,1263,1289,1314,1331,1339,1345,1365,1393,1411,1426,1450,1475,1485,1504,1514,1533,1543,1554,1577,1598,1628,1657,1674,1685,1691,1697,1703,1709,1752,1775,1799,1826,1853,1900,1905,1910],{"__ignoreMap":222},[226,356,357,359,362,364],{"class":228,"line":229},[226,358,233],{"class":232},[226,360,361],{"class":236}," {defineShader, p, sim, transformColor, transformPosition} ",[226,363,240],{"class":232},[226,365,244],{"class":243},[226,367,369,371,374,376],{"class":228,"line":368},2,[226,370,233],{"class":232},[226,372,373],{"class":236}," {tgpu, d} ",[226,375,240],{"class":232},[226,377,378],{"class":243}," '@coreroot\u002Fgpu\u002Fkit'\n",[226,380,382,384,387,389],{"class":228,"line":381},3,[226,383,233],{"class":232},[226,385,386],{"class":236}," {buildStableFluidsKernels, buildEmitterSplatKernel, buildFluidOutputKernel, mixExpr, vec4, ZERO} ",[226,388,240],{"class":232},[226,390,391],{"class":243}," '@coreroot\u002Fgpu\u002Fporters'\n",[226,393,395,397,400,403,405],{"class":228,"line":394},4,[226,396,233],{"class":232},[226,398,399],{"class":232}," type",[226,401,402],{"class":236}," {GpuFragmentParams, KitTexture, Expr} ",[226,404,240],{"class":232},[226,406,391],{"class":243},[226,408,410],{"class":228,"line":409},5,[226,411,413],{"emptyLinePlaceholder":412},true,"\n",[226,415,417,420,423,426,429,431,434,437],{"class":228,"line":416},6,[226,418,419],{"class":232},"const",[226,421,422],{"class":236}," {",[226,424,154],{"class":425},"sDLfK",[226,427,428],{"class":236},", ",[226,430,167],{"class":425},[226,432,433],{"class":236},"} ",[226,435,436],{"class":232},"=",[226,438,439],{"class":236}," sim.fluids\n",[226,441,443],{"class":228,"line":442},7,[226,444,413],{"emptyLinePlaceholder":412},[226,446,448,450,453,456],{"class":228,"line":447},8,[226,449,419],{"class":232},[226,451,452],{"class":425}," N",[226,454,455],{"class":232}," =",[226,457,458],{"class":425}," 256\n",[226,460,462,464,467,469,471,474],{"class":228,"line":461},9,[226,463,419],{"class":232},[226,465,466],{"class":425}," COUNT",[226,468,455],{"class":232},[226,470,452],{"class":425},[226,472,473],{"class":232}," *",[226,475,476],{"class":425}," N\n",[226,478,480],{"class":228,"line":479},10,[226,481,413],{"emptyLinePlaceholder":412},[226,483,485],{"class":228,"line":484},11,[226,486,488],{"class":487},"sAwPA","\u002F\u002F The values every pass reads each frame. dt, curlStrength, velFade, dyeFade and colorDecay are the\n",[226,490,492],{"class":228,"line":491},12,[226,493,494],{"class":487},"\u002F\u002F solver's; the rest drive the emitter and the cursor shove.\n",[226,496,498,500,503,505,508,512],{"class":228,"line":497},13,[226,499,419],{"class":232},[226,501,502],{"class":425}," FluidParams",[226,504,455],{"class":232},[226,506,507],{"class":236}," d.",[226,509,511],{"class":510},"svObZ","struct",[226,513,514],{"class":236},"({\n",[226,516,518],{"class":228,"line":517},14,[226,519,520],{"class":236},"  dt: d.f32, emitX: d.f32, emitY: d.f32, emitVelX: d.f32, emitVelY: d.f32,\n",[226,522,524],{"class":228,"line":523},15,[226,525,526],{"class":236},"  perpDirX: d.f32, perpDirY: d.f32, spreadFactor: d.f32, emitRad: d.f32, emitIntensity: d.f32,\n",[226,528,530],{"class":228,"line":529},16,[226,531,532],{"class":236},"  dyeFade: d.f32, velFade: d.f32, curlStrength: d.f32, gravity: d.f32, cursorX: d.f32, cursorY: d.f32,\n",[226,534,536],{"class":228,"line":535},17,[226,537,538],{"class":236},"  cursorVelX: d.f32, cursorVelY: d.f32, mouseActive: d.f32, mouseRadSq: d.f32, colorDecay: d.f32,\n",[226,540,542],{"class":228,"line":541},18,[226,543,544],{"class":236},"})\n",[226,546,548],{"class":228,"line":547},19,[226,549,550],{"class":487},"\u002F\u002F The fluid's buffers, by the names the solver expects.\n",[226,552,554,556,559,561,564,567],{"class":228,"line":553},20,[226,555,419],{"class":232},[226,557,558],{"class":425}," fluidLayout",[226,560,455],{"class":232},[226,562,563],{"class":236}," tgpu.",[226,565,566],{"class":510},"bindGroupLayout",[226,568,514],{"class":236},[226,570,572,575,578,581,584,587,590],{"class":228,"line":571},21,[226,573,574],{"class":236},"  velA: {storage: d.",[226,576,577],{"class":510},"arrayOf",[226,579,580],{"class":236},"(d.vec4f, ",[226,582,583],{"class":425},"COUNT",[226,585,586],{"class":236},"), access: ",[226,588,589],{"class":243},"'mutable'",[226,591,592],{"class":236},"},\n",[226,594,596,599,601,603,605,607,609],{"class":228,"line":595},22,[226,597,598],{"class":236},"  velB: {storage: d.",[226,600,577],{"class":510},[226,602,580],{"class":236},[226,604,583],{"class":425},[226,606,586],{"class":236},[226,608,589],{"class":243},[226,610,592],{"class":236},[226,612,614,617,619,621,623,625,627],{"class":228,"line":613},23,[226,615,616],{"class":236},"  dyeA: {storage: d.",[226,618,577],{"class":510},[226,620,580],{"class":236},[226,622,583],{"class":425},[226,624,586],{"class":236},[226,626,589],{"class":243},[226,628,592],{"class":236},[226,630,632,635,637,639,641,643,645],{"class":228,"line":631},24,[226,633,634],{"class":236},"  dyeB: {storage: d.",[226,636,577],{"class":510},[226,638,580],{"class":236},[226,640,583],{"class":425},[226,642,586],{"class":236},[226,644,589],{"class":243},[226,646,592],{"class":236},[226,648,650,653,655,658,660,662,664],{"class":228,"line":649},25,[226,651,652],{"class":236},"  pressure: {storage: d.",[226,654,577],{"class":510},[226,656,657],{"class":236},"(d.f32, ",[226,659,583],{"class":425},[226,661,586],{"class":236},[226,663,589],{"class":243},[226,665,592],{"class":236},[226,667,669,672,674,676,678,680,682],{"class":228,"line":668},26,[226,670,671],{"class":236},"  divergence: {storage: d.",[226,673,577],{"class":510},[226,675,657],{"class":236},[226,677,583],{"class":425},[226,679,586],{"class":236},[226,681,589],{"class":243},[226,683,592],{"class":236},[226,685,687],{"class":228,"line":686},27,[226,688,689],{"class":236},"  params: {uniform: FluidParams},\n",[226,691,693],{"class":228,"line":692},28,[226,694,544],{"class":236},[226,696,698,700,703,705,707,709],{"class":228,"line":697},29,[226,699,419],{"class":232},[226,701,702],{"class":425}," outputLayout",[226,704,455],{"class":232},[226,706,563],{"class":236},[226,708,566],{"class":510},[226,710,514],{"class":236},[226,712,714,716,718,720,722,724,727],{"class":228,"line":713},30,[226,715,616],{"class":236},[226,717,577],{"class":510},[226,719,580],{"class":236},[226,721,583],{"class":425},[226,723,586],{"class":236},[226,725,726],{"class":243},"'readonly'",[226,728,592],{"class":236},[226,730,732,735,738,741,744,746,749],{"class":228,"line":731},31,[226,733,734],{"class":236},"  outTex: {storageTexture: d.",[226,736,737],{"class":510},"textureStorage2d",[226,739,740],{"class":236},"(",[226,742,743],{"class":243},"'rgba16float'",[226,745,428],{"class":236},[226,747,748],{"class":243},"'write-only'",[226,750,751],{"class":236},")},\n",[226,753,755],{"class":228,"line":754},32,[226,756,544],{"class":236},[226,758,760],{"class":228,"line":759},33,[226,761,413],{"emptyLinePlaceholder":412},[226,763,765],{"class":228,"line":764},34,[226,766,767],{"class":487},"\u002F\u002F The one pass that is this shader's own: a cone emitter at a fixed source, plus the cursor shove.\n",[226,769,771,773,776,778,781,784,787,790,793,796,799,802,804,807,810,813,816],{"class":228,"line":770},35,[226,772,419],{"class":232},[226,774,775],{"class":425}," splatKernel",[226,777,455],{"class":232},[226,779,780],{"class":510}," buildEmitterSplatKernel",[226,782,783],{"class":236},"(fluidLayout, {n: ",[226,785,786],{"class":425},"N",[226,788,789],{"class":236},", namePrefix: ",[226,791,792],{"class":243},"'smoke'",[226,794,795],{"class":236},", cone: ",[226,797,798],{"class":425},"true",[226,800,801],{"class":236},", cursorPush: ",[226,803,798],{"class":425},[226,805,806],{"class":236},", densityGain: ",[226,808,809],{"class":425},"8",[226,811,812],{"class":236},", velocityBlendGain: ",[226,814,815],{"class":425},"3",[226,817,544],{"class":236},[226,819,821],{"class":228,"line":820},36,[226,822,823],{"class":487},"\u002F\u002F Everything else is the shared solve over a density-and-age dye.\n",[226,825,827,829,832,834,837,839,841,843,845,848,851,854,857,860,862,865,867],{"class":228,"line":826},37,[226,828,419],{"class":232},[226,830,831],{"class":425}," solverKernels",[226,833,455],{"class":232},[226,835,836],{"class":510}," buildStableFluidsKernels",[226,838,783],{"class":236},[226,840,786],{"class":425},[226,842,789],{"class":236},[226,844,792],{"class":243},[226,846,847],{"class":236},", boundary: ",[226,849,850],{"class":243},"'clamped'",[226,852,853],{"class":236},", dye: ",[226,855,856],{"class":243},"'densityAge'",[226,858,859],{"class":236},", dyeDissipation: ",[226,861,798],{"class":425},[226,863,864],{"class":236},", ageAdvance: ",[226,866,798],{"class":425},[226,868,544],{"class":236},[226,870,872,874,877,879,882,885,887,889,891,893,895],{"class":228,"line":871},38,[226,873,419],{"class":232},[226,875,876],{"class":425}," outputKernel",[226,878,455],{"class":232},[226,880,881],{"class":510}," buildFluidOutputKernel",[226,883,884],{"class":236},"(outputLayout, {n: ",[226,886,786],{"class":425},[226,888,789],{"class":236},[226,890,792],{"class":243},[226,892,853],{"class":236},[226,894,856],{"class":243},[226,896,544],{"class":236},[226,898,900],{"class":228,"line":899},39,[226,901,413],{"emptyLinePlaceholder":412},[226,903,905],{"class":228,"line":904},40,[226,906,907],{"class":487},"\u002F\u002F Smoke: fresh smoke in colorA ages toward colorB as it rises and dissipates.\n",[226,909,911,914,917,920,922,925],{"class":228,"line":910},41,[226,912,913],{"class":232},"export",[226,915,916],{"class":232}," const",[226,918,919],{"class":425}," Smoke",[226,921,455],{"class":232},[226,923,924],{"class":510}," defineShader",[226,926,514],{"class":236},[226,928,930,933,936],{"class":228,"line":929},42,[226,931,932],{"class":236},"  name: ",[226,934,935],{"class":243},"'Smoke'",[226,937,938],{"class":236},",\n",[226,940,942,945,947],{"class":228,"line":941},43,[226,943,944],{"class":236},"  usesPointer: ",[226,946,798],{"class":425},[226,948,938],{"class":236},[226,950,952],{"class":228,"line":951},44,[226,953,954],{"class":236},"  props: {\n",[226,956,958,961,964],{"class":228,"line":957},45,[226,959,960],{"class":236},"    colorA: {default: ",[226,962,963],{"class":243},"'#fc83f9'",[226,965,966],{"class":236},", transform: transformColor},\n",[226,968,970,973,976],{"class":228,"line":969},46,[226,971,972],{"class":236},"    colorB: {default: ",[226,974,975],{"class":243},"'#c21c79'",[226,977,966],{"class":236},[226,979,981,984,987,990,993],{"class":228,"line":980},47,[226,982,983],{"class":236},"    emitFrom: {default: {x: ",[226,985,986],{"class":425},"0.5",[226,988,989],{"class":236},", y: ",[226,991,992],{"class":425},"1",[226,994,995],{"class":236},"}, transform: transformPosition},\n",[226,997,999,1002,1005],{"class":228,"line":998},48,[226,1000,1001],{"class":236},"    speed: {default: ",[226,1003,1004],{"class":425},"20",[226,1006,592],{"class":236},[226,1008,1010,1013,1016],{"class":228,"line":1009},49,[226,1011,1012],{"class":236},"    emitRadius: {default: ",[226,1014,1015],{"class":425},"0.08",[226,1017,592],{"class":236},[226,1019,1021,1024,1027],{"class":228,"line":1020},50,[226,1022,1023],{"class":236},"    dissipation: {default: ",[226,1025,1026],{"class":425},"0.2",[226,1028,592],{"class":236},[226,1030,1032,1035,1038],{"class":228,"line":1031},51,[226,1033,1034],{"class":236},"    detail: {default: ",[226,1036,1037],{"class":425},"25",[226,1039,592],{"class":236},[226,1041,1043,1046,1049],{"class":228,"line":1042},52,[226,1044,1045],{"class":236},"    mouseInfluence: {default: ",[226,1047,1048],{"class":425},"0.1",[226,1050,592],{"class":236},[226,1052,1054],{"class":228,"line":1053},53,[226,1055,1056],{"class":236},"  },\n",[226,1058,1060,1063,1065,1068,1071],{"class":228,"line":1059},54,[226,1061,1062],{"class":232},"  ...",[226,1064,154],{"class":510},[226,1066,1067],{"class":236},"(() ",[226,1069,1070],{"class":232},"=>",[226,1072,1073],{"class":236}," ({\n",[226,1075,1077,1080,1082],{"class":228,"line":1076},55,[226,1078,1079],{"class":236},"    resolution: ",[226,1081,786],{"class":425},[226,1083,938],{"class":236},[226,1085,1087],{"class":228,"line":1086},56,[226,1088,1089],{"class":236},"    layout: fluidLayout, outputLayout, paramsSchema: FluidParams,\n",[226,1091,1093,1096,1099],{"class":228,"line":1092},57,[226,1094,1095],{"class":236},"    solver: {kernels: solverKernels, jacobiIters: ",[226,1097,1098],{"class":425},"10",[226,1100,592],{"class":236},[226,1102,1104,1107,1110],{"class":228,"line":1103},58,[226,1105,1106],{"class":236},"    output: {kernel: outputKernel, key: ",[226,1108,1109],{"class":243},"'smokeTexture'",[226,1111,592],{"class":236},[226,1113,1115,1118,1121],{"class":228,"line":1114},59,[226,1116,1117],{"class":236},"    pointer: {minDrag: ",[226,1119,1120],{"class":425},"0.0005",[226,1122,592],{"class":236},[226,1124,1126,1129,1131],{"class":228,"line":1125},60,[226,1127,1128],{"class":236},"    inject: [",[226,1130,167],{"class":510},[226,1132,1133],{"class":236},"({kernel: splatKernel})],\n",[226,1135,1137,1140,1143,1147,1150,1152],{"class":228,"line":1136},61,[226,1138,1139],{"class":510},"    values",[226,1141,1142],{"class":236},": (",[226,1144,1146],{"class":1145},"s9osk","f",[226,1148,1149],{"class":236},") ",[226,1151,1070],{"class":232},[226,1153,1154],{"class":236}," {\n",[226,1156,1158,1161,1164,1166,1169,1172,1174,1177,1179,1182,1184,1187,1190,1193,1196,1199,1201,1203,1205,1208],{"class":228,"line":1157},62,[226,1159,1160],{"class":232},"      const",[226,1162,1163],{"class":425}," emit",[226,1165,455],{"class":232},[226,1167,1168],{"class":236}," f.",[226,1170,1171],{"class":510},"getCpuValue",[226,1173,740],{"class":236},[226,1175,1176],{"class":243},"'emitFrom'",[226,1178,1149],{"class":236},[226,1180,1181],{"class":232},"as",[226,1183,422],{"class":236},[226,1185,1186],{"class":1145},"x",[226,1188,1189],{"class":232},":",[226,1191,1192],{"class":425}," number",[226,1194,1195],{"class":236},"; ",[226,1197,1198],{"class":1145},"y",[226,1200,1189],{"class":232},[226,1202,1192],{"class":425},[226,1204,433],{"class":236},[226,1206,1207],{"class":232},"|",[226,1209,1210],{"class":425}," undefined\n",[226,1212,1214,1216,1219,1221,1223,1226,1228,1231,1233,1235,1237,1240,1242,1244],{"class":228,"line":1213},63,[226,1215,1160],{"class":232},[226,1217,1218],{"class":425}," velMag",[226,1220,455],{"class":232},[226,1222,1168],{"class":236},[226,1224,1225],{"class":510},"num",[226,1227,740],{"class":236},[226,1229,1230],{"class":243},"'speed'",[226,1232,428],{"class":236},[226,1234,1004],{"class":425},[226,1236,1149],{"class":236},[226,1238,1239],{"class":232},"*",[226,1241,452],{"class":425},[226,1243,473],{"class":232},[226,1245,1246],{"class":425}," 0.15\n",[226,1248,1250,1252,1255,1257,1260],{"class":228,"line":1249},64,[226,1251,1160],{"class":232},[226,1253,1254],{"class":425}," ptr",[226,1256,455],{"class":232},[226,1258,1259],{"class":236}," f.ptr",[226,1261,1262],{"class":232},"!\n",[226,1264,1266,1268,1271,1273,1275,1277,1279,1282,1284,1286],{"class":228,"line":1265},65,[226,1267,1160],{"class":232},[226,1269,1270],{"class":425}," mouseInf",[226,1272,455],{"class":232},[226,1274,1168],{"class":236},[226,1276,1225],{"class":510},[226,1278,740],{"class":236},[226,1280,1281],{"class":243},"'mouseInfluence'",[226,1283,428],{"class":236},[226,1285,1048],{"class":425},[226,1287,1288],{"class":236},")\n",[226,1290,1292,1294,1297,1299,1302,1305,1308,1311],{"class":228,"line":1291},66,[226,1293,1160],{"class":232},[226,1295,1296],{"class":425}," active",[226,1298,455],{"class":232},[226,1300,1301],{"class":236}," ptr.moving ",[226,1303,1304],{"class":232},"&&",[226,1306,1307],{"class":236}," mouseInf ",[226,1309,1310],{"class":232},">",[226,1312,1313],{"class":425}," 0\n",[226,1315,1317,1319,1322,1324,1327,1329],{"class":228,"line":1316},67,[226,1318,1160],{"class":232},[226,1320,1321],{"class":425}," mouseRadGrid",[226,1323,455],{"class":232},[226,1325,1326],{"class":425}," 0.1",[226,1328,473],{"class":232},[226,1330,476],{"class":425},[226,1332,1334,1337],{"class":228,"line":1333},68,[226,1335,1336],{"class":232},"      return",[226,1338,1154],{"class":236},[226,1340,1342],{"class":228,"line":1341},69,[226,1343,1344],{"class":236},"        dt: f.dt,\n",[226,1346,1348,1351,1354,1357,1359,1361,1363],{"class":228,"line":1347},70,[226,1349,1350],{"class":236},"        emitX: (emit?.x ",[226,1352,1353],{"class":232},"??",[226,1355,1356],{"class":425}," 0.5",[226,1358,1149],{"class":236},[226,1360,1239],{"class":232},[226,1362,452],{"class":425},[226,1364,938],{"class":236},[226,1366,1368,1371,1373,1376,1379,1381,1384,1387,1389,1391],{"class":228,"line":1367},71,[226,1369,1370],{"class":236},"        emitY: (",[226,1372,992],{"class":425},[226,1374,1375],{"class":232}," -",[226,1377,1378],{"class":236}," (emit?.y ",[226,1380,1353],{"class":232},[226,1382,1383],{"class":425}," 0",[226,1385,1386],{"class":236},")) ",[226,1388,1239],{"class":232},[226,1390,452],{"class":425},[226,1392,938],{"class":236},[226,1394,1396,1399,1402,1405,1408],{"class":228,"line":1395},72,[226,1397,1398],{"class":236},"        emitVelX: ",[226,1400,1401],{"class":425},"0",[226,1403,1404],{"class":236},", emitVelY: ",[226,1406,1407],{"class":232},"-",[226,1409,1410],{"class":236},"velMag,\n",[226,1412,1414,1417,1419,1422,1424],{"class":228,"line":1413},73,[226,1415,1416],{"class":236},"        perpDirX: ",[226,1418,992],{"class":425},[226,1420,1421],{"class":236},", perpDirY: ",[226,1423,1401],{"class":425},[226,1425,938],{"class":236},[226,1427,1429,1432,1435,1438,1441,1444,1447],{"class":228,"line":1428},74,[226,1430,1431],{"class":236},"        spreadFactor: Math.",[226,1433,1434],{"class":510},"tan",[226,1436,1437],{"class":236},"(Math.",[226,1439,1440],{"class":425},"PI",[226,1442,1443],{"class":232}," \u002F",[226,1445,1446],{"class":425}," 6",[226,1448,1449],{"class":236},"),\n",[226,1451,1453,1456,1458,1460,1463,1465,1467,1469,1471,1473],{"class":228,"line":1452},75,[226,1454,1455],{"class":236},"        emitRad: f.",[226,1457,1225],{"class":510},[226,1459,740],{"class":236},[226,1461,1462],{"class":243},"'emitRadius'",[226,1464,428],{"class":236},[226,1466,1015],{"class":425},[226,1468,1149],{"class":236},[226,1470,1239],{"class":232},[226,1472,452],{"class":425},[226,1474,938],{"class":236},[226,1476,1478,1481,1483],{"class":228,"line":1477},76,[226,1479,1480],{"class":236},"        emitIntensity: ",[226,1482,992],{"class":425},[226,1484,938],{"class":236},[226,1486,1488,1491,1493,1495,1498,1500,1502],{"class":228,"line":1487},77,[226,1489,1490],{"class":236},"        dyeFade: f.",[226,1492,1225],{"class":510},[226,1494,740],{"class":236},[226,1496,1497],{"class":243},"'dissipation'",[226,1499,428],{"class":236},[226,1501,1026],{"class":425},[226,1503,1449],{"class":236},[226,1505,1507,1510,1512],{"class":228,"line":1506},78,[226,1508,1509],{"class":236},"        velFade: ",[226,1511,1026],{"class":425},[226,1513,938],{"class":236},[226,1515,1517,1520,1522,1524,1527,1529,1531],{"class":228,"line":1516},79,[226,1518,1519],{"class":236},"        curlStrength: f.",[226,1521,1225],{"class":510},[226,1523,740],{"class":236},[226,1525,1526],{"class":243},"'detail'",[226,1528,428],{"class":236},[226,1530,1037],{"class":425},[226,1532,1449],{"class":236},[226,1534,1536,1539,1541],{"class":228,"line":1535},80,[226,1537,1538],{"class":236},"        gravity: ",[226,1540,986],{"class":425},[226,1542,938],{"class":236},[226,1544,1546,1549,1552],{"class":228,"line":1545},81,[226,1547,1548],{"class":236},"        colorDecay: ",[226,1550,1551],{"class":425},"0.4",[226,1553,938],{"class":236},[226,1555,1557,1560,1563,1566,1568,1570,1573,1575],{"class":228,"line":1556},82,[226,1558,1559],{"class":236},"        cursorX: active ",[226,1561,1562],{"class":232},"?",[226,1564,1565],{"class":236}," ptr.x ",[226,1567,1239],{"class":232},[226,1569,452],{"class":425},[226,1571,1572],{"class":232}," :",[226,1574,1383],{"class":425},[226,1576,938],{"class":236},[226,1578,1580,1583,1585,1588,1590,1592,1594,1596],{"class":228,"line":1579},83,[226,1581,1582],{"class":236},"        cursorY: active ",[226,1584,1562],{"class":232},[226,1586,1587],{"class":236}," ptr.y ",[226,1589,1239],{"class":232},[226,1591,452],{"class":425},[226,1593,1572],{"class":232},[226,1595,1383],{"class":425},[226,1597,938],{"class":236},[226,1599,1601,1604,1606,1609,1611,1613,1615,1618,1620,1622,1624,1626],{"class":228,"line":1600},84,[226,1602,1603],{"class":236},"        cursorVelX: active ",[226,1605,1562],{"class":232},[226,1607,1608],{"class":236}," ptr.dx ",[226,1610,1239],{"class":232},[226,1612,452],{"class":425},[226,1614,473],{"class":232},[226,1616,1617],{"class":425}," 15",[226,1619,473],{"class":232},[226,1621,1307],{"class":236},[226,1623,1189],{"class":232},[226,1625,1383],{"class":425},[226,1627,938],{"class":236},[226,1629,1631,1634,1636,1639,1641,1643,1645,1647,1649,1651,1653,1655],{"class":228,"line":1630},85,[226,1632,1633],{"class":236},"        cursorVelY: active ",[226,1635,1562],{"class":232},[226,1637,1638],{"class":236}," ptr.dy ",[226,1640,1239],{"class":232},[226,1642,452],{"class":425},[226,1644,473],{"class":232},[226,1646,1617],{"class":425},[226,1648,473],{"class":232},[226,1650,1307],{"class":236},[226,1652,1189],{"class":232},[226,1654,1383],{"class":425},[226,1656,938],{"class":236},[226,1658,1660,1663,1665,1668,1670,1672],{"class":228,"line":1659},86,[226,1661,1662],{"class":236},"        mouseActive: active ",[226,1664,1562],{"class":232},[226,1666,1667],{"class":425}," 1",[226,1669,1572],{"class":232},[226,1671,1383],{"class":425},[226,1673,938],{"class":236},[226,1675,1677,1680,1682],{"class":228,"line":1676},87,[226,1678,1679],{"class":236},"        mouseRadSq: mouseRadGrid ",[226,1681,1239],{"class":232},[226,1683,1684],{"class":236}," mouseRadGrid,\n",[226,1686,1688],{"class":228,"line":1687},88,[226,1689,1690],{"class":236},"      }\n",[226,1692,1694],{"class":228,"line":1693},89,[226,1695,1696],{"class":236},"    },\n",[226,1698,1700],{"class":228,"line":1699},90,[226,1701,1702],{"class":236},"  })),\n",[226,1704,1706],{"class":228,"line":1705},91,[226,1707,1708],{"class":236},"  gpu: {\n",[226,1710,1712,1715,1718,1721,1723,1726,1728,1731,1734,1736,1739,1742,1744,1747,1750],{"class":228,"line":1711},92,[226,1713,1714],{"class":510},"    fragment",[226,1716,1717],{"class":236},": ({",[226,1719,1720],{"class":1145},"ctx",[226,1722,428],{"class":236},[226,1724,1725],{"class":1145},"computeOutputs",[226,1727,428],{"class":236},[226,1729,1730],{"class":1145},"uniforms",[226,1732,1733],{"class":236},"}",[226,1735,1189],{"class":232},[226,1737,1738],{"class":510}," GpuFragmentParams",[226,1740,1741],{"class":236},")",[226,1743,1189],{"class":232},[226,1745,1746],{"class":510}," Expr",[226,1748,1749],{"class":232}," =>",[226,1751,1154],{"class":236},[226,1753,1755,1757,1760,1762,1765,1767,1770,1773],{"class":228,"line":1754},93,[226,1756,1160],{"class":232},[226,1758,1759],{"class":425}," field",[226,1761,455],{"class":232},[226,1763,1764],{"class":236}," computeOutputs?.smokeTexture ",[226,1766,1181],{"class":232},[226,1768,1769],{"class":510}," KitTexture",[226,1771,1772],{"class":232}," |",[226,1774,1210],{"class":425},[226,1776,1778,1781,1784,1787,1790,1793,1796],{"class":228,"line":1777},94,[226,1779,1780],{"class":232},"      if",[226,1782,1783],{"class":236}," (",[226,1785,1786],{"class":232},"!",[226,1788,1789],{"class":236},"field) ",[226,1791,1792],{"class":232},"return",[226,1794,1795],{"class":425}," ZERO",[226,1797,1798],{"class":487}," \u002F\u002F no GPU: transparent\n",[226,1800,1802,1804,1807,1809,1812,1815,1818,1821,1823],{"class":228,"line":1801},95,[226,1803,1160],{"class":232},[226,1805,1806],{"class":425}," s",[226,1808,455],{"class":232},[226,1810,1811],{"class":236}," field.",[226,1813,1814],{"class":510},"sample",[226,1816,1817],{"class":236},"(ctx.uv, ",[226,1819,1820],{"class":243},"'linearClamp'",[226,1822,1149],{"class":236},[226,1824,1825],{"class":487},"\u002F\u002F x = density, y = age\n",[226,1827,1829,1831,1834,1836,1839,1842,1845,1847,1850],{"class":228,"line":1828},96,[226,1830,1160],{"class":232},[226,1832,1833],{"class":425}," color",[226,1835,455],{"class":232},[226,1837,1838],{"class":510}," mixExpr",[226,1840,1841],{"class":236},"(uniforms.colorA, uniforms.colorB, s.",[226,1843,1844],{"class":510},"member",[226,1846,740],{"class":236},[226,1848,1849],{"class":243},"'y'",[226,1851,1852],{"class":236},"))\n",[226,1854,1856,1858,1861,1864,1866,1868,1871,1874,1876,1878,1881,1884,1887,1890,1892,1894,1897],{"class":228,"line":1855},97,[226,1857,1336],{"class":232},[226,1859,1860],{"class":510}," vec4",[226,1862,1863],{"class":236},"(color.",[226,1865,1844],{"class":510},[226,1867,740],{"class":236},[226,1869,1870],{"class":243},"'rgb'",[226,1872,1873],{"class":236},"), color.",[226,1875,1844],{"class":510},[226,1877,740],{"class":236},[226,1879,1880],{"class":243},"'a'",[226,1882,1883],{"class":236},").",[226,1885,1886],{"class":510},"mul",[226,1888,1889],{"class":236},"(s.",[226,1891,1844],{"class":510},[226,1893,740],{"class":236},[226,1895,1896],{"class":243},"'x'",[226,1898,1899],{"class":236},")))\n",[226,1901,1903],{"class":228,"line":1902},98,[226,1904,1696],{"class":236},[226,1906,1908],{"class":228,"line":1907},99,[226,1909,1056],{"class":236},[226,1911,1913],{"class":228,"line":1912},100,[226,1914,544],{"class":236},[246,1916,1918],{"id":1917},"types","Types",[251,1920,1921,1931],{},[254,1922,1923],{},[257,1924,1925,1928],{},[260,1926,1927],{},"Type",[260,1929,1930],{},"What it is",[267,1932,1933,1943,1953,1963,1976,1986,1996,2006,2016,2026,2036,2046],{},[257,1934,1935,1940],{},[272,1936,1937],{},[10,1938,1939],{},"CursorRibbonSpec",[272,1941,1942],{},"This frame's ribbon of stamps along the stroke: spacing, cap, and how each stamp is written.",[257,1944,1945,1950],{},[272,1946,1947],{},[10,1948,1949],{},"FluidContainerParts",[272,1951,1952],{},"What a container (a shape the fluid is confined to) contributes each frame.",[257,1954,1955,1960],{},[272,1956,1957],{},[10,1958,1959],{},"FluidEmitter",[272,1961,1962],{},"Something that injects into the field each frame.",[257,1964,1965,1970],{},[272,1966,1967],{},[10,1968,1969],{},"FluidFrame",[272,1971,1972,1973,1975],{},"One frame, as every part and ",[10,1974,207],{}," sees it: the clamped delta, the clocks, the pointer and your props.",[257,1977,1978,1983],{},[272,1979,1980],{},[10,1981,1982],{},"FluidFrameParams",[272,1984,1985],{},"What the renderer reports each frame: the pointer in uv, the frame delta in seconds, the canvas size in pixels.",[257,1987,1988,1993],{},[272,1989,1990],{},[10,1991,1992],{},"FluidInitIo",[272,1994,1995],{},"What an init part appends with: the frame's pass list, a queued values write, and a full solve.",[257,1997,1998,2003],{},[272,1999,2000],{},[10,2001,2002],{},"FluidInitPart",[272,2004,2005],{},"How the field starts, and when it must start over.",[257,2007,2008,2013],{},[272,2009,2010],{},[10,2011,2012],{},"FluidKernel",[272,2014,2015],{},"A pass function run once per grid cell, with the cell's column and row.",[257,2017,2018,2023],{},[272,2019,2020],{},[10,2021,2022],{},"FluidRoot",[272,2024,2025],{},"The GPU device handle the build callback receives, for creating the resources your passes use.",[257,2027,2028,2033],{},[272,2029,2030],{},[10,2031,2032],{},"FluidSetupCtx",[272,2034,2035],{},"What a part receives when it builds its passes: the device, the grid size, the buffers and a pass builder.",[257,2037,2038,2043],{},[272,2039,2040],{},[10,2041,2042],{},"FluidSimConfig",[272,2044,2045],{},"What a fluid simulation declares: its grid, its solver, its output, its parts and its per-frame values.",[257,2047,2048,2053],{},[272,2049,2050],{},[10,2051,2052],{},"FluidSolveStage",[272,2054,2055,2056,2058,2059,1883],{},"A pass that runs inside every solve, before it (",[10,2057,217],{},") or after it (",[10,2060,2061],{},"post",[246,2063,2065],{"id":2064},"words","Words",[2067,2068,2070],"primitive-words",{":words":2069},"[{\"name\":\"fluidSim\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Ffluidsim\",\"summary\":\"A fluid the engine solves every frame.\"},{\"name\":\"splat\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fsplat\",\"summary\":\"An emitter at a fixed source: one pass per frame that adds dye and momentum where your pass function says (a cone from a point, a line along an edge).\"},{\"name\":\"cursorRibbon\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fcursorribbon\",\"summary\":\"An emitter that paints along the pointer's stroke: a ribbon of stamps between last frame's position and this one, so a fast flick leaves a continuous line, not dots.\"},{\"name\":\"seededFieldInit\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fseededfieldinit\",\"summary\":\"A field that starts full: seed it from a pass function, then run the solve silently `warm.steps` times so the first visible frame already flows.\"},{\"name\":\"ambientForce\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Fambientforce\",\"summary\":\"A force applied to the whole field before every solve: a turbulence field, a steady wind.\"},{\"name\":\"restoreToward\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-fluids\u002Frestoretoward\",\"summary\":\"A correction applied after every solve: re-seed a color that the solve slowly blurs away.\"}]",[2071,2072,2073,2081,2088,2095,2106,2113],"ul",{},[2074,2075,2076,2080],"li",{},[149,2077,2078],{"href":151},[10,2079,154],{}," — A fluid the engine solves every frame.",[2074,2082,2083,2087],{},[149,2084,2085],{"href":164},[10,2086,167],{}," — An emitter at a fixed source: one pass per frame that adds dye and momentum where your pass function says (a cone from a point, a line along an edge).",[2074,2089,2090,2094],{},[149,2091,2092],{"href":171},[10,2093,174],{}," — An emitter that paints along the pointer's stroke: a ribbon of stamps between last frame's position and this one, so a fast flick leaves a continuous line, not dots.",[2074,2096,2097,2101,2102,2105],{},[149,2098,2099],{"href":200},[10,2100,203],{}," — A field that starts full: seed it from a pass function, then run the solve silently ",[10,2103,2104],{},"warm.steps"," times so the first visible frame already flows.",[2074,2107,2108,2112],{},[149,2109,2110],{"href":182},[10,2111,185],{}," — A force applied to the whole field before every solve: a turbulence field, a steady wind.",[2074,2114,2115,2119],{},[149,2116,2117],{"href":189},[10,2118,192],{}," — A correction applied after every solve: re-seed a color that the solve slowly blurs away.",[2121,2122,2123],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}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 .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}",{"title":222,"searchDepth":368,"depth":368,"links":2125},[2126,2127,2128,2129],{"id":248,"depth":368,"text":249},{"id":348,"depth":368,"text":349},{"id":1917,"depth":368,"text":1918},{"id":2064,"depth":368,"text":2065},"sim.fluids","sim-fluids",null,"Smoke, ink and fog that flow.","https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fedit\u002Fmain\u002Fpackages\u002Fcore\u002Fdocs\u002Fstd\u002Fsim.fluids.md","md","simulation","Simulation",{},"\u002Fdocs\u002Fprimitives\u002Fsim-fluids",{"title":131,"description":2133},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fsim\u002Ffluids.ts","docs\u002Fprimitives\u002F38.sim-fluids\u002Findex","g0KYVRC9X_mqfObONn7Z5h0rgGjwBVGr68QB38IagOI"]