[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-nav":3,"doc-\u002Fdocs\u002Fprimitives\u002Fsim-agentforces":145},[4,10,16,20,24,28,32,36,40,44,48,52,56,60,64,69,73,78,82,86,90,94,98,102,106,110,114,117,120,124,127,131,134,138,141],{"path":5,"title":6,"description":7,"category":8,"exclude":9,"forceFramework":9},"\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",null,{"path":11,"title":12,"description":13,"category":8,"exclude":14,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",[15],"js",{"path":17,"title":18,"description":19,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":21,"title":22,"description":23,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":25,"title":26,"description":27,"category":8,"exclude":9,"forceFramework":9},"\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":29,"title":30,"description":31,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":33,"title":34,"description":35,"category":8,"exclude":9,"forceFramework":9},"\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":37,"title":38,"description":39,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in % or px units.",{"path":41,"title":42,"description":43,"category":8,"exclude":9,"forceFramework":9},"\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":45,"title":46,"description":47,"category":8,"exclude":9,"forceFramework":9},"\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":49,"title":50,"description":51,"category":8,"exclude":9,"forceFramework":9},"\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":53,"title":54,"description":55,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":57,"title":58,"description":59,"category":8,"exclude":9,"forceFramework":9},"\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":61,"title":62,"description":63,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":65,"title":66,"description":67,"category":68,"exclude":9,"forceFramework":9},"\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":70,"title":71,"description":72,"category":68,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fcli","Shaders CLI","Install shaders and presets into your codebase as component files, and keep them in sync with the design editor.",{"path":74,"title":75,"description":76,"category":77,"exclude":9,"forceFramework":9},"\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":79,"title":80,"description":81,"category":77,"exclude":9,"forceFramework":9},"\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":83,"title":84,"description":85,"category":77,"exclude":9,"forceFramework":9},"\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":87,"title":88,"description":89,"category":77,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fmasking-and-blending","Masking and blending","How blend modes and masks combine components in the design editor.",{"path":91,"title":92,"description":93,"category":77,"exclude":9,"forceFramework":9},"\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":95,"title":96,"description":97,"category":77,"exclude":9,"forceFramework":9},"\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":99,"title":100,"description":101,"category":77,"exclude":9,"forceFramework":9},"\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":103,"title":104,"description":105,"category":77,"exclude":9,"forceFramework":9},"\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":107,"title":108,"description":109,"category":77,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fglass-component-spotlight","Component spotlight: Glass","A short look at the Glass component and the liquid-glass look it creates.",{"path":111,"title":112,"description":113,"category":77,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fdigital-looks-component-spotlight","Component spotlight: Digital looks","A look at the digital stylization components for glitchy, futuristic, or technical effects.",{"path":115,"title":12,"description":116,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fjs\u002Fquickstart","Install Shaders without a framework, render your first effect on a canvas, and update props at runtime.",{"path":118,"title":12,"description":119,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Freact\u002Fquickstart","Install Shaders in a React app, render your first effect, and drive a prop from state.",{"path":121,"title":122,"description":123,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Freact\u002Fssr","Next.js and SSR","Render Shaders in Next.js and other React SSR apps by keeping each shader on the client.",{"path":125,"title":12,"description":126,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fsolid\u002Fquickstart","Install Shaders in a Solid app, render your first effect, and drive a prop from a signal.",{"path":128,"title":129,"description":130,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fsolid\u002Fssr","SolidStart and SSR","Render Shaders in SolidStart and other Solid SSR apps by keeping each shader on the client.",{"path":132,"title":12,"description":133,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fsvelte\u002Fquickstart","Install Shaders in a Svelte app, render your first effect, and drive a prop from state.",{"path":135,"title":136,"description":137,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fsvelte\u002Fssr","SvelteKit and SSR","Render Shaders in SvelteKit and other Svelte SSR apps, where each shader already waits for the browser.",{"path":139,"title":12,"description":140,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fvue\u002Fquickstart","Install Shaders in a Vue app, render your first effect, and drive a prop from a ref.",{"path":142,"title":143,"description":144,"category":8,"exclude":9,"forceFramework":9},"\u002Fdocs\u002Fguide\u002Fvue\u002Fssr","Nuxt and SSR","Render Shaders in Nuxt and other Vue SSR apps by keeping each shader on the client.",{"id":146,"title":147,"body":148,"categoryId":2911,"categorySlug":2912,"categoryTitle":9,"curated":580,"description":2913,"editUrl":2914,"extension":2915,"group":2916,"groupTitle":2917,"kind":9,"meta":2918,"navigation":580,"path":2919,"seo":2920,"sourceUrl":2921,"stem":2922,"wordCount":977,"__hash__":2923},"primitives\u002Fdocs\u002Fprimitives\u002F41.sim-agentforces\u002Findex.md","Agent forces",{"type":149,"value":150,"toc":2905},"minimark",[151,155,193,347,354,383,388,529,533,2313,2317,2576,2580,2901],[152,153,147],"h1",{"id":154},"agent-forces",[156,157,158,159,163,164,171,172,178,179,185,186,192],"p",{},"What pushes, turns and carries each agent. The physics of an agent simulation is a list of\nparts folded into one update step by an ",[160,161,162],"strong",{},"integrator",". A ",[165,166,168],"a",{"href":167},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce",[8,169,170],{},"force"," returns a push for one\nagent; a ",[165,173,175],{"href":174},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque",[8,176,177],{},"torque"," returns a turn; a ",[165,180,182],{"href":181},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield",[8,183,184],{},"field"," samples something at the agent's position (the\nmagnet at the cursor, a home on a grid); a ",[165,187,189],{"href":188},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fdrift",[8,190,191],{},"drift"," is a built-in velocity. Every part is built\nover your layout, which names the per-agent buffers and the per-frame values it reads, so the\nsame part works in any layer that provides those names.",[156,194,195,196,202,203,209,210,209,216,209,222,209,228,234,235,241,242,209,248,209,254,234,260,266,267,209,273,279,280,286,287,293,294,300,301,209,307,293,313,319,320,209,326,293,332,338,339,342,343,346],{},"Six kinds of agent, six integrators. ",[165,197,199],{"href":198},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-forces3d",[8,200,201],{},"integrator.forces3d"," moves a 3D swarm held in a shape\n(",[165,204,206],{"href":205},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-pressure",[8,207,208],{},"force.pressure",", ",[165,211,213],{"href":212},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-containment",[8,214,215],{},"force.containment",[165,217,219],{"href":218},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorxy",[8,220,221],{},"force.cursorXY",[165,223,225],{"href":224},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-gravity",[8,226,227],{},"force.gravity",[165,229,231],{"href":230},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-turbulence",[8,232,233],{},"force.turbulence",").\n",[165,236,238],{"href":237},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-steering2d",[8,239,240],{},"integrator.steering2d"," moves a flock (",[165,243,245],{"href":244},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-flocking",[8,246,247],{},"force.flocking",[165,249,251],{"href":250},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorsteer",[8,252,253],{},"force.cursorSteer",[165,255,257],{"href":256},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-wallturn",[8,258,259],{},"force.wallTurn",[165,261,263],{"href":262},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-orientation2d",[8,264,265],{},"integrator.orientation2d"," turns agents in place (",[165,268,270],{"href":269},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque-aligntofield",[8,271,272],{},"torque.alignToField",[165,274,276],{"href":275},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque-rest",[8,277,278],{},"torque.rest",", over\n",[165,281,283],{"href":282},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield-dipoleorradial",[8,284,285],{},"field.dipoleOrRadial"," and ",[165,288,290],{"href":289},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield-jitteredgridhome",[8,291,292],{},"field.jitteredGridHome","). ",[165,295,297],{"href":296},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-drift2d",[8,298,299],{},"integrator.drift2d"," glides motes\n(",[165,302,304],{"href":303},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fdrift-variedheading",[8,305,306],{},"drift.variedHeading",[165,308,310],{"href":309},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorgust",[8,311,312],{},"force.cursorGust",[165,314,316],{"href":315},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-relief",[8,317,318],{},"integrator.relief"," stands particles on the\nchild's image (",[165,321,323],{"href":322},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel",[8,324,325],{},"channel",[165,327,329],{"href":328},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorinview",[8,330,331],{},"force.cursorInView",[165,333,335],{"href":334},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-advect2d",[8,336,337],{},"integrator.advect2d"," carries particles along\na fluid. Pick the integrator, list the parts, and register the result as the update step in\n",[8,340,341],{},"agentSim","'s ",[8,344,345],{},"bake",".",[156,348,349,350,353],{},"Drag arrives as a per-frame multiplier the frame writes each frame: compute it with\n",[8,351,352],{},"agentFrame.expDecay"," so it does not depend on frame rate.",[355,356,361],"pre",{"className":357,"code":358,"language":359,"meta":360,"style":360},"language-ts shiki shiki-themes github-dark","import {sim} from 'shaders\u002Fstd'\n","ts","",[8,362,363],{"__ignoreMap":360},[364,365,368,372,376,379],"span",{"class":366,"line":367},"line",1,[364,369,371],{"class":370},"snl16","import",[364,373,375],{"class":374},"s95oV"," {sim} ",[364,377,378],{"class":370},"from",[364,380,382],{"class":381},"sU2Wk"," 'shaders\u002Fstd'\n",[384,385,387],"h2",{"id":386},"reach-for-it-when","Reach for it when",[389,390,391,404],"table",{},[392,393,394],"thead",{},[395,396,397,401],"tr",{},[398,399,400],"th",{},"When you need",[398,402,403],{},"Use",[405,406,407,424,435,454,477,492,503,518],"tbody",{},[395,408,409,413],{},[410,411,412],"td",{},"a flock that separates, aligns and coheres",[410,414,415,419,420],{},[165,416,417],{"href":237},[8,418,240],{}," with ",[165,421,422],{"href":244},[8,423,247],{},[395,425,426,429],{},[410,427,428],{},"the cursor attracts or scatters a flock",[410,430,431],{},[165,432,433],{"href":250},[8,434,253],{},[395,436,437,440],{},[410,438,439],{},"a swarm that fills a shape evenly and stays inside it",[410,441,442,419,446,286,450],{},[165,443,444],{"href":198},[8,445,201],{},[165,447,448],{"href":205},[8,449,208],{},[165,451,452],{"href":212},[8,453,215],{},[395,455,456,459],{},[410,457,458],{},"iron filings that swing onto a magnetic field",[410,460,461,419,465,209,469,209,473],{},[165,462,463],{"href":262},[8,464,265],{},[165,466,467],{"href":269},[8,468,272],{},[165,470,471],{"href":275},[8,472,278],{},[165,474,475],{"href":282},[8,476,285],{},[395,478,479,482],{},[410,480,481],{},"motes that glide in one direction with variety",[410,483,484,419,488],{},[165,485,486],{"href":296},[8,487,299],{},[165,489,490],{"href":303},[8,491,306],{},[395,493,494,497],{},[410,495,496],{},"a puff from the cursor on drifting motes",[410,498,499],{},[165,500,501],{"href":309},[8,502,312],{},[395,504,505,508],{},[410,506,507],{},"particles that rise by the brightness of the layer inside",[410,509,510,419,514],{},[165,511,512],{"href":315},[8,513,318],{},[165,515,516],{"href":322},[8,517,325],{},[395,519,520,523],{},[410,521,522],{},"particles carried along a fluid's velocity",[410,524,525],{},[165,526,527],{"href":334},[8,528,337],{},[384,530,532],{"id":531},"example","Example",[355,534,536],{"className":357,"code":535,"language":359,"meta":360,"style":360},"import {defineShader, sim, transformColor} from 'shaders\u002Fstd'\nimport {tgpu, d, agents} from '@coreroot\u002Fgpu\u002Fkit'\nimport {makeCpuValueGetter, readAgentFrame, resolveRenderRes, SIZE_REF_RES} from '@coreroot\u002Fgpu\u002Fporters'\n\nconst {agentSim, renderAgents, torque, field, integrator, agentFrame} = sim.agents\n\nconst MAX_FILINGS = 12288\nconst RES = resolveRenderRes({desktop: 1024, mobile: 768})\nconst OVERSCAN = 0.14\n\n\u002F\u002F The values the torques, the field and the home read each frame.\nconst SimParams = d.struct({\n  colA: d.vec4f, colB: d.vec4f,\n  count: d.f32,\n  dt: d.f32, aspect: d.f32, domainX: d.f32,\n  cursorX: d.f32, cursorY: d.f32, axisX: d.f32, axisY: d.f32,\n  fieldType: d.f32, restMode: d.f32,\n  strength: d.f32, reachSq: d.f32,\n  alignK: d.f32, damping: d.f32, restK: d.f32, pullK: d.f32, homeK: d.f32,\n  omegaRef: d.f32, agitCool: d.f32,\n  gridCols: d.f32, cellW: d.f32, cellH: d.f32, jitter: d.f32,\n  bodyR: d.f32,\n})\n\u002F\u002F Per-agent state (offset from home, angle, spin), excitement, the two canvases, the output.\nconst simLayout = tgpu.bindGroupLayout({\n  agents: {storage: d.arrayOf(d.vec4f, MAX_FILINGS), access: 'mutable'},\n  agit: {storage: d.arrayOf(d.f32, MAX_FILINGS), access: 'mutable'},\n  accumE: {storage: d.arrayOf(d.atomic(d.u32), RES * RES), access: 'mutable'},\n  accumS: {storage: d.arrayOf(d.atomic(d.u32), RES * RES), access: 'mutable'},\n  params: {uniform: SimParams},\n  outTex: {storageTexture: d.textureStorage2d('rgba16float', 'write-only')},\n})\n\nconst filingsInit = agents.makeRestingDirectorInit(simLayout, 'filingsInit')\n\n\u002F\u002F The physics: every filing rests on a jittered grid, samples the magnet at the cursor, and\n\u002F\u002F swings onto its field line, with a weak pull back to its rest angle where the field is faint.\nconst filingsHome = field.jitteredGridHome(simLayout, {overscan: OVERSCAN})\nconst filingsUpdate = integrator.orientation2d(simLayout, {\n  home: filingsHome,\n  fieldAt: field.dipoleOrRadial(simLayout),\n  torques: [torque.alignToField(simLayout), torque.rest(simLayout)],\n  maxOffset: 0.12,\n  name: 'filingsUpdate',\n})\n\n\u002F\u002F The look: slivers drawn along each filing's own angle, colored calm to excited.\nconst filingsRender = renderAgents.orientedWorld(simLayout, {\n  shape: 'streak', res: RES, splatRCap: 14, heading: 'angle', agitation: 'buffer', comet: false, home: filingsHome,\n  ramp: {colorSpace: 2, trails: 'none'},\n  names: {splat: 'filingsSplat', resolve: 'filingsResolve'},\n})\n\n\u002F\u002F MagneticFilings: iron filings that reveal the field lines of a magnet at the cursor.\nexport const MagneticFilings = defineShader({\n  name: 'MagneticFilings',\n  usesPointer: true,\n  props: {\n    colorA: {default: '#85929e', transform: transformColor},\n    colorB: {default: '#ff9d5c', transform: transformColor},\n    count: {default: 5000},\n    strength: {default: 1},\n    reach: {default: 0.35},\n    response: {default: 0.5},\n    size: {default: 1},\n  },\n  ...agentSim\u003Ctypeof SimParams>({\n    layout: simLayout,\n    params: SimParams,\n    maxAgents: MAX_FILINGS,\n    output: {key: 'outTex', name: 'filingsTexture', size: [RES, RES], format: 'rgba16float'},\n    bake: () => ({\n      pipelines: {\n        init: {kernel: filingsInit, threads: 'max'},\n        update: {kernel: filingsUpdate, threads: 'agents'},\n        splat: filingsRender.splat,\n        resolve: filingsRender.resolve,\n      },\n      initStep: 'init',\n      program: ['update', 'splat', 'resolve'],\n    }),\n    frame: (sys, {getCpuValue}) => {\n      const g = makeCpuValueGetter(getCpuValue)\n      \u002F\u002F The magnet's axis follows where the cursor has been travelling.\n      const motionAxis = agentFrame.createMotionAxis({smoothing: 0.1, teleport: 0.25})\n      return (frameParams) => {\n        const {dt, aspect, pointerX, pointerY} = readAgentFrame(frameParams)\n        const domainX = Math.max(aspect, 0.01)\n        const count = sys.resolveCount(g('count', 5000))\n        const {cols, cellW, cellH} = agentFrame.fitJitteredGrid(count, domainX, OVERSCAN)\n        const cursorX = pointerX * aspect\n        const cursorY = pointerY\n        const axis = motionAxis.update(cursorX, cursorY)\n        const reach = g('reach', 0.35)\n        const colA = getCpuValue('colorA') as {x: number; y: number; z: number; w: number} | undefined\n        const colB = getCpuValue('colorB') as {x: number; y: number; z: number; w: number} | undefined\n        sys.writeParams({\n          colA: d.vec4f(colA?.x ?? 0.52, colA?.y ?? 0.57, colA?.z ?? 0.64, colA?.w ?? 1),\n          colB: d.vec4f(colB?.x ?? 1, colB?.y ?? 0.62, colB?.z ?? 0.36, colB?.w ?? 1),\n          count,\n          dt, aspect, domainX,\n          cursorX, cursorY, axisX: axis.x, axisY: axis.y,\n          fieldType: 0, restMode: 0,\n          strength: g('strength', 1), reachSq: reach * reach,\n          alignK: 45, damping: 3 + Math.min(Math.max(g('response', 0.5), 0), 1) * 9,\n          restK: 6, pullK: 0.25, homeK: 2.5,\n          omegaRef: 6, agitCool: 1,\n          gridCols: cols, cellW, cellH, jitter: 0.85,\n          bodyR: Math.min(Math.max(g('size', 1), 0.5), 3) * 1.7 \u002F SIZE_REF_RES,\n        })\n        return sys.frame({count})\n      }\n    },\n    fragment: {output: 'filingsTexture', fallback: 'transparent'},\n  }),\n})\n",[8,537,538,549,562,575,582,625,630,644,673,686,691,698,717,723,729,735,741,747,753,759,765,771,777,782,788,806,830,849,880,906,912,935,940,945,970,975,981,987,1011,1030,1036,1048,1066,1078,1089,1094,1099,1105,1123,1164,1181,1198,1203,1208,1214,1233,1243,1254,1260,1272,1283,1294,1305,1316,1327,1337,1343,1360,1366,1372,1382,1413,1428,1434,1445,1456,1462,1468,1474,1485,1507,1513,1540,1557,1563,1593,1612,1648,1672,1705,1741,1760,1773,1792,1815,1885,1944,1955,2000,2040,2046,2052,2058,2074,2099,2158,2180,2195,2206,2254,2260,2274,2280,2286,2302,2308],{"__ignoreMap":360},[364,539,540,542,545,547],{"class":366,"line":367},[364,541,371],{"class":370},[364,543,544],{"class":374}," {defineShader, sim, transformColor} ",[364,546,378],{"class":370},[364,548,382],{"class":381},[364,550,552,554,557,559],{"class":366,"line":551},2,[364,553,371],{"class":370},[364,555,556],{"class":374}," {tgpu, d, agents} ",[364,558,378],{"class":370},[364,560,561],{"class":381}," '@coreroot\u002Fgpu\u002Fkit'\n",[364,563,565,567,570,572],{"class":366,"line":564},3,[364,566,371],{"class":370},[364,568,569],{"class":374}," {makeCpuValueGetter, readAgentFrame, resolveRenderRes, SIZE_REF_RES} ",[364,571,378],{"class":370},[364,573,574],{"class":381}," '@coreroot\u002Fgpu\u002Fporters'\n",[364,576,578],{"class":366,"line":577},4,[364,579,581],{"emptyLinePlaceholder":580},true,"\n",[364,583,585,588,591,594,596,599,601,603,605,607,609,611,613,616,619,622],{"class":366,"line":584},5,[364,586,587],{"class":370},"const",[364,589,590],{"class":374}," {",[364,592,341],{"class":593},"sDLfK",[364,595,209],{"class":374},[364,597,598],{"class":593},"renderAgents",[364,600,209],{"class":374},[364,602,177],{"class":593},[364,604,209],{"class":374},[364,606,184],{"class":593},[364,608,209],{"class":374},[364,610,162],{"class":593},[364,612,209],{"class":374},[364,614,615],{"class":593},"agentFrame",[364,617,618],{"class":374},"} ",[364,620,621],{"class":370},"=",[364,623,624],{"class":374}," sim.agents\n",[364,626,628],{"class":366,"line":627},6,[364,629,581],{"emptyLinePlaceholder":580},[364,631,633,635,638,641],{"class":366,"line":632},7,[364,634,587],{"class":370},[364,636,637],{"class":593}," MAX_FILINGS",[364,639,640],{"class":370}," =",[364,642,643],{"class":593}," 12288\n",[364,645,647,649,652,654,658,661,664,667,670],{"class":366,"line":646},8,[364,648,587],{"class":370},[364,650,651],{"class":593}," RES",[364,653,640],{"class":370},[364,655,657],{"class":656},"svObZ"," resolveRenderRes",[364,659,660],{"class":374},"({desktop: ",[364,662,663],{"class":593},"1024",[364,665,666],{"class":374},", mobile: ",[364,668,669],{"class":593},"768",[364,671,672],{"class":374},"})\n",[364,674,676,678,681,683],{"class":366,"line":675},9,[364,677,587],{"class":370},[364,679,680],{"class":593}," OVERSCAN",[364,682,640],{"class":370},[364,684,685],{"class":593}," 0.14\n",[364,687,689],{"class":366,"line":688},10,[364,690,581],{"emptyLinePlaceholder":580},[364,692,694],{"class":366,"line":693},11,[364,695,697],{"class":696},"sAwPA","\u002F\u002F The values the torques, the field and the home read each frame.\n",[364,699,701,703,706,708,711,714],{"class":366,"line":700},12,[364,702,587],{"class":370},[364,704,705],{"class":593}," SimParams",[364,707,640],{"class":370},[364,709,710],{"class":374}," d.",[364,712,713],{"class":656},"struct",[364,715,716],{"class":374},"({\n",[364,718,720],{"class":366,"line":719},13,[364,721,722],{"class":374},"  colA: d.vec4f, colB: d.vec4f,\n",[364,724,726],{"class":366,"line":725},14,[364,727,728],{"class":374},"  count: d.f32,\n",[364,730,732],{"class":366,"line":731},15,[364,733,734],{"class":374},"  dt: d.f32, aspect: d.f32, domainX: d.f32,\n",[364,736,738],{"class":366,"line":737},16,[364,739,740],{"class":374},"  cursorX: d.f32, cursorY: d.f32, axisX: d.f32, axisY: d.f32,\n",[364,742,744],{"class":366,"line":743},17,[364,745,746],{"class":374},"  fieldType: d.f32, restMode: d.f32,\n",[364,748,750],{"class":366,"line":749},18,[364,751,752],{"class":374},"  strength: d.f32, reachSq: d.f32,\n",[364,754,756],{"class":366,"line":755},19,[364,757,758],{"class":374},"  alignK: d.f32, damping: d.f32, restK: d.f32, pullK: d.f32, homeK: d.f32,\n",[364,760,762],{"class":366,"line":761},20,[364,763,764],{"class":374},"  omegaRef: d.f32, agitCool: d.f32,\n",[364,766,768],{"class":366,"line":767},21,[364,769,770],{"class":374},"  gridCols: d.f32, cellW: d.f32, cellH: d.f32, jitter: d.f32,\n",[364,772,774],{"class":366,"line":773},22,[364,775,776],{"class":374},"  bodyR: d.f32,\n",[364,778,780],{"class":366,"line":779},23,[364,781,672],{"class":374},[364,783,785],{"class":366,"line":784},24,[364,786,787],{"class":696},"\u002F\u002F Per-agent state (offset from home, angle, spin), excitement, the two canvases, the output.\n",[364,789,791,793,796,798,801,804],{"class":366,"line":790},25,[364,792,587],{"class":370},[364,794,795],{"class":593}," simLayout",[364,797,640],{"class":370},[364,799,800],{"class":374}," tgpu.",[364,802,803],{"class":656},"bindGroupLayout",[364,805,716],{"class":374},[364,807,809,812,815,818,821,824,827],{"class":366,"line":808},26,[364,810,811],{"class":374},"  agents: {storage: d.",[364,813,814],{"class":656},"arrayOf",[364,816,817],{"class":374},"(d.vec4f, ",[364,819,820],{"class":593},"MAX_FILINGS",[364,822,823],{"class":374},"), access: ",[364,825,826],{"class":381},"'mutable'",[364,828,829],{"class":374},"},\n",[364,831,833,836,838,841,843,845,847],{"class":366,"line":832},27,[364,834,835],{"class":374},"  agit: {storage: d.",[364,837,814],{"class":656},[364,839,840],{"class":374},"(d.f32, ",[364,842,820],{"class":593},[364,844,823],{"class":374},[364,846,826],{"class":381},[364,848,829],{"class":374},[364,850,852,855,857,860,863,866,869,872,874,876,878],{"class":366,"line":851},28,[364,853,854],{"class":374},"  accumE: {storage: d.",[364,856,814],{"class":656},[364,858,859],{"class":374},"(d.",[364,861,862],{"class":656},"atomic",[364,864,865],{"class":374},"(d.u32), ",[364,867,868],{"class":593},"RES",[364,870,871],{"class":370}," *",[364,873,651],{"class":593},[364,875,823],{"class":374},[364,877,826],{"class":381},[364,879,829],{"class":374},[364,881,883,886,888,890,892,894,896,898,900,902,904],{"class":366,"line":882},29,[364,884,885],{"class":374},"  accumS: {storage: d.",[364,887,814],{"class":656},[364,889,859],{"class":374},[364,891,862],{"class":656},[364,893,865],{"class":374},[364,895,868],{"class":593},[364,897,871],{"class":370},[364,899,651],{"class":593},[364,901,823],{"class":374},[364,903,826],{"class":381},[364,905,829],{"class":374},[364,907,909],{"class":366,"line":908},30,[364,910,911],{"class":374},"  params: {uniform: SimParams},\n",[364,913,915,918,921,924,927,929,932],{"class":366,"line":914},31,[364,916,917],{"class":374},"  outTex: {storageTexture: d.",[364,919,920],{"class":656},"textureStorage2d",[364,922,923],{"class":374},"(",[364,925,926],{"class":381},"'rgba16float'",[364,928,209],{"class":374},[364,930,931],{"class":381},"'write-only'",[364,933,934],{"class":374},")},\n",[364,936,938],{"class":366,"line":937},32,[364,939,672],{"class":374},[364,941,943],{"class":366,"line":942},33,[364,944,581],{"emptyLinePlaceholder":580},[364,946,948,950,953,955,958,961,964,967],{"class":366,"line":947},34,[364,949,587],{"class":370},[364,951,952],{"class":593}," filingsInit",[364,954,640],{"class":370},[364,956,957],{"class":374}," agents.",[364,959,960],{"class":656},"makeRestingDirectorInit",[364,962,963],{"class":374},"(simLayout, ",[364,965,966],{"class":381},"'filingsInit'",[364,968,969],{"class":374},")\n",[364,971,973],{"class":366,"line":972},35,[364,974,581],{"emptyLinePlaceholder":580},[364,976,978],{"class":366,"line":977},36,[364,979,980],{"class":696},"\u002F\u002F The physics: every filing rests on a jittered grid, samples the magnet at the cursor, and\n",[364,982,984],{"class":366,"line":983},37,[364,985,986],{"class":696},"\u002F\u002F swings onto its field line, with a weak pull back to its rest angle where the field is faint.\n",[364,988,990,992,995,997,1000,1003,1006,1009],{"class":366,"line":989},38,[364,991,587],{"class":370},[364,993,994],{"class":593}," filingsHome",[364,996,640],{"class":370},[364,998,999],{"class":374}," field.",[364,1001,1002],{"class":656},"jitteredGridHome",[364,1004,1005],{"class":374},"(simLayout, {overscan: ",[364,1007,1008],{"class":593},"OVERSCAN",[364,1010,672],{"class":374},[364,1012,1014,1016,1019,1021,1024,1027],{"class":366,"line":1013},39,[364,1015,587],{"class":370},[364,1017,1018],{"class":593}," filingsUpdate",[364,1020,640],{"class":370},[364,1022,1023],{"class":374}," integrator.",[364,1025,1026],{"class":656},"orientation2d",[364,1028,1029],{"class":374},"(simLayout, {\n",[364,1031,1033],{"class":366,"line":1032},40,[364,1034,1035],{"class":374},"  home: filingsHome,\n",[364,1037,1039,1042,1045],{"class":366,"line":1038},41,[364,1040,1041],{"class":374},"  fieldAt: field.",[364,1043,1044],{"class":656},"dipoleOrRadial",[364,1046,1047],{"class":374},"(simLayout),\n",[364,1049,1051,1054,1057,1060,1063],{"class":366,"line":1050},42,[364,1052,1053],{"class":374},"  torques: [torque.",[364,1055,1056],{"class":656},"alignToField",[364,1058,1059],{"class":374},"(simLayout), torque.",[364,1061,1062],{"class":656},"rest",[364,1064,1065],{"class":374},"(simLayout)],\n",[364,1067,1069,1072,1075],{"class":366,"line":1068},43,[364,1070,1071],{"class":374},"  maxOffset: ",[364,1073,1074],{"class":593},"0.12",[364,1076,1077],{"class":374},",\n",[364,1079,1081,1084,1087],{"class":366,"line":1080},44,[364,1082,1083],{"class":374},"  name: ",[364,1085,1086],{"class":381},"'filingsUpdate'",[364,1088,1077],{"class":374},[364,1090,1092],{"class":366,"line":1091},45,[364,1093,672],{"class":374},[364,1095,1097],{"class":366,"line":1096},46,[364,1098,581],{"emptyLinePlaceholder":580},[364,1100,1102],{"class":366,"line":1101},47,[364,1103,1104],{"class":696},"\u002F\u002F The look: slivers drawn along each filing's own angle, colored calm to excited.\n",[364,1106,1108,1110,1113,1115,1118,1121],{"class":366,"line":1107},48,[364,1109,587],{"class":370},[364,1111,1112],{"class":593}," filingsRender",[364,1114,640],{"class":370},[364,1116,1117],{"class":374}," renderAgents.",[364,1119,1120],{"class":656},"orientedWorld",[364,1122,1029],{"class":374},[364,1124,1126,1129,1132,1135,1137,1140,1143,1146,1149,1152,1155,1158,1161],{"class":366,"line":1125},49,[364,1127,1128],{"class":374},"  shape: ",[364,1130,1131],{"class":381},"'streak'",[364,1133,1134],{"class":374},", res: ",[364,1136,868],{"class":593},[364,1138,1139],{"class":374},", splatRCap: ",[364,1141,1142],{"class":593},"14",[364,1144,1145],{"class":374},", heading: ",[364,1147,1148],{"class":381},"'angle'",[364,1150,1151],{"class":374},", agitation: ",[364,1153,1154],{"class":381},"'buffer'",[364,1156,1157],{"class":374},", comet: ",[364,1159,1160],{"class":593},"false",[364,1162,1163],{"class":374},", home: filingsHome,\n",[364,1165,1167,1170,1173,1176,1179],{"class":366,"line":1166},50,[364,1168,1169],{"class":374},"  ramp: {colorSpace: ",[364,1171,1172],{"class":593},"2",[364,1174,1175],{"class":374},", trails: ",[364,1177,1178],{"class":381},"'none'",[364,1180,829],{"class":374},[364,1182,1184,1187,1190,1193,1196],{"class":366,"line":1183},51,[364,1185,1186],{"class":374},"  names: {splat: ",[364,1188,1189],{"class":381},"'filingsSplat'",[364,1191,1192],{"class":374},", resolve: ",[364,1194,1195],{"class":381},"'filingsResolve'",[364,1197,829],{"class":374},[364,1199,1201],{"class":366,"line":1200},52,[364,1202,672],{"class":374},[364,1204,1206],{"class":366,"line":1205},53,[364,1207,581],{"emptyLinePlaceholder":580},[364,1209,1211],{"class":366,"line":1210},54,[364,1212,1213],{"class":696},"\u002F\u002F MagneticFilings: iron filings that reveal the field lines of a magnet at the cursor.\n",[364,1215,1217,1220,1223,1226,1228,1231],{"class":366,"line":1216},55,[364,1218,1219],{"class":370},"export",[364,1221,1222],{"class":370}," const",[364,1224,1225],{"class":593}," MagneticFilings",[364,1227,640],{"class":370},[364,1229,1230],{"class":656}," defineShader",[364,1232,716],{"class":374},[364,1234,1236,1238,1241],{"class":366,"line":1235},56,[364,1237,1083],{"class":374},[364,1239,1240],{"class":381},"'MagneticFilings'",[364,1242,1077],{"class":374},[364,1244,1246,1249,1252],{"class":366,"line":1245},57,[364,1247,1248],{"class":374},"  usesPointer: ",[364,1250,1251],{"class":593},"true",[364,1253,1077],{"class":374},[364,1255,1257],{"class":366,"line":1256},58,[364,1258,1259],{"class":374},"  props: {\n",[364,1261,1263,1266,1269],{"class":366,"line":1262},59,[364,1264,1265],{"class":374},"    colorA: {default: ",[364,1267,1268],{"class":381},"'#85929e'",[364,1270,1271],{"class":374},", transform: transformColor},\n",[364,1273,1275,1278,1281],{"class":366,"line":1274},60,[364,1276,1277],{"class":374},"    colorB: {default: ",[364,1279,1280],{"class":381},"'#ff9d5c'",[364,1282,1271],{"class":374},[364,1284,1286,1289,1292],{"class":366,"line":1285},61,[364,1287,1288],{"class":374},"    count: {default: ",[364,1290,1291],{"class":593},"5000",[364,1293,829],{"class":374},[364,1295,1297,1300,1303],{"class":366,"line":1296},62,[364,1298,1299],{"class":374},"    strength: {default: ",[364,1301,1302],{"class":593},"1",[364,1304,829],{"class":374},[364,1306,1308,1311,1314],{"class":366,"line":1307},63,[364,1309,1310],{"class":374},"    reach: {default: ",[364,1312,1313],{"class":593},"0.35",[364,1315,829],{"class":374},[364,1317,1319,1322,1325],{"class":366,"line":1318},64,[364,1320,1321],{"class":374},"    response: {default: ",[364,1323,1324],{"class":593},"0.5",[364,1326,829],{"class":374},[364,1328,1330,1333,1335],{"class":366,"line":1329},65,[364,1331,1332],{"class":374},"    size: {default: ",[364,1334,1302],{"class":593},[364,1336,829],{"class":374},[364,1338,1340],{"class":366,"line":1339},66,[364,1341,1342],{"class":374},"  },\n",[364,1344,1346,1349,1351,1354,1357],{"class":366,"line":1345},67,[364,1347,1348],{"class":370},"  ...",[364,1350,341],{"class":656},[364,1352,1353],{"class":374},"\u003C",[364,1355,1356],{"class":370},"typeof",[364,1358,1359],{"class":374}," SimParams>({\n",[364,1361,1363],{"class":366,"line":1362},68,[364,1364,1365],{"class":374},"    layout: simLayout,\n",[364,1367,1369],{"class":366,"line":1368},69,[364,1370,1371],{"class":374},"    params: SimParams,\n",[364,1373,1375,1378,1380],{"class":366,"line":1374},70,[364,1376,1377],{"class":374},"    maxAgents: ",[364,1379,820],{"class":593},[364,1381,1077],{"class":374},[364,1383,1385,1388,1391,1394,1397,1400,1402,1404,1406,1409,1411],{"class":366,"line":1384},71,[364,1386,1387],{"class":374},"    output: {key: ",[364,1389,1390],{"class":381},"'outTex'",[364,1392,1393],{"class":374},", name: ",[364,1395,1396],{"class":381},"'filingsTexture'",[364,1398,1399],{"class":374},", size: [",[364,1401,868],{"class":593},[364,1403,209],{"class":374},[364,1405,868],{"class":593},[364,1407,1408],{"class":374},"], format: ",[364,1410,926],{"class":381},[364,1412,829],{"class":374},[364,1414,1416,1419,1422,1425],{"class":366,"line":1415},72,[364,1417,1418],{"class":656},"    bake",[364,1420,1421],{"class":374},": () ",[364,1423,1424],{"class":370},"=>",[364,1426,1427],{"class":374}," ({\n",[364,1429,1431],{"class":366,"line":1430},73,[364,1432,1433],{"class":374},"      pipelines: {\n",[364,1435,1437,1440,1443],{"class":366,"line":1436},74,[364,1438,1439],{"class":374},"        init: {kernel: filingsInit, threads: ",[364,1441,1442],{"class":381},"'max'",[364,1444,829],{"class":374},[364,1446,1448,1451,1454],{"class":366,"line":1447},75,[364,1449,1450],{"class":374},"        update: {kernel: filingsUpdate, threads: ",[364,1452,1453],{"class":381},"'agents'",[364,1455,829],{"class":374},[364,1457,1459],{"class":366,"line":1458},76,[364,1460,1461],{"class":374},"        splat: filingsRender.splat,\n",[364,1463,1465],{"class":366,"line":1464},77,[364,1466,1467],{"class":374},"        resolve: filingsRender.resolve,\n",[364,1469,1471],{"class":366,"line":1470},78,[364,1472,1473],{"class":374},"      },\n",[364,1475,1477,1480,1483],{"class":366,"line":1476},79,[364,1478,1479],{"class":374},"      initStep: ",[364,1481,1482],{"class":381},"'init'",[364,1484,1077],{"class":374},[364,1486,1488,1491,1494,1496,1499,1501,1504],{"class":366,"line":1487},80,[364,1489,1490],{"class":374},"      program: [",[364,1492,1493],{"class":381},"'update'",[364,1495,209],{"class":374},[364,1497,1498],{"class":381},"'splat'",[364,1500,209],{"class":374},[364,1502,1503],{"class":381},"'resolve'",[364,1505,1506],{"class":374},"],\n",[364,1508,1510],{"class":366,"line":1509},81,[364,1511,1512],{"class":374},"    }),\n",[364,1514,1516,1519,1522,1526,1529,1532,1535,1537],{"class":366,"line":1515},82,[364,1517,1518],{"class":656},"    frame",[364,1520,1521],{"class":374},": (",[364,1523,1525],{"class":1524},"s9osk","sys",[364,1527,1528],{"class":374},", {",[364,1530,1531],{"class":1524},"getCpuValue",[364,1533,1534],{"class":374},"}) ",[364,1536,1424],{"class":370},[364,1538,1539],{"class":374}," {\n",[364,1541,1543,1546,1549,1551,1554],{"class":366,"line":1542},83,[364,1544,1545],{"class":370},"      const",[364,1547,1548],{"class":593}," g",[364,1550,640],{"class":370},[364,1552,1553],{"class":656}," makeCpuValueGetter",[364,1555,1556],{"class":374},"(getCpuValue)\n",[364,1558,1560],{"class":366,"line":1559},84,[364,1561,1562],{"class":696},"      \u002F\u002F The magnet's axis follows where the cursor has been travelling.\n",[364,1564,1566,1568,1571,1573,1576,1579,1582,1585,1588,1591],{"class":366,"line":1565},85,[364,1567,1545],{"class":370},[364,1569,1570],{"class":593}," motionAxis",[364,1572,640],{"class":370},[364,1574,1575],{"class":374}," agentFrame.",[364,1577,1578],{"class":656},"createMotionAxis",[364,1580,1581],{"class":374},"({smoothing: ",[364,1583,1584],{"class":593},"0.1",[364,1586,1587],{"class":374},", teleport: ",[364,1589,1590],{"class":593},"0.25",[364,1592,672],{"class":374},[364,1594,1596,1599,1602,1605,1608,1610],{"class":366,"line":1595},86,[364,1597,1598],{"class":370},"      return",[364,1600,1601],{"class":374}," (",[364,1603,1604],{"class":1524},"frameParams",[364,1606,1607],{"class":374},") ",[364,1609,1424],{"class":370},[364,1611,1539],{"class":374},[364,1613,1615,1618,1620,1623,1625,1628,1630,1633,1635,1638,1640,1642,1645],{"class":366,"line":1614},87,[364,1616,1617],{"class":370},"        const",[364,1619,590],{"class":374},[364,1621,1622],{"class":593},"dt",[364,1624,209],{"class":374},[364,1626,1627],{"class":593},"aspect",[364,1629,209],{"class":374},[364,1631,1632],{"class":593},"pointerX",[364,1634,209],{"class":374},[364,1636,1637],{"class":593},"pointerY",[364,1639,618],{"class":374},[364,1641,621],{"class":370},[364,1643,1644],{"class":656}," readAgentFrame",[364,1646,1647],{"class":374},"(frameParams)\n",[364,1649,1651,1653,1656,1658,1661,1664,1667,1670],{"class":366,"line":1650},88,[364,1652,1617],{"class":370},[364,1654,1655],{"class":593}," domainX",[364,1657,640],{"class":370},[364,1659,1660],{"class":374}," Math.",[364,1662,1663],{"class":656},"max",[364,1665,1666],{"class":374},"(aspect, ",[364,1668,1669],{"class":593},"0.01",[364,1671,969],{"class":374},[364,1673,1675,1677,1680,1682,1685,1688,1690,1693,1695,1698,1700,1702],{"class":366,"line":1674},89,[364,1676,1617],{"class":370},[364,1678,1679],{"class":593}," count",[364,1681,640],{"class":370},[364,1683,1684],{"class":374}," sys.",[364,1686,1687],{"class":656},"resolveCount",[364,1689,923],{"class":374},[364,1691,1692],{"class":656},"g",[364,1694,923],{"class":374},[364,1696,1697],{"class":381},"'count'",[364,1699,209],{"class":374},[364,1701,1291],{"class":593},[364,1703,1704],{"class":374},"))\n",[364,1706,1708,1710,1712,1715,1717,1720,1722,1725,1727,1729,1731,1734,1737,1739],{"class":366,"line":1707},90,[364,1709,1617],{"class":370},[364,1711,590],{"class":374},[364,1713,1714],{"class":593},"cols",[364,1716,209],{"class":374},[364,1718,1719],{"class":593},"cellW",[364,1721,209],{"class":374},[364,1723,1724],{"class":593},"cellH",[364,1726,618],{"class":374},[364,1728,621],{"class":370},[364,1730,1575],{"class":374},[364,1732,1733],{"class":656},"fitJitteredGrid",[364,1735,1736],{"class":374},"(count, domainX, ",[364,1738,1008],{"class":593},[364,1740,969],{"class":374},[364,1742,1744,1746,1749,1751,1754,1757],{"class":366,"line":1743},91,[364,1745,1617],{"class":370},[364,1747,1748],{"class":593}," cursorX",[364,1750,640],{"class":370},[364,1752,1753],{"class":374}," pointerX ",[364,1755,1756],{"class":370},"*",[364,1758,1759],{"class":374}," aspect\n",[364,1761,1763,1765,1768,1770],{"class":366,"line":1762},92,[364,1764,1617],{"class":370},[364,1766,1767],{"class":593}," cursorY",[364,1769,640],{"class":370},[364,1771,1772],{"class":374}," pointerY\n",[364,1774,1776,1778,1781,1783,1786,1789],{"class":366,"line":1775},93,[364,1777,1617],{"class":370},[364,1779,1780],{"class":593}," axis",[364,1782,640],{"class":370},[364,1784,1785],{"class":374}," motionAxis.",[364,1787,1788],{"class":656},"update",[364,1790,1791],{"class":374},"(cursorX, cursorY)\n",[364,1793,1795,1797,1800,1802,1804,1806,1809,1811,1813],{"class":366,"line":1794},94,[364,1796,1617],{"class":370},[364,1798,1799],{"class":593}," reach",[364,1801,640],{"class":370},[364,1803,1548],{"class":656},[364,1805,923],{"class":374},[364,1807,1808],{"class":381},"'reach'",[364,1810,209],{"class":374},[364,1812,1313],{"class":593},[364,1814,969],{"class":374},[364,1816,1818,1820,1823,1825,1828,1830,1833,1835,1838,1840,1843,1846,1849,1852,1855,1857,1859,1861,1864,1866,1868,1870,1873,1875,1877,1879,1882],{"class":366,"line":1817},95,[364,1819,1617],{"class":370},[364,1821,1822],{"class":593}," colA",[364,1824,640],{"class":370},[364,1826,1827],{"class":656}," getCpuValue",[364,1829,923],{"class":374},[364,1831,1832],{"class":381},"'colorA'",[364,1834,1607],{"class":374},[364,1836,1837],{"class":370},"as",[364,1839,590],{"class":374},[364,1841,1842],{"class":1524},"x",[364,1844,1845],{"class":370},":",[364,1847,1848],{"class":593}," number",[364,1850,1851],{"class":374},"; ",[364,1853,1854],{"class":1524},"y",[364,1856,1845],{"class":370},[364,1858,1848],{"class":593},[364,1860,1851],{"class":374},[364,1862,1863],{"class":1524},"z",[364,1865,1845],{"class":370},[364,1867,1848],{"class":593},[364,1869,1851],{"class":374},[364,1871,1872],{"class":1524},"w",[364,1874,1845],{"class":370},[364,1876,1848],{"class":593},[364,1878,618],{"class":374},[364,1880,1881],{"class":370},"|",[364,1883,1884],{"class":593}," undefined\n",[364,1886,1888,1890,1893,1895,1897,1899,1902,1904,1906,1908,1910,1912,1914,1916,1918,1920,1922,1924,1926,1928,1930,1932,1934,1936,1938,1940,1942],{"class":366,"line":1887},96,[364,1889,1617],{"class":370},[364,1891,1892],{"class":593}," colB",[364,1894,640],{"class":370},[364,1896,1827],{"class":656},[364,1898,923],{"class":374},[364,1900,1901],{"class":381},"'colorB'",[364,1903,1607],{"class":374},[364,1905,1837],{"class":370},[364,1907,590],{"class":374},[364,1909,1842],{"class":1524},[364,1911,1845],{"class":370},[364,1913,1848],{"class":593},[364,1915,1851],{"class":374},[364,1917,1854],{"class":1524},[364,1919,1845],{"class":370},[364,1921,1848],{"class":593},[364,1923,1851],{"class":374},[364,1925,1863],{"class":1524},[364,1927,1845],{"class":370},[364,1929,1848],{"class":593},[364,1931,1851],{"class":374},[364,1933,1872],{"class":1524},[364,1935,1845],{"class":370},[364,1937,1848],{"class":593},[364,1939,618],{"class":374},[364,1941,1881],{"class":370},[364,1943,1884],{"class":593},[364,1945,1947,1950,1953],{"class":366,"line":1946},97,[364,1948,1949],{"class":374},"        sys.",[364,1951,1952],{"class":656},"writeParams",[364,1954,716],{"class":374},[364,1956,1958,1961,1964,1967,1970,1973,1976,1978,1981,1984,1986,1989,1992,1994,1997],{"class":366,"line":1957},98,[364,1959,1960],{"class":374},"          colA: d.",[364,1962,1963],{"class":656},"vec4f",[364,1965,1966],{"class":374},"(colA?.x ",[364,1968,1969],{"class":370},"??",[364,1971,1972],{"class":593}," 0.52",[364,1974,1975],{"class":374},", colA?.y ",[364,1977,1969],{"class":370},[364,1979,1980],{"class":593}," 0.57",[364,1982,1983],{"class":374},", colA?.z ",[364,1985,1969],{"class":370},[364,1987,1988],{"class":593}," 0.64",[364,1990,1991],{"class":374},", colA?.w ",[364,1993,1969],{"class":370},[364,1995,1996],{"class":593}," 1",[364,1998,1999],{"class":374},"),\n",[364,2001,2003,2006,2008,2011,2013,2015,2018,2020,2023,2026,2028,2031,2034,2036,2038],{"class":366,"line":2002},99,[364,2004,2005],{"class":374},"          colB: d.",[364,2007,1963],{"class":656},[364,2009,2010],{"class":374},"(colB?.x ",[364,2012,1969],{"class":370},[364,2014,1996],{"class":593},[364,2016,2017],{"class":374},", colB?.y ",[364,2019,1969],{"class":370},[364,2021,2022],{"class":593}," 0.62",[364,2024,2025],{"class":374},", colB?.z ",[364,2027,1969],{"class":370},[364,2029,2030],{"class":593}," 0.36",[364,2032,2033],{"class":374},", colB?.w ",[364,2035,1969],{"class":370},[364,2037,1996],{"class":593},[364,2039,1999],{"class":374},[364,2041,2043],{"class":366,"line":2042},100,[364,2044,2045],{"class":374},"          count,\n",[364,2047,2049],{"class":366,"line":2048},101,[364,2050,2051],{"class":374},"          dt, aspect, domainX,\n",[364,2053,2055],{"class":366,"line":2054},102,[364,2056,2057],{"class":374},"          cursorX, cursorY, axisX: axis.x, axisY: axis.y,\n",[364,2059,2061,2064,2067,2070,2072],{"class":366,"line":2060},103,[364,2062,2063],{"class":374},"          fieldType: ",[364,2065,2066],{"class":593},"0",[364,2068,2069],{"class":374},", restMode: ",[364,2071,2066],{"class":593},[364,2073,1077],{"class":374},[364,2075,2077,2080,2082,2084,2087,2089,2091,2094,2096],{"class":366,"line":2076},104,[364,2078,2079],{"class":374},"          strength: ",[364,2081,1692],{"class":656},[364,2083,923],{"class":374},[364,2085,2086],{"class":381},"'strength'",[364,2088,209],{"class":374},[364,2090,1302],{"class":593},[364,2092,2093],{"class":374},"), reachSq: reach ",[364,2095,1756],{"class":370},[364,2097,2098],{"class":374}," reach,\n",[364,2100,2102,2105,2108,2111,2114,2117,2119,2122,2125,2127,2129,2131,2133,2136,2138,2140,2143,2145,2147,2149,2151,2153,2156],{"class":366,"line":2101},105,[364,2103,2104],{"class":374},"          alignK: ",[364,2106,2107],{"class":593},"45",[364,2109,2110],{"class":374},", damping: ",[364,2112,2113],{"class":593},"3",[364,2115,2116],{"class":370}," +",[364,2118,1660],{"class":374},[364,2120,2121],{"class":656},"min",[364,2123,2124],{"class":374},"(Math.",[364,2126,1663],{"class":656},[364,2128,923],{"class":374},[364,2130,1692],{"class":656},[364,2132,923],{"class":374},[364,2134,2135],{"class":381},"'response'",[364,2137,209],{"class":374},[364,2139,1324],{"class":593},[364,2141,2142],{"class":374},"), ",[364,2144,2066],{"class":593},[364,2146,2142],{"class":374},[364,2148,1302],{"class":593},[364,2150,1607],{"class":374},[364,2152,1756],{"class":370},[364,2154,2155],{"class":593}," 9",[364,2157,1077],{"class":374},[364,2159,2161,2164,2167,2170,2172,2175,2178],{"class":366,"line":2160},106,[364,2162,2163],{"class":374},"          restK: ",[364,2165,2166],{"class":593},"6",[364,2168,2169],{"class":374},", pullK: ",[364,2171,1590],{"class":593},[364,2173,2174],{"class":374},", homeK: ",[364,2176,2177],{"class":593},"2.5",[364,2179,1077],{"class":374},[364,2181,2183,2186,2188,2191,2193],{"class":366,"line":2182},107,[364,2184,2185],{"class":374},"          omegaRef: ",[364,2187,2166],{"class":593},[364,2189,2190],{"class":374},", agitCool: ",[364,2192,1302],{"class":593},[364,2194,1077],{"class":374},[364,2196,2198,2201,2204],{"class":366,"line":2197},108,[364,2199,2200],{"class":374},"          gridCols: cols, cellW, cellH, jitter: ",[364,2202,2203],{"class":593},"0.85",[364,2205,1077],{"class":374},[364,2207,2209,2212,2214,2216,2218,2220,2222,2224,2227,2229,2231,2233,2235,2237,2239,2241,2243,2246,2249,2252],{"class":366,"line":2208},109,[364,2210,2211],{"class":374},"          bodyR: Math.",[364,2213,2121],{"class":656},[364,2215,2124],{"class":374},[364,2217,1663],{"class":656},[364,2219,923],{"class":374},[364,2221,1692],{"class":656},[364,2223,923],{"class":374},[364,2225,2226],{"class":381},"'size'",[364,2228,209],{"class":374},[364,2230,1302],{"class":593},[364,2232,2142],{"class":374},[364,2234,1324],{"class":593},[364,2236,2142],{"class":374},[364,2238,2113],{"class":593},[364,2240,1607],{"class":374},[364,2242,1756],{"class":370},[364,2244,2245],{"class":593}," 1.7",[364,2247,2248],{"class":370}," \u002F",[364,2250,2251],{"class":593}," SIZE_REF_RES",[364,2253,1077],{"class":374},[364,2255,2257],{"class":366,"line":2256},110,[364,2258,2259],{"class":374},"        })\n",[364,2261,2263,2266,2268,2271],{"class":366,"line":2262},111,[364,2264,2265],{"class":370},"        return",[364,2267,1684],{"class":374},[364,2269,2270],{"class":656},"frame",[364,2272,2273],{"class":374},"({count})\n",[364,2275,2277],{"class":366,"line":2276},112,[364,2278,2279],{"class":374},"      }\n",[364,2281,2283],{"class":366,"line":2282},113,[364,2284,2285],{"class":374},"    },\n",[364,2287,2289,2292,2294,2297,2300],{"class":366,"line":2288},114,[364,2290,2291],{"class":374},"    fragment: {output: ",[364,2293,1396],{"class":381},[364,2295,2296],{"class":374},", fallback: ",[364,2298,2299],{"class":381},"'transparent'",[364,2301,829],{"class":374},[364,2303,2305],{"class":366,"line":2304},115,[364,2306,2307],{"class":374},"  }),\n",[364,2309,2311],{"class":366,"line":2310},116,[364,2312,672],{"class":374},[384,2314,2316],{"id":2315},"types","Types",[389,2318,2319,2329],{},[392,2320,2321],{},[395,2322,2323,2326],{},[398,2324,2325],{},"Type",[398,2327,2328],{},"What it is",[405,2330,2331,2353,2363,2373,2383,2393,2403,2413,2423,2437,2456,2475,2488,2513,2523,2539,2556],{},[395,2332,2333,2338],{},[410,2334,2335],{},[8,2336,2337],{},"AdvectLayout",[410,2339,2340,2341,2344,2345,2348,2349,2352],{},"What a fluid-carried layout must name: ",[8,2342,2343],{},"agents",", the fluid's velocity texture ",[8,2346,2347],{},"velTex"," and the ",[8,2350,2351],{},"params"," values.",[395,2354,2355,2360],{},[410,2356,2357],{},[8,2358,2359],{},"AgentChannel",[410,2361,2362],{},"One number in 0–1 read out of a color and its alpha: a brightness, a channel, a saturation.",[395,2364,2365,2370],{},[410,2366,2367],{},[8,2368,2369],{},"AgentDrift",[410,2371,2372],{},"A built-in velocity for an agent, from its index alone.",[395,2374,2375,2380],{},[410,2376,2377],{},[8,2378,2379],{},"AgentFieldAt",[410,2381,2382],{},"A sample of a field at a 2D position.",[395,2384,2385,2390],{},[410,2386,2387],{},[8,2388,2389],{},"AgentForce3",[410,2391,2392],{},"A push on a 3D agent, from its position, velocity and per-agent seed.",[395,2394,2395,2400],{},[410,2396,2397],{},[8,2398,2399],{},"AgentHome2",[410,2401,2402],{},"An agent's resting position, from its index.",[395,2404,2405,2410],{},[410,2406,2407],{},[8,2408,2409],{},"AgentSteer2",[410,2411,2412],{},"A steering push on a 2D agent, from its position, velocity and its own top speed.",[395,2414,2415,2420],{},[410,2416,2417],{},[8,2418,2419],{},"AgentTorque",[410,2421,2422],{},"A turn on a turning agent, from the field at its position, its angle and its index.",[395,2424,2425,2430],{},[410,2426,2427],{},[8,2428,2429],{},"DriftLayout",[410,2431,2432,2433,2348,2435,2352],{},"What a drifting-mote layout must name: ",[8,2434,2343],{},[8,2436,2351],{},[395,2438,2439,2444],{},[410,2440,2441],{},[8,2442,2443],{},"FieldSampleValue",[410,2445,2446,2447,209,2450,209,2453,346],{},"A field sample's value: ",[8,2448,2449],{},"rhat",[8,2451,2452],{},"strength",[8,2454,2455],{},"phi",[395,2457,2458,2463],{},[410,2459,2460],{},[8,2461,2462],{},"OrientationLayout",[410,2464,2465,2466,2468,2469,2472,2473,2352],{},"What a turning-agent layout must name: ",[8,2467,2343],{},", the ",[8,2470,2471],{},"agit"," excitement buffer and the ",[8,2474,2351],{},[395,2476,2477,2482],{},[410,2478,2479],{},[8,2480,2481],{},"PressureForce",[410,2483,2484,2485,2487],{},"What ",[8,2486,208],{}," returns: the force, plus the two density-grid steps and the grid's cell count for the program.",[395,2489,2490,2495],{},[410,2491,2492],{},[8,2493,2494],{},"ReliefLayout",[410,2496,2497,2498,209,2501,209,2504,2507,2508,2348,2511,2352],{},"What an image-relief layout must name: ",[8,2499,2500],{},"pos",[8,2502,2503],{},"vel",[8,2505,2506],{},"col",", the child picture ",[8,2509,2510],{},"src",[8,2512,2351],{},[395,2514,2515,2520],{},[410,2516,2517],{},[8,2518,2519],{},"ShapeField3",[410,2521,2522],{},"The signed distance to a shape's surface at a shape-local 3D point, negative inside.",[395,2524,2525,2530],{},[410,2526,2527],{},[8,2528,2529],{},"SteeringLayout",[410,2531,2532,2533,2468,2535,2472,2537,2352],{},"What a flock's layout must name: ",[8,2534,2343],{},[8,2536,2471],{},[8,2538,2351],{},[395,2540,2541,2546],{},[410,2542,2543],{},[8,2544,2545],{},"Vec4StateArray",[410,2547,2548,2549,209,2551,209,2553,2555],{},"A per-agent buffer of four numbers each (",[8,2550,2343],{},[8,2552,2500],{},[8,2554,2503],{},", …).",[395,2557,2558,2563],{},[410,2559,2560],{},[8,2561,2562],{},"VolumeSwarmLayout",[410,2564,2565,2566,209,2568,2468,2570,2573,2574,2352],{},"What a 3D swarm's layout must name: ",[8,2567,2500],{},[8,2569,2503],{},[8,2571,2572],{},"dens"," grid and the ",[8,2575,2351],{},[384,2577,2579],{"id":2578},"words","Words",[2581,2582,2584],"primitive-words",{":words":2583},"[{\"name\":\"integrator\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator\",\"summary\":\"The update step of an agent simulation: one per kind of agent.\"},{\"name\":\"integrator.steering2d\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-steering2d\",\"summary\":\"A flock under summed steering, kept cruising, arcing off the canvas edges.\"},{\"name\":\"integrator.forces3d\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-forces3d\",\"summary\":\"A 3D swarm under summed forces, with drag, a speed limit and a position clamp.\"},{\"name\":\"integrator.orientation2d\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-orientation2d\",\"summary\":\"Agents that turn in place under summed torques and drift a little toward the field.\"},{\"name\":\"integrator.drift2d\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-drift2d\",\"summary\":\"Motes that glide on a built-in drift plus a fading gust, wrapping around the canvas.\"},{\"name\":\"integrator.relief\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-relief\",\"summary\":\"Particles standing on the child's image, rising by a color channel, springing home.\"},{\"name\":\"integrator.advect2d\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator-advect2d\",\"summary\":\"Particles carried by a fluid's velocity texture, easing back to an even spread.\"},{\"name\":\"force\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce\",\"summary\":\"The pushes an agent can feel.\"},{\"name\":\"force.flocking\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-flocking\",\"summary\":\"Separation, alignment and cohesion for a flock, with live weights and radii.\"},{\"name\":\"force.cursorSteer\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorsteer\",\"summary\":\"The cursor on a flock: attract, scatter like a predator, or nothing.\"},{\"name\":\"force.wallTurn\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-wallturn\",\"summary\":\"A soft turn back toward the canvas near an edge, so a flock arcs instead of bouncing.\"},{\"name\":\"force.pressure\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-pressure\",\"summary\":\"Spread a 3D swarm evenly by pushing agents away from crowded cells of a density grid.\"},{\"name\":\"force.containment\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-containment\",\"summary\":\"Keep a 3D swarm inside a shape: a spring at the surface, a pull back from far away, and a drag when the shape rotates.\"},{\"name\":\"force.cursorXY\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorxy\",\"summary\":\"The cursor as a magnet on a 3D swarm, pushing away (or pulling in when the force is negative).\"},{\"name\":\"force.gravity\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-gravity\",\"summary\":\"A constant pull on a 3D swarm in the direction of `params.gravX, gravY`.\"},{\"name\":\"force.turbulence\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-turbulence\",\"summary\":\"A per-agent jitter that keeps a 3D swarm alive, scaled by `params.agitation`.\"},{\"name\":\"force.cursorGust\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorgust\",\"summary\":\"A puff from the cursor on drifting motes, zero while the force slider sits at 0.\"},{\"name\":\"force.cursorInView\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fforce-cursorinview\",\"summary\":\"The cursor on an image relief, applied where each particle appears on screen.\"},{\"name\":\"torque\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque\",\"summary\":\"The turns an agent that spins in place can feel, for `integrator.orientation2d`.\"},{\"name\":\"torque.alignToField\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque-aligntofield\",\"summary\":\"Swing onto the field's line like a compass needle.\"},{\"name\":\"torque.rest\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ftorque-rest\",\"summary\":\"A weak swing back to each agent's rest angle, felt only where the field is faint.\"},{\"name\":\"field\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield\",\"summary\":\"What a turning agent samples at its position: the magnetic field at the cursor, and its resting place on a jittered grid.\"},{\"name\":\"field.dipoleOrRadial\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield-dipoleorradial\",\"summary\":\"The field of a magnet at the cursor: a bar magnet along its travel, or a single pole.\"},{\"name\":\"field.jitteredGridHome\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffield-jitteredgridhome\",\"summary\":\"Each agent's resting position on a jittered grid that runs past the canvas edges.\"},{\"name\":\"drift\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fdrift\",\"summary\":\"A built-in velocity for motes that glide, for `integrator.drift2d`.\"},{\"name\":\"drift.variedHeading\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fdrift-variedheading\",\"summary\":\"One shared heading and speed, each varied a little per mote.\"},{\"name\":\"channel\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel\",\"summary\":\"Which part of the child's color drives a particle: `luminance`, `luminanceInverted`, `red`, `green`, `blue`, `saturation` or `alpha`, each a number in 0–1.\"},{\"name\":\"FieldSample\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffieldsample\",\"summary\":\"What a field sample carries: the direction away from the source (`rhat`), the `strength`, and the line angle `phi` in radians.\"},{\"name\":\"channel.alpha\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-alpha\",\"summary\":\"The pixel's alpha.\"},{\"name\":\"channel.blue\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-blue\",\"summary\":\"The blue channel.\"},{\"name\":\"channel.byMode\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-bymode\",\"summary\":\"The same seven by a select prop's number: 0 luminance, 1 inverted, 2 red, 3 green, 4 blue, 5 saturation, 6 alpha.\"},{\"name\":\"channel.green\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-green\",\"summary\":\"The green channel.\"},{\"name\":\"channel.luminance\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-luminance\",\"summary\":\"The color's brightness, 0 black to 1 white.\"},{\"name\":\"channel.luminanceInverted\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-luminanceinverted\",\"summary\":\"One minus the brightness, so dark areas rise.\"},{\"name\":\"channel.red\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-red\",\"summary\":\"The red channel.\"},{\"name\":\"channel.saturation\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-saturation\",\"summary\":\"How colorful the pixel is, 0 grey to 1 pure.\"}]",[2585,2586,2587,2596,2603,2610,2617,2624,2631,2638,2645,2652,2659,2666,2673,2680,2687,2697,2707,2714,2721,2730,2737,2744,2751,2758,2765,2774,2781,2811,2829,2838,2847,2856,2865,2874,2883,2892],"ul",{},[2588,2589,2590,2595],"li",{},[165,2591,2593],{"href":2592},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fintegrator",[8,2594,162],{}," — The update step of an agent simulation: one per kind of agent.",[2588,2597,2598,2602],{},[165,2599,2600],{"href":237},[8,2601,240],{}," — A flock under summed steering, kept cruising, arcing off the canvas edges.",[2588,2604,2605,2609],{},[165,2606,2607],{"href":198},[8,2608,201],{}," — A 3D swarm under summed forces, with drag, a speed limit and a position clamp.",[2588,2611,2612,2616],{},[165,2613,2614],{"href":262},[8,2615,265],{}," — Agents that turn in place under summed torques and drift a little toward the field.",[2588,2618,2619,2623],{},[165,2620,2621],{"href":296},[8,2622,299],{}," — Motes that glide on a built-in drift plus a fading gust, wrapping around the canvas.",[2588,2625,2626,2630],{},[165,2627,2628],{"href":315},[8,2629,318],{}," — Particles standing on the child's image, rising by a color channel, springing home.",[2588,2632,2633,2637],{},[165,2634,2635],{"href":334},[8,2636,337],{}," — Particles carried by a fluid's velocity texture, easing back to an even spread.",[2588,2639,2640,2644],{},[165,2641,2642],{"href":167},[8,2643,170],{}," — The pushes an agent can feel.",[2588,2646,2647,2651],{},[165,2648,2649],{"href":244},[8,2650,247],{}," — Separation, alignment and cohesion for a flock, with live weights and radii.",[2588,2653,2654,2658],{},[165,2655,2656],{"href":250},[8,2657,253],{}," — The cursor on a flock: attract, scatter like a predator, or nothing.",[2588,2660,2661,2665],{},[165,2662,2663],{"href":256},[8,2664,259],{}," — A soft turn back toward the canvas near an edge, so a flock arcs instead of bouncing.",[2588,2667,2668,2672],{},[165,2669,2670],{"href":205},[8,2671,208],{}," — Spread a 3D swarm evenly by pushing agents away from crowded cells of a density grid.",[2588,2674,2675,2679],{},[165,2676,2677],{"href":212},[8,2678,215],{}," — Keep a 3D swarm inside a shape: a spring at the surface, a pull back from far away, and a drag when the shape rotates.",[2588,2681,2682,2686],{},[165,2683,2684],{"href":218},[8,2685,221],{}," — The cursor as a magnet on a 3D swarm, pushing away (or pulling in when the force is negative).",[2588,2688,2689,2693,2694,346],{},[165,2690,2691],{"href":224},[8,2692,227],{}," — A constant pull on a 3D swarm in the direction of ",[8,2695,2696],{},"params.gravX, gravY",[2588,2698,2699,2703,2704,346],{},[165,2700,2701],{"href":230},[8,2702,233],{}," — A per-agent jitter that keeps a 3D swarm alive, scaled by ",[8,2705,2706],{},"params.agitation",[2588,2708,2709,2713],{},[165,2710,2711],{"href":309},[8,2712,312],{}," — A puff from the cursor on drifting motes, zero while the force slider sits at 0.",[2588,2715,2716,2720],{},[165,2717,2718],{"href":328},[8,2719,331],{}," — The cursor on an image relief, applied where each particle appears on screen.",[2588,2722,2723,2727,2728,346],{},[165,2724,2725],{"href":174},[8,2726,177],{}," — The turns an agent that spins in place can feel, for ",[8,2729,265],{},[2588,2731,2732,2736],{},[165,2733,2734],{"href":269},[8,2735,272],{}," — Swing onto the field's line like a compass needle.",[2588,2738,2739,2743],{},[165,2740,2741],{"href":275},[8,2742,278],{}," — A weak swing back to each agent's rest angle, felt only where the field is faint.",[2588,2745,2746,2750],{},[165,2747,2748],{"href":181},[8,2749,184],{}," — What a turning agent samples at its position: the magnetic field at the cursor, and its resting place on a jittered grid.",[2588,2752,2753,2757],{},[165,2754,2755],{"href":282},[8,2756,285],{}," — The field of a magnet at the cursor: a bar magnet along its travel, or a single pole.",[2588,2759,2760,2764],{},[165,2761,2762],{"href":289},[8,2763,292],{}," — Each agent's resting position on a jittered grid that runs past the canvas edges.",[2588,2766,2767,2771,2772,346],{},[165,2768,2769],{"href":188},[8,2770,191],{}," — A built-in velocity for motes that glide, for ",[8,2773,299],{},[2588,2775,2776,2780],{},[165,2777,2778],{"href":303},[8,2779,306],{}," — One shared heading and speed, each varied a little per mote.",[2588,2782,2783,2787,2788,209,2791,209,2794,209,2797,209,2800,209,2803,2806,2807,2810],{},[165,2784,2785],{"href":322},[8,2786,325],{}," — Which part of the child's color drives a particle: ",[8,2789,2790],{},"luminance",[8,2792,2793],{},"luminanceInverted",[8,2795,2796],{},"red",[8,2798,2799],{},"green",[8,2801,2802],{},"blue",[8,2804,2805],{},"saturation"," or ",[8,2808,2809],{},"alpha",", each a number in 0–1.",[2588,2812,2813,2819,2820,2822,2823,2825,2826,2828],{},[165,2814,2816],{"href":2815},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Ffieldsample",[8,2817,2818],{},"FieldSample"," — What a field sample carries: the direction away from the source (",[8,2821,2449],{},"), the ",[8,2824,2452],{},", and the line angle ",[8,2827,2455],{}," in radians.",[2588,2830,2831,2837],{},[165,2832,2834],{"href":2833},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-alpha",[8,2835,2836],{},"channel.alpha"," — The pixel's alpha.",[2588,2839,2840,2846],{},[165,2841,2843],{"href":2842},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-blue",[8,2844,2845],{},"channel.blue"," — The blue channel.",[2588,2848,2849,2855],{},[165,2850,2852],{"href":2851},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-bymode",[8,2853,2854],{},"channel.byMode"," — The same seven by a select prop's number: 0 luminance, 1 inverted, 2 red, 3 green, 4 blue, 5 saturation, 6 alpha.",[2588,2857,2858,2864],{},[165,2859,2861],{"href":2860},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-green",[8,2862,2863],{},"channel.green"," — The green channel.",[2588,2866,2867,2873],{},[165,2868,2870],{"href":2869},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-luminance",[8,2871,2872],{},"channel.luminance"," — The color's brightness, 0 black to 1 white.",[2588,2875,2876,2882],{},[165,2877,2879],{"href":2878},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-luminanceinverted",[8,2880,2881],{},"channel.luminanceInverted"," — One minus the brightness, so dark areas rise.",[2588,2884,2885,2891],{},[165,2886,2888],{"href":2887},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-red",[8,2889,2890],{},"channel.red"," — The red channel.",[2588,2893,2894,2900],{},[165,2895,2897],{"href":2896},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces\u002Fchannel-saturation",[8,2898,2899],{},"channel.saturation"," — How colorful the pixel is, 0 grey to 1 pure.",[2902,2903,2904],"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 .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}",{"title":360,"searchDepth":551,"depth":551,"links":2906},[2907,2908,2909,2910],{"id":386,"depth":551,"text":387},{"id":531,"depth":551,"text":532},{"id":2315,"depth":551,"text":2316},{"id":2578,"depth":551,"text":2579},"sim.agentForces","sim-agentforces","What pushes, turns and carries each agent.","https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fedit\u002Fmain\u002Fpackages\u002Fcore\u002Fdocs\u002Fstd\u002Fsim.agentForces.md","md","simulation","Simulation",{},"\u002Fdocs\u002Fprimitives\u002Fsim-agentforces",{"title":147,"description":2913},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fsim\u002FagentForces.ts","docs\u002Fprimitives\u002F41.sim-agentforces\u002Findex","zd_zJP5fZW0OYZ0EAJsstY_XmnT0rf20rtCjEfix1vA"]