[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-vercel-labs-ralph-gpu":3,"mdc--p33mf8-key":35,"related-org-vercel-labs-ralph-gpu":3656,"related-repo-vercel-labs-ralph-gpu":3828},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":33,"mdContent":34},"ralph-gpu","build real-time graphics with WebGPU","Minimal WebGPU shader library for creative coding and real-time graphics. Provides fullscreen passes, particles, compute shaders, render targets, and ping-pong buffers with automatic uniform bindings and global time\u002Fresolution tracking.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"vercel-labs","Vercel Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fvercel-labs.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Graphics","graphics",{"name":20,"slug":21,"type":15},"Creative","creative",{"name":23,"slug":24,"type":15},"WebGPU","webgpu",57,"https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fralph-gpu","2026-07-17T06:04:07.978341",null,7,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":28},[],"https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fralph-gpu\u002Ftree\u002FHEAD\u002FSKILLS\u002Fralph-gpu","---\nname: ralph-gpu\ndescription: Minimal WebGPU shader library for creative coding and real-time graphics. Provides fullscreen passes, particles, compute shaders, render targets, and ping-pong buffers with automatic uniform bindings and global time\u002Fresolution tracking.\n---\n\n# ralph-gpu\n\nA minimal WebGPU shader library for creative coding and real-time graphics.\n\n## When to Use\n\nUse this skill when:\n- Building WebGPU shader effects, creative coding projects, or real-time graphics\n- Working with fullscreen shader passes, particle systems, or compute shaders\n- Need guidance on ralph-gpu API, render targets, or WGSL shader patterns\n- Implementing GPU-accelerated simulations or visual effects\n\n## Installation\n\n```bash\nnpm install ralph-gpu\n# For TypeScript support:\nnpm install -D @webgpu\u002Ftypes\n```\n\n## Core Concepts\n\n| Concept | Description |\n|---------|-------------|\n| `gpu` | Module entry point for initialization |\n| `ctx` | GPU context — manages state and rendering |\n| `pass` | Fullscreen shader (fragment only, uses internal quad) |\n| `material` | Shader with custom vertex code (particles, geometry) |\n| `target` | Render target (offscreen texture) |\n| `pingPong` | Pair of render targets for iterative effects |\n| `compute` | Compute shader for GPU-parallel computation |\n| `storage` | Storage buffer for large data (particles, simulations) |\n| `sampler` | Custom texture sampler with explicit filtering\u002Fwrapping |\n| `texture` | Load images, canvases, video, or raw data as GPU textures |\n\n## Auto-Injected Globals\n\nEvery shader automatically has access to these uniforms:\n\n```wgsl\nstruct Globals {\n  resolution: vec2f,  \u002F\u002F Current render target size in pixels\n  time: f32,          \u002F\u002F Seconds since init\n  deltaTime: f32,     \u002F\u002F Seconds since last frame\n  frame: u32,         \u002F\u002F Frame count since init\n  aspect: f32,        \u002F\u002F resolution.x \u002F resolution.y\n}\n@group(0) @binding(0) var\u003Cuniform> globals: Globals;\n```\n\n## Quick Start\n\n```tsx\nimport { gpu } from \"ralph-gpu\";\n\n\u002F\u002F Check support\nif (!gpu.isSupported()) {\n  console.error(\"WebGPU not supported\");\n  return;\n}\n\n\u002F\u002F Initialize\nconst ctx = await gpu.init(canvas, { autoResize: true });\n\n\u002F\u002F Create fullscreen shader pass\nconst pass = ctx.pass(\\`\n  @fragment\n  fn main(@builtin(position) pos: vec4f) -> @location(0) vec4f {\n    let uv = pos.xy \u002F globals.resolution;\n    return vec4f(uv, sin(globals.time) * 0.5 + 0.5, 1.0);\n  }\n\\`);\n\n\u002F\u002F Render loop\nfunction frame() {\n  pass.draw();\n  requestAnimationFrame(frame);\n}\nframe();\n```\n\n## API Overview\n\n### Context Creation\n\n```tsx\nconst ctx = await gpu.init(canvas, {\n  autoResize?: boolean,  \u002F\u002F Auto-handle canvas sizing (default: false)\n  dpr?: number,          \u002F\u002F Device pixel ratio\n  debug?: boolean,       \u002F\u002F Enable debug mode\n  events?: {             \u002F\u002F Event tracking\n    enabled: boolean,\n    types?: string[],\n    historySize?: number\n  }\n});\n```\n\n### Fullscreen Passes\n\n```tsx\n\u002F\u002F Simple mode (auto-generated bindings)\nconst pass = ctx.pass(wgslCode, {\n  uTexture: someTarget,\n  color: [1, 0, 0],\n  intensity: 0.5\n});\npass.set(\"intensity\", 0.8);  \u002F\u002F Update uniforms\n\n\u002F\u002F Manual mode (explicit bindings)\nconst pass = ctx.pass(wgslCode, {\n  uniforms: {\n    myValue: { value: 1.0 }\n  }\n});\npass.uniforms.myValue.value = 2.0;\n```\n\n### Render Targets\n\n```tsx\nconst target = ctx.target(512, 512, {\n  format?: \"rgba8unorm\" | \"rgba16float\" | \"r16float\" | \"rg16float\",\n  filter?: \"linear\" | \"nearest\",\n  wrap?: \"clamp\" | \"repeat\" | \"mirror\",\n  usage?: \"render\" | \"storage\" | \"both\"\n});\n\nctx.setTarget(target);  \u002F\u002F Render to target\nctx.setTarget(null);    \u002F\u002F Render to screen\n```\n\n### Ping-Pong Buffers\n\n```tsx\nconst simulation = ctx.pingPong(128, 128, {\n  format: \"rgba16float\"\n});\n\n\u002F\u002F In render loop:\nuniforms.inputTex.value = simulation.read;\nctx.setTarget(simulation.write);\nprocessPass.draw();\nsimulation.swap();\n```\n\n### Particles (Instanced Quads)\n\n```tsx\nconst particles = ctx.particles(1000, {\n  shader: wgslCode,      \u002F\u002F Full vertex + fragment shader\n  bufferSize: 1000 * 16, \u002F\u002F Buffer size in bytes\n  blend: \"additive\"\n});\n\nparticles.write(particleData);  \u002F\u002F Float32Array\nparticles.draw();\n```\n\n### Compute Shaders\n\n```tsx\nconst compute = ctx.compute(\\`\n  @compute @workgroup_size(64)\n  fn main(@builtin(global_invocation_id) id: vec3\u003Cu32>) {\n    \u002F\u002F GPU computation\n  }\n\\`);\n\ncompute.storage(\"buffer\", storageBuffer);\ncompute.dispatch(Math.ceil(count \u002F 64));\n```\n\n### Storage Buffers\n\n```tsx\nconst buffer = ctx.storage(byteSize);\nbuffer.write(new Float32Array([...]));\n\n\u002F\u002F Bind to shader\npass.storage(\"dataBuffer\", buffer);\n```\n\n### Texture Loading\n\n```tsx\n\u002F\u002F From URL (async)\nconst tex = await ctx.texture(\"image.png\");\n\n\u002F\u002F From canvas \u002F video \u002F ImageBitmap (sync)\nconst tex = ctx.texture(canvas);\n\n\u002F\u002F From raw pixel data (sync)\nconst tex = ctx.texture(new Uint8Array(data), { width: 256, height: 256 });\n\n\u002F\u002F Options\nconst tex = await ctx.texture(\"photo.jpg\", {\n  filter: \"linear\",     \u002F\u002F \"linear\" | \"nearest\"\n  wrap: \"repeat\",       \u002F\u002F \"clamp\" | \"repeat\" | \"mirror\"\n  format: \"rgba8unorm\", \u002F\u002F GPU texture format\n  flipY: true,          \u002F\u002F Flip vertically on load\n});\n\n\u002F\u002F Bind to shader (manual mode)\nconst pass = ctx.pass(shader, {\n  uniforms: {\n    uTex: { value: tex },  \u002F\u002F .texture and .sampler auto-bound\n  }\n});\n\n\u002F\u002F Update from live source (canvas, video)\ntex.update(videoElement);\n\n\u002F\u002F Clean up\ntex.dispose();\n```\n\n## Important Notes\n\n**WGSL Alignment**: `array\u003Cvec3f>` has 16-byte stride, not 12. Always pad to 16 bytes:\n```tsx\n\u002F\u002F Correct: [x, y, z, 0.0] per element\nconst buffer = ctx.storage(count * 16);\n```\n\n**Particle Rendering**: Use instanced quads, not point-list (WebGPU points are always 1px)\n\n**Texture References**: Target references stay valid after resize — no need to update uniforms\n\n**Screen Readback**: Cannot read pixels from screen, only from render targets\n\n## Examples\n\nFull working examples extracted from the docs app:\n\n- [Simple Gradient](.\u002Fexamples\u002Fgradient.md) — The simplest possible shader — map UV coordinates to colors. This creates a gradient from black (bottom-left) to cyan (top-right).\n- [Animated Wave](.\u002Fexamples\u002Fwave.md) — A glowing sine wave with custom uniforms. The wave animates over time using globals.time.\n- [Time-Based Color Cycling](.\u002Fexamples\u002Fcolor-cycle.md) — A hypnotic pattern that cycles through colors over time. Combines time, distance, and angle for a mesmerizing effect.\n- [Raymarching Sphere](.\u002Fexamples\u002Fraymarching.md) — A basic 3D sphere rendered using raymarching. This demonstrates how to create 3D shapes and lighting entirely within a fragment shader.\n- [Perlin-style Noise](.\u002Fexamples\u002Fnoise.md) — Layered fractional Brownian motion (fBm) noise. This technique is fundamental for generating procedural textures, terrain, and natural-looking patterns.\n- [Metaballs](.\u002Fexamples\u002Fmetaballs.md) — Organic-looking \"blobs\" that merge together based on an implicit surface. This effect uses a distance-based field and a threshold to create smooth blending.\n- [Mandelbrot Set](.\u002Fexamples\u002Ffractal.md) — The classic complex number fractal. This shader computes the set by iterating z = z² + c and mapping the escape time to vibrant colors.\n- [Alien Planet](.\u002Fexamples\u002Falien-planet.md) — A procedurally generated alien world with atmospheric scattering and an orbiting moon. Uses raymarching with fBm noise for terrain detail.\n- [Fluid Simulation](.\u002Fexamples\u002Ffluid.md) — Real-time Navier-Stokes fluid simulation using ping-pong buffers, vorticity confinement, and pressure projection.\n- [Triangle Particles](.\u002Fexamples\u002Ftriangle-particles.md) — GPU-driven particle system with SDF-based physics. 30,000 particles spawn on triangle edges and flow along a signed distance field with chromatic aberration postprocessing.\n\n## Resources\n\n- [GitHub Repository](https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fralph-gpu)\n- [API Documentation](https:\u002F\u002Fralph-gpu.dev\u002Fdocs)\n- [WebGPU Specification](https:\u002F\u002Fgpuweb.github.io\u002Fgpuweb\u002F)\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,47,53,60,65,90,96,163,169,367,373,378,455,461,917,923,930,1161,1167,1554,1560,1959,1965,2210,2216,2431,2437,2545,2551,2704,2710,3366,3372,3391,3455,3465,3475,3485,3491,3496,3610,3616,3650],{"type":41,"tag":42,"props":43,"children":44},"element","h1",{"id":4},[45],{"type":46,"value":4},"text",{"type":41,"tag":48,"props":49,"children":50},"p",{},[51],{"type":46,"value":52},"A minimal WebGPU shader library for creative coding and real-time graphics.",{"type":41,"tag":54,"props":55,"children":57},"h2",{"id":56},"when-to-use",[58],{"type":46,"value":59},"When to Use",{"type":41,"tag":48,"props":61,"children":62},{},[63],{"type":46,"value":64},"Use this skill when:",{"type":41,"tag":66,"props":67,"children":68},"ul",{},[69,75,80,85],{"type":41,"tag":70,"props":71,"children":72},"li",{},[73],{"type":46,"value":74},"Building WebGPU shader effects, creative coding projects, or real-time graphics",{"type":41,"tag":70,"props":76,"children":77},{},[78],{"type":46,"value":79},"Working with fullscreen shader passes, particle systems, or compute shaders",{"type":41,"tag":70,"props":81,"children":82},{},[83],{"type":46,"value":84},"Need guidance on ralph-gpu API, render targets, or WGSL shader patterns",{"type":41,"tag":70,"props":86,"children":87},{},[88],{"type":46,"value":89},"Implementing GPU-accelerated simulations or visual effects",{"type":41,"tag":54,"props":91,"children":93},{"id":92},"installation",[94],{"type":46,"value":95},"Installation",{"type":41,"tag":97,"props":98,"children":103},"pre",{"className":99,"code":100,"language":101,"meta":102,"style":102},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install ralph-gpu\n# For TypeScript support:\nnpm install -D @webgpu\u002Ftypes\n","bash","",[104],{"type":41,"tag":105,"props":106,"children":107},"code",{"__ignoreMap":102},[108,131,141],{"type":41,"tag":109,"props":110,"children":113},"span",{"class":111,"line":112},"line",1,[114,120,126],{"type":41,"tag":109,"props":115,"children":117},{"style":116},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[118],{"type":46,"value":119},"npm",{"type":41,"tag":109,"props":121,"children":123},{"style":122},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[124],{"type":46,"value":125}," install",{"type":41,"tag":109,"props":127,"children":128},{"style":122},[129],{"type":46,"value":130}," ralph-gpu\n",{"type":41,"tag":109,"props":132,"children":134},{"class":111,"line":133},2,[135],{"type":41,"tag":109,"props":136,"children":138},{"style":137},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[139],{"type":46,"value":140},"# For TypeScript support:\n",{"type":41,"tag":109,"props":142,"children":144},{"class":111,"line":143},3,[145,149,153,158],{"type":41,"tag":109,"props":146,"children":147},{"style":116},[148],{"type":46,"value":119},{"type":41,"tag":109,"props":150,"children":151},{"style":122},[152],{"type":46,"value":125},{"type":41,"tag":109,"props":154,"children":155},{"style":122},[156],{"type":46,"value":157}," -D",{"type":41,"tag":109,"props":159,"children":160},{"style":122},[161],{"type":46,"value":162}," @webgpu\u002Ftypes\n",{"type":41,"tag":54,"props":164,"children":166},{"id":165},"core-concepts",[167],{"type":46,"value":168},"Core Concepts",{"type":41,"tag":170,"props":171,"children":172},"table",{},[173,192],{"type":41,"tag":174,"props":175,"children":176},"thead",{},[177],{"type":41,"tag":178,"props":179,"children":180},"tr",{},[181,187],{"type":41,"tag":182,"props":183,"children":184},"th",{},[185],{"type":46,"value":186},"Concept",{"type":41,"tag":182,"props":188,"children":189},{},[190],{"type":46,"value":191},"Description",{"type":41,"tag":193,"props":194,"children":195},"tbody",{},[196,214,231,248,265,282,299,316,333,350],{"type":41,"tag":178,"props":197,"children":198},{},[199,209],{"type":41,"tag":200,"props":201,"children":202},"td",{},[203],{"type":41,"tag":105,"props":204,"children":206},{"className":205},[],[207],{"type":46,"value":208},"gpu",{"type":41,"tag":200,"props":210,"children":211},{},[212],{"type":46,"value":213},"Module entry point for initialization",{"type":41,"tag":178,"props":215,"children":216},{},[217,226],{"type":41,"tag":200,"props":218,"children":219},{},[220],{"type":41,"tag":105,"props":221,"children":223},{"className":222},[],[224],{"type":46,"value":225},"ctx",{"type":41,"tag":200,"props":227,"children":228},{},[229],{"type":46,"value":230},"GPU context — manages state and rendering",{"type":41,"tag":178,"props":232,"children":233},{},[234,243],{"type":41,"tag":200,"props":235,"children":236},{},[237],{"type":41,"tag":105,"props":238,"children":240},{"className":239},[],[241],{"type":46,"value":242},"pass",{"type":41,"tag":200,"props":244,"children":245},{},[246],{"type":46,"value":247},"Fullscreen shader (fragment only, uses internal quad)",{"type":41,"tag":178,"props":249,"children":250},{},[251,260],{"type":41,"tag":200,"props":252,"children":253},{},[254],{"type":41,"tag":105,"props":255,"children":257},{"className":256},[],[258],{"type":46,"value":259},"material",{"type":41,"tag":200,"props":261,"children":262},{},[263],{"type":46,"value":264},"Shader with custom vertex code (particles, geometry)",{"type":41,"tag":178,"props":266,"children":267},{},[268,277],{"type":41,"tag":200,"props":269,"children":270},{},[271],{"type":41,"tag":105,"props":272,"children":274},{"className":273},[],[275],{"type":46,"value":276},"target",{"type":41,"tag":200,"props":278,"children":279},{},[280],{"type":46,"value":281},"Render target (offscreen texture)",{"type":41,"tag":178,"props":283,"children":284},{},[285,294],{"type":41,"tag":200,"props":286,"children":287},{},[288],{"type":41,"tag":105,"props":289,"children":291},{"className":290},[],[292],{"type":46,"value":293},"pingPong",{"type":41,"tag":200,"props":295,"children":296},{},[297],{"type":46,"value":298},"Pair of render targets for iterative effects",{"type":41,"tag":178,"props":300,"children":301},{},[302,311],{"type":41,"tag":200,"props":303,"children":304},{},[305],{"type":41,"tag":105,"props":306,"children":308},{"className":307},[],[309],{"type":46,"value":310},"compute",{"type":41,"tag":200,"props":312,"children":313},{},[314],{"type":46,"value":315},"Compute shader for GPU-parallel computation",{"type":41,"tag":178,"props":317,"children":318},{},[319,328],{"type":41,"tag":200,"props":320,"children":321},{},[322],{"type":41,"tag":105,"props":323,"children":325},{"className":324},[],[326],{"type":46,"value":327},"storage",{"type":41,"tag":200,"props":329,"children":330},{},[331],{"type":46,"value":332},"Storage buffer for large data (particles, simulations)",{"type":41,"tag":178,"props":334,"children":335},{},[336,345],{"type":41,"tag":200,"props":337,"children":338},{},[339],{"type":41,"tag":105,"props":340,"children":342},{"className":341},[],[343],{"type":46,"value":344},"sampler",{"type":41,"tag":200,"props":346,"children":347},{},[348],{"type":46,"value":349},"Custom texture sampler with explicit filtering\u002Fwrapping",{"type":41,"tag":178,"props":351,"children":352},{},[353,362],{"type":41,"tag":200,"props":354,"children":355},{},[356],{"type":41,"tag":105,"props":357,"children":359},{"className":358},[],[360],{"type":46,"value":361},"texture",{"type":41,"tag":200,"props":363,"children":364},{},[365],{"type":46,"value":366},"Load images, canvases, video, or raw data as GPU textures",{"type":41,"tag":54,"props":368,"children":370},{"id":369},"auto-injected-globals",[371],{"type":46,"value":372},"Auto-Injected Globals",{"type":41,"tag":48,"props":374,"children":375},{},[376],{"type":46,"value":377},"Every shader automatically has access to these uniforms:",{"type":41,"tag":97,"props":379,"children":383},{"className":380,"code":381,"language":382,"meta":102,"style":102},"language-wgsl shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","struct Globals {\n  resolution: vec2f,  \u002F\u002F Current render target size in pixels\n  time: f32,          \u002F\u002F Seconds since init\n  deltaTime: f32,     \u002F\u002F Seconds since last frame\n  frame: u32,         \u002F\u002F Frame count since init\n  aspect: f32,        \u002F\u002F resolution.x \u002F resolution.y\n}\n@group(0) @binding(0) var\u003Cuniform> globals: Globals;\n","wgsl",[384],{"type":41,"tag":105,"props":385,"children":386},{"__ignoreMap":102},[387,395,403,411,420,429,438,446],{"type":41,"tag":109,"props":388,"children":389},{"class":111,"line":112},[390],{"type":41,"tag":109,"props":391,"children":392},{},[393],{"type":46,"value":394},"struct Globals {\n",{"type":41,"tag":109,"props":396,"children":397},{"class":111,"line":133},[398],{"type":41,"tag":109,"props":399,"children":400},{},[401],{"type":46,"value":402},"  resolution: vec2f,  \u002F\u002F Current render target size in pixels\n",{"type":41,"tag":109,"props":404,"children":405},{"class":111,"line":143},[406],{"type":41,"tag":109,"props":407,"children":408},{},[409],{"type":46,"value":410},"  time: f32,          \u002F\u002F Seconds since init\n",{"type":41,"tag":109,"props":412,"children":414},{"class":111,"line":413},4,[415],{"type":41,"tag":109,"props":416,"children":417},{},[418],{"type":46,"value":419},"  deltaTime: f32,     \u002F\u002F Seconds since last frame\n",{"type":41,"tag":109,"props":421,"children":423},{"class":111,"line":422},5,[424],{"type":41,"tag":109,"props":425,"children":426},{},[427],{"type":46,"value":428},"  frame: u32,         \u002F\u002F Frame count since init\n",{"type":41,"tag":109,"props":430,"children":432},{"class":111,"line":431},6,[433],{"type":41,"tag":109,"props":434,"children":435},{},[436],{"type":46,"value":437},"  aspect: f32,        \u002F\u002F resolution.x \u002F resolution.y\n",{"type":41,"tag":109,"props":439,"children":440},{"class":111,"line":29},[441],{"type":41,"tag":109,"props":442,"children":443},{},[444],{"type":46,"value":445},"}\n",{"type":41,"tag":109,"props":447,"children":449},{"class":111,"line":448},8,[450],{"type":41,"tag":109,"props":451,"children":452},{},[453],{"type":46,"value":454},"@group(0) @binding(0) var\u003Cuniform> globals: Globals;\n",{"type":41,"tag":54,"props":456,"children":458},{"id":457},"quick-start",[459],{"type":46,"value":460},"Quick Start",{"type":41,"tag":97,"props":462,"children":466},{"className":463,"code":464,"language":465,"meta":102,"style":102},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { gpu } from \"ralph-gpu\";\n\n\u002F\u002F Check support\nif (!gpu.isSupported()) {\n  console.error(\"WebGPU not supported\");\n  return;\n}\n\n\u002F\u002F Initialize\nconst ctx = await gpu.init(canvas, { autoResize: true });\n\n\u002F\u002F Create fullscreen shader pass\nconst pass = ctx.pass(\\`\n  @fragment\n  fn main(@builtin(position) pos: vec4f) -> @location(0) vec4f {\n    let uv = pos.xy \u002F globals.resolution;\n    return vec4f(uv, sin(globals.time) * 0.5 + 0.5, 1.0);\n  }\n\\`);\n\n\u002F\u002F Render loop\nfunction frame() {\n  pass.draw();\n  requestAnimationFrame(frame);\n}\nframe();\n","tsx",[467],{"type":41,"tag":105,"props":468,"children":469},{"__ignoreMap":102},[470,520,529,537,580,625,637,644,651,660,740,748,757,797,806,815,824,833,842,856,864,873,882,891,900,908],{"type":41,"tag":109,"props":471,"children":472},{"class":111,"line":112},[473,479,485,491,496,501,506,510,515],{"type":41,"tag":109,"props":474,"children":476},{"style":475},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[477],{"type":46,"value":478},"import",{"type":41,"tag":109,"props":480,"children":482},{"style":481},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[483],{"type":46,"value":484}," {",{"type":41,"tag":109,"props":486,"children":488},{"style":487},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[489],{"type":46,"value":490}," gpu",{"type":41,"tag":109,"props":492,"children":493},{"style":481},[494],{"type":46,"value":495}," }",{"type":41,"tag":109,"props":497,"children":498},{"style":475},[499],{"type":46,"value":500}," from",{"type":41,"tag":109,"props":502,"children":503},{"style":481},[504],{"type":46,"value":505}," \"",{"type":41,"tag":109,"props":507,"children":508},{"style":122},[509],{"type":46,"value":4},{"type":41,"tag":109,"props":511,"children":512},{"style":481},[513],{"type":46,"value":514},"\"",{"type":41,"tag":109,"props":516,"children":517},{"style":481},[518],{"type":46,"value":519},";\n",{"type":41,"tag":109,"props":521,"children":522},{"class":111,"line":133},[523],{"type":41,"tag":109,"props":524,"children":526},{"emptyLinePlaceholder":525},true,[527],{"type":46,"value":528},"\n",{"type":41,"tag":109,"props":530,"children":531},{"class":111,"line":143},[532],{"type":41,"tag":109,"props":533,"children":534},{"style":137},[535],{"type":46,"value":536},"\u002F\u002F Check support\n",{"type":41,"tag":109,"props":538,"children":539},{"class":111,"line":413},[540,545,550,555,559,564,570,575],{"type":41,"tag":109,"props":541,"children":542},{"style":475},[543],{"type":46,"value":544},"if",{"type":41,"tag":109,"props":546,"children":547},{"style":487},[548],{"type":46,"value":549}," (",{"type":41,"tag":109,"props":551,"children":552},{"style":481},[553],{"type":46,"value":554},"!",{"type":41,"tag":109,"props":556,"children":557},{"style":487},[558],{"type":46,"value":208},{"type":41,"tag":109,"props":560,"children":561},{"style":481},[562],{"type":46,"value":563},".",{"type":41,"tag":109,"props":565,"children":567},{"style":566},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[568],{"type":46,"value":569},"isSupported",{"type":41,"tag":109,"props":571,"children":572},{"style":487},[573],{"type":46,"value":574},"()) ",{"type":41,"tag":109,"props":576,"children":577},{"style":481},[578],{"type":46,"value":579},"{\n",{"type":41,"tag":109,"props":581,"children":582},{"class":111,"line":422},[583,588,592,597,603,607,612,616,621],{"type":41,"tag":109,"props":584,"children":585},{"style":487},[586],{"type":46,"value":587},"  console",{"type":41,"tag":109,"props":589,"children":590},{"style":481},[591],{"type":46,"value":563},{"type":41,"tag":109,"props":593,"children":594},{"style":566},[595],{"type":46,"value":596},"error",{"type":41,"tag":109,"props":598,"children":600},{"style":599},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[601],{"type":46,"value":602},"(",{"type":41,"tag":109,"props":604,"children":605},{"style":481},[606],{"type":46,"value":514},{"type":41,"tag":109,"props":608,"children":609},{"style":122},[610],{"type":46,"value":611},"WebGPU not supported",{"type":41,"tag":109,"props":613,"children":614},{"style":481},[615],{"type":46,"value":514},{"type":41,"tag":109,"props":617,"children":618},{"style":599},[619],{"type":46,"value":620},")",{"type":41,"tag":109,"props":622,"children":623},{"style":481},[624],{"type":46,"value":519},{"type":41,"tag":109,"props":626,"children":627},{"class":111,"line":431},[628,633],{"type":41,"tag":109,"props":629,"children":630},{"style":475},[631],{"type":46,"value":632},"  return",{"type":41,"tag":109,"props":634,"children":635},{"style":481},[636],{"type":46,"value":519},{"type":41,"tag":109,"props":638,"children":639},{"class":111,"line":29},[640],{"type":41,"tag":109,"props":641,"children":642},{"style":481},[643],{"type":46,"value":445},{"type":41,"tag":109,"props":645,"children":646},{"class":111,"line":448},[647],{"type":41,"tag":109,"props":648,"children":649},{"emptyLinePlaceholder":525},[650],{"type":46,"value":528},{"type":41,"tag":109,"props":652,"children":654},{"class":111,"line":653},9,[655],{"type":41,"tag":109,"props":656,"children":657},{"style":137},[658],{"type":46,"value":659},"\u002F\u002F Initialize\n",{"type":41,"tag":109,"props":661,"children":663},{"class":111,"line":662},10,[664,670,675,680,685,689,693,698,703,708,712,717,722,728,732,736],{"type":41,"tag":109,"props":665,"children":667},{"style":666},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[668],{"type":46,"value":669},"const",{"type":41,"tag":109,"props":671,"children":672},{"style":487},[673],{"type":46,"value":674}," ctx ",{"type":41,"tag":109,"props":676,"children":677},{"style":481},[678],{"type":46,"value":679},"=",{"type":41,"tag":109,"props":681,"children":682},{"style":475},[683],{"type":46,"value":684}," await",{"type":41,"tag":109,"props":686,"children":687},{"style":487},[688],{"type":46,"value":490},{"type":41,"tag":109,"props":690,"children":691},{"style":481},[692],{"type":46,"value":563},{"type":41,"tag":109,"props":694,"children":695},{"style":566},[696],{"type":46,"value":697},"init",{"type":41,"tag":109,"props":699,"children":700},{"style":487},[701],{"type":46,"value":702},"(canvas",{"type":41,"tag":109,"props":704,"children":705},{"style":481},[706],{"type":46,"value":707},",",{"type":41,"tag":109,"props":709,"children":710},{"style":481},[711],{"type":46,"value":484},{"type":41,"tag":109,"props":713,"children":714},{"style":599},[715],{"type":46,"value":716}," autoResize",{"type":41,"tag":109,"props":718,"children":719},{"style":481},[720],{"type":46,"value":721},":",{"type":41,"tag":109,"props":723,"children":725},{"style":724},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[726],{"type":46,"value":727}," true",{"type":41,"tag":109,"props":729,"children":730},{"style":481},[731],{"type":46,"value":495},{"type":41,"tag":109,"props":733,"children":734},{"style":487},[735],{"type":46,"value":620},{"type":41,"tag":109,"props":737,"children":738},{"style":481},[739],{"type":46,"value":519},{"type":41,"tag":109,"props":741,"children":743},{"class":111,"line":742},11,[744],{"type":41,"tag":109,"props":745,"children":746},{"emptyLinePlaceholder":525},[747],{"type":46,"value":528},{"type":41,"tag":109,"props":749,"children":751},{"class":111,"line":750},12,[752],{"type":41,"tag":109,"props":753,"children":754},{"style":137},[755],{"type":46,"value":756},"\u002F\u002F Create fullscreen shader pass\n",{"type":41,"tag":109,"props":758,"children":760},{"class":111,"line":759},13,[761,765,770,774,779,783,787,792],{"type":41,"tag":109,"props":762,"children":763},{"style":666},[764],{"type":46,"value":669},{"type":41,"tag":109,"props":766,"children":767},{"style":487},[768],{"type":46,"value":769}," pass ",{"type":41,"tag":109,"props":771,"children":772},{"style":481},[773],{"type":46,"value":679},{"type":41,"tag":109,"props":775,"children":776},{"style":487},[777],{"type":46,"value":778}," ctx",{"type":41,"tag":109,"props":780,"children":781},{"style":481},[782],{"type":46,"value":563},{"type":41,"tag":109,"props":784,"children":785},{"style":566},[786],{"type":46,"value":242},{"type":41,"tag":109,"props":788,"children":789},{"style":487},[790],{"type":46,"value":791},"(\\",{"type":41,"tag":109,"props":793,"children":794},{"style":481},[795],{"type":46,"value":796},"`\n",{"type":41,"tag":109,"props":798,"children":800},{"class":111,"line":799},14,[801],{"type":41,"tag":109,"props":802,"children":803},{"style":122},[804],{"type":46,"value":805},"  @fragment\n",{"type":41,"tag":109,"props":807,"children":809},{"class":111,"line":808},15,[810],{"type":41,"tag":109,"props":811,"children":812},{"style":122},[813],{"type":46,"value":814},"  fn main(@builtin(position) pos: vec4f) -> @location(0) vec4f {\n",{"type":41,"tag":109,"props":816,"children":818},{"class":111,"line":817},16,[819],{"type":41,"tag":109,"props":820,"children":821},{"style":122},[822],{"type":46,"value":823},"    let uv = pos.xy \u002F globals.resolution;\n",{"type":41,"tag":109,"props":825,"children":827},{"class":111,"line":826},17,[828],{"type":41,"tag":109,"props":829,"children":830},{"style":122},[831],{"type":46,"value":832},"    return vec4f(uv, sin(globals.time) * 0.5 + 0.5, 1.0);\n",{"type":41,"tag":109,"props":834,"children":836},{"class":111,"line":835},18,[837],{"type":41,"tag":109,"props":838,"children":839},{"style":122},[840],{"type":46,"value":841},"  }\n",{"type":41,"tag":109,"props":843,"children":845},{"class":111,"line":844},19,[846,851],{"type":41,"tag":109,"props":847,"children":848},{"style":487},[849],{"type":46,"value":850},"\\`",{"type":41,"tag":109,"props":852,"children":853},{"style":122},[854],{"type":46,"value":855},");\n",{"type":41,"tag":109,"props":857,"children":859},{"class":111,"line":858},20,[860],{"type":41,"tag":109,"props":861,"children":862},{"emptyLinePlaceholder":525},[863],{"type":46,"value":528},{"type":41,"tag":109,"props":865,"children":867},{"class":111,"line":866},21,[868],{"type":41,"tag":109,"props":869,"children":870},{"style":122},[871],{"type":46,"value":872},"\u002F\u002F Render loop\n",{"type":41,"tag":109,"props":874,"children":876},{"class":111,"line":875},22,[877],{"type":41,"tag":109,"props":878,"children":879},{"style":122},[880],{"type":46,"value":881},"function frame() {\n",{"type":41,"tag":109,"props":883,"children":885},{"class":111,"line":884},23,[886],{"type":41,"tag":109,"props":887,"children":888},{"style":122},[889],{"type":46,"value":890},"  pass.draw();\n",{"type":41,"tag":109,"props":892,"children":894},{"class":111,"line":893},24,[895],{"type":41,"tag":109,"props":896,"children":897},{"style":122},[898],{"type":46,"value":899},"  requestAnimationFrame(frame);\n",{"type":41,"tag":109,"props":901,"children":903},{"class":111,"line":902},25,[904],{"type":41,"tag":109,"props":905,"children":906},{"style":122},[907],{"type":46,"value":445},{"type":41,"tag":109,"props":909,"children":911},{"class":111,"line":910},26,[912],{"type":41,"tag":109,"props":913,"children":914},{"style":122},[915],{"type":46,"value":916},"frame();\n",{"type":41,"tag":54,"props":918,"children":920},{"id":919},"api-overview",[921],{"type":46,"value":922},"API Overview",{"type":41,"tag":924,"props":925,"children":927},"h3",{"id":926},"context-creation",[928],{"type":46,"value":929},"Context Creation",{"type":41,"tag":97,"props":931,"children":933},{"className":463,"code":932,"language":465,"meta":102,"style":102},"const ctx = await gpu.init(canvas, {\n  autoResize?: boolean,  \u002F\u002F Auto-handle canvas sizing (default: false)\n  dpr?: number,          \u002F\u002F Device pixel ratio\n  debug?: boolean,       \u002F\u002F Enable debug mode\n  events?: {             \u002F\u002F Event tracking\n    enabled: boolean,\n    types?: string[],\n    historySize?: number\n  }\n});\n",[934],{"type":41,"tag":105,"props":935,"children":936},{"__ignoreMap":102},[937,981,1007,1033,1058,1079,1100,1121,1138,1145],{"type":41,"tag":109,"props":938,"children":939},{"class":111,"line":112},[940,944,948,952,956,960,964,968,972,976],{"type":41,"tag":109,"props":941,"children":942},{"style":666},[943],{"type":46,"value":669},{"type":41,"tag":109,"props":945,"children":946},{"style":487},[947],{"type":46,"value":674},{"type":41,"tag":109,"props":949,"children":950},{"style":481},[951],{"type":46,"value":679},{"type":41,"tag":109,"props":953,"children":954},{"style":475},[955],{"type":46,"value":684},{"type":41,"tag":109,"props":957,"children":958},{"style":487},[959],{"type":46,"value":490},{"type":41,"tag":109,"props":961,"children":962},{"style":481},[963],{"type":46,"value":563},{"type":41,"tag":109,"props":965,"children":966},{"style":566},[967],{"type":46,"value":697},{"type":41,"tag":109,"props":969,"children":970},{"style":487},[971],{"type":46,"value":702},{"type":41,"tag":109,"props":973,"children":974},{"style":481},[975],{"type":46,"value":707},{"type":41,"tag":109,"props":977,"children":978},{"style":481},[979],{"type":46,"value":980}," {\n",{"type":41,"tag":109,"props":982,"children":983},{"class":111,"line":133},[984,989,993,998,1002],{"type":41,"tag":109,"props":985,"children":986},{"style":487},[987],{"type":46,"value":988},"  autoResize?",{"type":41,"tag":109,"props":990,"children":991},{"style":481},[992],{"type":46,"value":721},{"type":41,"tag":109,"props":994,"children":995},{"style":487},[996],{"type":46,"value":997}," boolean",{"type":41,"tag":109,"props":999,"children":1000},{"style":481},[1001],{"type":46,"value":707},{"type":41,"tag":109,"props":1003,"children":1004},{"style":137},[1005],{"type":46,"value":1006},"  \u002F\u002F Auto-handle canvas sizing (default: false)\n",{"type":41,"tag":109,"props":1008,"children":1009},{"class":111,"line":143},[1010,1015,1019,1024,1028],{"type":41,"tag":109,"props":1011,"children":1012},{"style":487},[1013],{"type":46,"value":1014},"  dpr?",{"type":41,"tag":109,"props":1016,"children":1017},{"style":481},[1018],{"type":46,"value":721},{"type":41,"tag":109,"props":1020,"children":1021},{"style":487},[1022],{"type":46,"value":1023}," number",{"type":41,"tag":109,"props":1025,"children":1026},{"style":481},[1027],{"type":46,"value":707},{"type":41,"tag":109,"props":1029,"children":1030},{"style":137},[1031],{"type":46,"value":1032},"          \u002F\u002F Device pixel ratio\n",{"type":41,"tag":109,"props":1034,"children":1035},{"class":111,"line":413},[1036,1041,1045,1049,1053],{"type":41,"tag":109,"props":1037,"children":1038},{"style":487},[1039],{"type":46,"value":1040},"  debug?",{"type":41,"tag":109,"props":1042,"children":1043},{"style":481},[1044],{"type":46,"value":721},{"type":41,"tag":109,"props":1046,"children":1047},{"style":487},[1048],{"type":46,"value":997},{"type":41,"tag":109,"props":1050,"children":1051},{"style":481},[1052],{"type":46,"value":707},{"type":41,"tag":109,"props":1054,"children":1055},{"style":137},[1056],{"type":46,"value":1057},"       \u002F\u002F Enable debug mode\n",{"type":41,"tag":109,"props":1059,"children":1060},{"class":111,"line":422},[1061,1066,1070,1074],{"type":41,"tag":109,"props":1062,"children":1063},{"style":487},[1064],{"type":46,"value":1065},"  events?",{"type":41,"tag":109,"props":1067,"children":1068},{"style":481},[1069],{"type":46,"value":721},{"type":41,"tag":109,"props":1071,"children":1072},{"style":481},[1073],{"type":46,"value":484},{"type":41,"tag":109,"props":1075,"children":1076},{"style":137},[1077],{"type":46,"value":1078},"             \u002F\u002F Event tracking\n",{"type":41,"tag":109,"props":1080,"children":1081},{"class":111,"line":431},[1082,1087,1091,1095],{"type":41,"tag":109,"props":1083,"children":1084},{"style":599},[1085],{"type":46,"value":1086},"    enabled",{"type":41,"tag":109,"props":1088,"children":1089},{"style":481},[1090],{"type":46,"value":721},{"type":41,"tag":109,"props":1092,"children":1093},{"style":487},[1094],{"type":46,"value":997},{"type":41,"tag":109,"props":1096,"children":1097},{"style":481},[1098],{"type":46,"value":1099},",\n",{"type":41,"tag":109,"props":1101,"children":1102},{"class":111,"line":29},[1103,1108,1112,1117],{"type":41,"tag":109,"props":1104,"children":1105},{"style":487},[1106],{"type":46,"value":1107},"    types?",{"type":41,"tag":109,"props":1109,"children":1110},{"style":481},[1111],{"type":46,"value":721},{"type":41,"tag":109,"props":1113,"children":1114},{"style":487},[1115],{"type":46,"value":1116}," string[]",{"type":41,"tag":109,"props":1118,"children":1119},{"style":481},[1120],{"type":46,"value":1099},{"type":41,"tag":109,"props":1122,"children":1123},{"class":111,"line":448},[1124,1129,1133],{"type":41,"tag":109,"props":1125,"children":1126},{"style":487},[1127],{"type":46,"value":1128},"    historySize?",{"type":41,"tag":109,"props":1130,"children":1131},{"style":481},[1132],{"type":46,"value":721},{"type":41,"tag":109,"props":1134,"children":1135},{"style":487},[1136],{"type":46,"value":1137}," number\n",{"type":41,"tag":109,"props":1139,"children":1140},{"class":111,"line":653},[1141],{"type":41,"tag":109,"props":1142,"children":1143},{"style":481},[1144],{"type":46,"value":841},{"type":41,"tag":109,"props":1146,"children":1147},{"class":111,"line":662},[1148,1153,1157],{"type":41,"tag":109,"props":1149,"children":1150},{"style":481},[1151],{"type":46,"value":1152},"}",{"type":41,"tag":109,"props":1154,"children":1155},{"style":487},[1156],{"type":46,"value":620},{"type":41,"tag":109,"props":1158,"children":1159},{"style":481},[1160],{"type":46,"value":519},{"type":41,"tag":924,"props":1162,"children":1164},{"id":1163},"fullscreen-passes",[1165],{"type":46,"value":1166},"Fullscreen Passes",{"type":41,"tag":97,"props":1168,"children":1170},{"className":463,"code":1169,"language":465,"meta":102,"style":102},"\u002F\u002F Simple mode (auto-generated bindings)\nconst pass = ctx.pass(wgslCode, {\n  uTexture: someTarget,\n  color: [1, 0, 0],\n  intensity: 0.5\n});\npass.set(\"intensity\", 0.8);  \u002F\u002F Update uniforms\n\n\u002F\u002F Manual mode (explicit bindings)\nconst pass = ctx.pass(wgslCode, {\n  uniforms: {\n    myValue: { value: 1.0 }\n  }\n});\npass.uniforms.myValue.value = 2.0;\n",[1171],{"type":41,"tag":105,"props":1172,"children":1173},{"__ignoreMap":102},[1174,1182,1222,1243,1292,1309,1324,1380,1387,1395,1434,1450,1485,1492,1507],{"type":41,"tag":109,"props":1175,"children":1176},{"class":111,"line":112},[1177],{"type":41,"tag":109,"props":1178,"children":1179},{"style":137},[1180],{"type":46,"value":1181},"\u002F\u002F Simple mode (auto-generated bindings)\n",{"type":41,"tag":109,"props":1183,"children":1184},{"class":111,"line":133},[1185,1189,1193,1197,1201,1205,1209,1214,1218],{"type":41,"tag":109,"props":1186,"children":1187},{"style":666},[1188],{"type":46,"value":669},{"type":41,"tag":109,"props":1190,"children":1191},{"style":487},[1192],{"type":46,"value":769},{"type":41,"tag":109,"props":1194,"children":1195},{"style":481},[1196],{"type":46,"value":679},{"type":41,"tag":109,"props":1198,"children":1199},{"style":487},[1200],{"type":46,"value":778},{"type":41,"tag":109,"props":1202,"children":1203},{"style":481},[1204],{"type":46,"value":563},{"type":41,"tag":109,"props":1206,"children":1207},{"style":566},[1208],{"type":46,"value":242},{"type":41,"tag":109,"props":1210,"children":1211},{"style":487},[1212],{"type":46,"value":1213},"(wgslCode",{"type":41,"tag":109,"props":1215,"children":1216},{"style":481},[1217],{"type":46,"value":707},{"type":41,"tag":109,"props":1219,"children":1220},{"style":481},[1221],{"type":46,"value":980},{"type":41,"tag":109,"props":1223,"children":1224},{"class":111,"line":143},[1225,1230,1234,1239],{"type":41,"tag":109,"props":1226,"children":1227},{"style":599},[1228],{"type":46,"value":1229},"  uTexture",{"type":41,"tag":109,"props":1231,"children":1232},{"style":481},[1233],{"type":46,"value":721},{"type":41,"tag":109,"props":1235,"children":1236},{"style":487},[1237],{"type":46,"value":1238}," someTarget",{"type":41,"tag":109,"props":1240,"children":1241},{"style":481},[1242],{"type":46,"value":1099},{"type":41,"tag":109,"props":1244,"children":1245},{"class":111,"line":413},[1246,1251,1255,1260,1266,1270,1275,1279,1283,1288],{"type":41,"tag":109,"props":1247,"children":1248},{"style":599},[1249],{"type":46,"value":1250},"  color",{"type":41,"tag":109,"props":1252,"children":1253},{"style":481},[1254],{"type":46,"value":721},{"type":41,"tag":109,"props":1256,"children":1257},{"style":487},[1258],{"type":46,"value":1259}," [",{"type":41,"tag":109,"props":1261,"children":1263},{"style":1262},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1264],{"type":46,"value":1265},"1",{"type":41,"tag":109,"props":1267,"children":1268},{"style":481},[1269],{"type":46,"value":707},{"type":41,"tag":109,"props":1271,"children":1272},{"style":1262},[1273],{"type":46,"value":1274}," 0",{"type":41,"tag":109,"props":1276,"children":1277},{"style":481},[1278],{"type":46,"value":707},{"type":41,"tag":109,"props":1280,"children":1281},{"style":1262},[1282],{"type":46,"value":1274},{"type":41,"tag":109,"props":1284,"children":1285},{"style":487},[1286],{"type":46,"value":1287},"]",{"type":41,"tag":109,"props":1289,"children":1290},{"style":481},[1291],{"type":46,"value":1099},{"type":41,"tag":109,"props":1293,"children":1294},{"class":111,"line":422},[1295,1300,1304],{"type":41,"tag":109,"props":1296,"children":1297},{"style":599},[1298],{"type":46,"value":1299},"  intensity",{"type":41,"tag":109,"props":1301,"children":1302},{"style":481},[1303],{"type":46,"value":721},{"type":41,"tag":109,"props":1305,"children":1306},{"style":1262},[1307],{"type":46,"value":1308}," 0.5\n",{"type":41,"tag":109,"props":1310,"children":1311},{"class":111,"line":431},[1312,1316,1320],{"type":41,"tag":109,"props":1313,"children":1314},{"style":481},[1315],{"type":46,"value":1152},{"type":41,"tag":109,"props":1317,"children":1318},{"style":487},[1319],{"type":46,"value":620},{"type":41,"tag":109,"props":1321,"children":1322},{"style":481},[1323],{"type":46,"value":519},{"type":41,"tag":109,"props":1325,"children":1326},{"class":111,"line":29},[1327,1331,1335,1340,1344,1348,1353,1357,1361,1366,1370,1375],{"type":41,"tag":109,"props":1328,"children":1329},{"style":487},[1330],{"type":46,"value":242},{"type":41,"tag":109,"props":1332,"children":1333},{"style":481},[1334],{"type":46,"value":563},{"type":41,"tag":109,"props":1336,"children":1337},{"style":566},[1338],{"type":46,"value":1339},"set",{"type":41,"tag":109,"props":1341,"children":1342},{"style":487},[1343],{"type":46,"value":602},{"type":41,"tag":109,"props":1345,"children":1346},{"style":481},[1347],{"type":46,"value":514},{"type":41,"tag":109,"props":1349,"children":1350},{"style":122},[1351],{"type":46,"value":1352},"intensity",{"type":41,"tag":109,"props":1354,"children":1355},{"style":481},[1356],{"type":46,"value":514},{"type":41,"tag":109,"props":1358,"children":1359},{"style":481},[1360],{"type":46,"value":707},{"type":41,"tag":109,"props":1362,"children":1363},{"style":1262},[1364],{"type":46,"value":1365}," 0.8",{"type":41,"tag":109,"props":1367,"children":1368},{"style":487},[1369],{"type":46,"value":620},{"type":41,"tag":109,"props":1371,"children":1372},{"style":481},[1373],{"type":46,"value":1374},";",{"type":41,"tag":109,"props":1376,"children":1377},{"style":137},[1378],{"type":46,"value":1379},"  \u002F\u002F Update uniforms\n",{"type":41,"tag":109,"props":1381,"children":1382},{"class":111,"line":448},[1383],{"type":41,"tag":109,"props":1384,"children":1385},{"emptyLinePlaceholder":525},[1386],{"type":46,"value":528},{"type":41,"tag":109,"props":1388,"children":1389},{"class":111,"line":653},[1390],{"type":41,"tag":109,"props":1391,"children":1392},{"style":137},[1393],{"type":46,"value":1394},"\u002F\u002F Manual mode (explicit bindings)\n",{"type":41,"tag":109,"props":1396,"children":1397},{"class":111,"line":662},[1398,1402,1406,1410,1414,1418,1422,1426,1430],{"type":41,"tag":109,"props":1399,"children":1400},{"style":666},[1401],{"type":46,"value":669},{"type":41,"tag":109,"props":1403,"children":1404},{"style":487},[1405],{"type":46,"value":769},{"type":41,"tag":109,"props":1407,"children":1408},{"style":481},[1409],{"type":46,"value":679},{"type":41,"tag":109,"props":1411,"children":1412},{"style":487},[1413],{"type":46,"value":778},{"type":41,"tag":109,"props":1415,"children":1416},{"style":481},[1417],{"type":46,"value":563},{"type":41,"tag":109,"props":1419,"children":1420},{"style":566},[1421],{"type":46,"value":242},{"type":41,"tag":109,"props":1423,"children":1424},{"style":487},[1425],{"type":46,"value":1213},{"type":41,"tag":109,"props":1427,"children":1428},{"style":481},[1429],{"type":46,"value":707},{"type":41,"tag":109,"props":1431,"children":1432},{"style":481},[1433],{"type":46,"value":980},{"type":41,"tag":109,"props":1435,"children":1436},{"class":111,"line":742},[1437,1442,1446],{"type":41,"tag":109,"props":1438,"children":1439},{"style":599},[1440],{"type":46,"value":1441},"  uniforms",{"type":41,"tag":109,"props":1443,"children":1444},{"style":481},[1445],{"type":46,"value":721},{"type":41,"tag":109,"props":1447,"children":1448},{"style":481},[1449],{"type":46,"value":980},{"type":41,"tag":109,"props":1451,"children":1452},{"class":111,"line":750},[1453,1458,1462,1466,1471,1475,1480],{"type":41,"tag":109,"props":1454,"children":1455},{"style":599},[1456],{"type":46,"value":1457},"    myValue",{"type":41,"tag":109,"props":1459,"children":1460},{"style":481},[1461],{"type":46,"value":721},{"type":41,"tag":109,"props":1463,"children":1464},{"style":481},[1465],{"type":46,"value":484},{"type":41,"tag":109,"props":1467,"children":1468},{"style":599},[1469],{"type":46,"value":1470}," value",{"type":41,"tag":109,"props":1472,"children":1473},{"style":481},[1474],{"type":46,"value":721},{"type":41,"tag":109,"props":1476,"children":1477},{"style":1262},[1478],{"type":46,"value":1479}," 1.0",{"type":41,"tag":109,"props":1481,"children":1482},{"style":481},[1483],{"type":46,"value":1484}," }\n",{"type":41,"tag":109,"props":1486,"children":1487},{"class":111,"line":759},[1488],{"type":41,"tag":109,"props":1489,"children":1490},{"style":481},[1491],{"type":46,"value":841},{"type":41,"tag":109,"props":1493,"children":1494},{"class":111,"line":799},[1495,1499,1503],{"type":41,"tag":109,"props":1496,"children":1497},{"style":481},[1498],{"type":46,"value":1152},{"type":41,"tag":109,"props":1500,"children":1501},{"style":487},[1502],{"type":46,"value":620},{"type":41,"tag":109,"props":1504,"children":1505},{"style":481},[1506],{"type":46,"value":519},{"type":41,"tag":109,"props":1508,"children":1509},{"class":111,"line":808},[1510,1514,1518,1523,1527,1532,1536,1541,1545,1550],{"type":41,"tag":109,"props":1511,"children":1512},{"style":487},[1513],{"type":46,"value":242},{"type":41,"tag":109,"props":1515,"children":1516},{"style":481},[1517],{"type":46,"value":563},{"type":41,"tag":109,"props":1519,"children":1520},{"style":487},[1521],{"type":46,"value":1522},"uniforms",{"type":41,"tag":109,"props":1524,"children":1525},{"style":481},[1526],{"type":46,"value":563},{"type":41,"tag":109,"props":1528,"children":1529},{"style":487},[1530],{"type":46,"value":1531},"myValue",{"type":41,"tag":109,"props":1533,"children":1534},{"style":481},[1535],{"type":46,"value":563},{"type":41,"tag":109,"props":1537,"children":1538},{"style":487},[1539],{"type":46,"value":1540},"value ",{"type":41,"tag":109,"props":1542,"children":1543},{"style":481},[1544],{"type":46,"value":679},{"type":41,"tag":109,"props":1546,"children":1547},{"style":1262},[1548],{"type":46,"value":1549}," 2.0",{"type":41,"tag":109,"props":1551,"children":1552},{"style":481},[1553],{"type":46,"value":519},{"type":41,"tag":924,"props":1555,"children":1557},{"id":1556},"render-targets",[1558],{"type":46,"value":1559},"Render Targets",{"type":41,"tag":97,"props":1561,"children":1563},{"className":463,"code":1562,"language":465,"meta":102,"style":102},"const target = ctx.target(512, 512, {\n  format?: \"rgba8unorm\" | \"rgba16float\" | \"r16float\" | \"rg16float\",\n  filter?: \"linear\" | \"nearest\",\n  wrap?: \"clamp\" | \"repeat\" | \"mirror\",\n  usage?: \"render\" | \"storage\" | \"both\"\n});\n\nctx.setTarget(target);  \u002F\u002F Render to target\nctx.setTarget(null);    \u002F\u002F Render to screen\n",[1564],{"type":41,"tag":105,"props":1565,"children":1566},{"__ignoreMap":102},[1567,1621,1702,1748,1811,1870,1885,1892,1922],{"type":41,"tag":109,"props":1568,"children":1569},{"class":111,"line":112},[1570,1574,1579,1583,1587,1591,1595,1599,1604,1608,1613,1617],{"type":41,"tag":109,"props":1571,"children":1572},{"style":666},[1573],{"type":46,"value":669},{"type":41,"tag":109,"props":1575,"children":1576},{"style":487},[1577],{"type":46,"value":1578}," target ",{"type":41,"tag":109,"props":1580,"children":1581},{"style":481},[1582],{"type":46,"value":679},{"type":41,"tag":109,"props":1584,"children":1585},{"style":487},[1586],{"type":46,"value":778},{"type":41,"tag":109,"props":1588,"children":1589},{"style":481},[1590],{"type":46,"value":563},{"type":41,"tag":109,"props":1592,"children":1593},{"style":566},[1594],{"type":46,"value":276},{"type":41,"tag":109,"props":1596,"children":1597},{"style":487},[1598],{"type":46,"value":602},{"type":41,"tag":109,"props":1600,"children":1601},{"style":1262},[1602],{"type":46,"value":1603},"512",{"type":41,"tag":109,"props":1605,"children":1606},{"style":481},[1607],{"type":46,"value":707},{"type":41,"tag":109,"props":1609,"children":1610},{"style":1262},[1611],{"type":46,"value":1612}," 512",{"type":41,"tag":109,"props":1614,"children":1615},{"style":481},[1616],{"type":46,"value":707},{"type":41,"tag":109,"props":1618,"children":1619},{"style":481},[1620],{"type":46,"value":980},{"type":41,"tag":109,"props":1622,"children":1623},{"class":111,"line":133},[1624,1629,1633,1637,1642,1646,1651,1655,1660,1664,1668,1672,1677,1681,1685,1689,1694,1698],{"type":41,"tag":109,"props":1625,"children":1626},{"style":487},[1627],{"type":46,"value":1628},"  format?",{"type":41,"tag":109,"props":1630,"children":1631},{"style":481},[1632],{"type":46,"value":721},{"type":41,"tag":109,"props":1634,"children":1635},{"style":481},[1636],{"type":46,"value":505},{"type":41,"tag":109,"props":1638,"children":1639},{"style":122},[1640],{"type":46,"value":1641},"rgba8unorm",{"type":41,"tag":109,"props":1643,"children":1644},{"style":481},[1645],{"type":46,"value":514},{"type":41,"tag":109,"props":1647,"children":1648},{"style":481},[1649],{"type":46,"value":1650}," |",{"type":41,"tag":109,"props":1652,"children":1653},{"style":481},[1654],{"type":46,"value":505},{"type":41,"tag":109,"props":1656,"children":1657},{"style":122},[1658],{"type":46,"value":1659},"rgba16float",{"type":41,"tag":109,"props":1661,"children":1662},{"style":481},[1663],{"type":46,"value":514},{"type":41,"tag":109,"props":1665,"children":1666},{"style":481},[1667],{"type":46,"value":1650},{"type":41,"tag":109,"props":1669,"children":1670},{"style":481},[1671],{"type":46,"value":505},{"type":41,"tag":109,"props":1673,"children":1674},{"style":122},[1675],{"type":46,"value":1676},"r16float",{"type":41,"tag":109,"props":1678,"children":1679},{"style":481},[1680],{"type":46,"value":514},{"type":41,"tag":109,"props":1682,"children":1683},{"style":481},[1684],{"type":46,"value":1650},{"type":41,"tag":109,"props":1686,"children":1687},{"style":481},[1688],{"type":46,"value":505},{"type":41,"tag":109,"props":1690,"children":1691},{"style":122},[1692],{"type":46,"value":1693},"rg16float",{"type":41,"tag":109,"props":1695,"children":1696},{"style":481},[1697],{"type":46,"value":514},{"type":41,"tag":109,"props":1699,"children":1700},{"style":481},[1701],{"type":46,"value":1099},{"type":41,"tag":109,"props":1703,"children":1704},{"class":111,"line":143},[1705,1710,1714,1718,1723,1727,1731,1735,1740,1744],{"type":41,"tag":109,"props":1706,"children":1707},{"style":487},[1708],{"type":46,"value":1709},"  filter?",{"type":41,"tag":109,"props":1711,"children":1712},{"style":481},[1713],{"type":46,"value":721},{"type":41,"tag":109,"props":1715,"children":1716},{"style":481},[1717],{"type":46,"value":505},{"type":41,"tag":109,"props":1719,"children":1720},{"style":122},[1721],{"type":46,"value":1722},"linear",{"type":41,"tag":109,"props":1724,"children":1725},{"style":481},[1726],{"type":46,"value":514},{"type":41,"tag":109,"props":1728,"children":1729},{"style":481},[1730],{"type":46,"value":1650},{"type":41,"tag":109,"props":1732,"children":1733},{"style":481},[1734],{"type":46,"value":505},{"type":41,"tag":109,"props":1736,"children":1737},{"style":122},[1738],{"type":46,"value":1739},"nearest",{"type":41,"tag":109,"props":1741,"children":1742},{"style":481},[1743],{"type":46,"value":514},{"type":41,"tag":109,"props":1745,"children":1746},{"style":481},[1747],{"type":46,"value":1099},{"type":41,"tag":109,"props":1749,"children":1750},{"class":111,"line":413},[1751,1756,1760,1764,1769,1773,1777,1781,1786,1790,1794,1798,1803,1807],{"type":41,"tag":109,"props":1752,"children":1753},{"style":487},[1754],{"type":46,"value":1755},"  wrap?",{"type":41,"tag":109,"props":1757,"children":1758},{"style":481},[1759],{"type":46,"value":721},{"type":41,"tag":109,"props":1761,"children":1762},{"style":481},[1763],{"type":46,"value":505},{"type":41,"tag":109,"props":1765,"children":1766},{"style":122},[1767],{"type":46,"value":1768},"clamp",{"type":41,"tag":109,"props":1770,"children":1771},{"style":481},[1772],{"type":46,"value":514},{"type":41,"tag":109,"props":1774,"children":1775},{"style":481},[1776],{"type":46,"value":1650},{"type":41,"tag":109,"props":1778,"children":1779},{"style":481},[1780],{"type":46,"value":505},{"type":41,"tag":109,"props":1782,"children":1783},{"style":122},[1784],{"type":46,"value":1785},"repeat",{"type":41,"tag":109,"props":1787,"children":1788},{"style":481},[1789],{"type":46,"value":514},{"type":41,"tag":109,"props":1791,"children":1792},{"style":481},[1793],{"type":46,"value":1650},{"type":41,"tag":109,"props":1795,"children":1796},{"style":481},[1797],{"type":46,"value":505},{"type":41,"tag":109,"props":1799,"children":1800},{"style":122},[1801],{"type":46,"value":1802},"mirror",{"type":41,"tag":109,"props":1804,"children":1805},{"style":481},[1806],{"type":46,"value":514},{"type":41,"tag":109,"props":1808,"children":1809},{"style":481},[1810],{"type":46,"value":1099},{"type":41,"tag":109,"props":1812,"children":1813},{"class":111,"line":422},[1814,1819,1823,1827,1832,1836,1840,1844,1848,1852,1856,1860,1865],{"type":41,"tag":109,"props":1815,"children":1816},{"style":487},[1817],{"type":46,"value":1818},"  usage?",{"type":41,"tag":109,"props":1820,"children":1821},{"style":481},[1822],{"type":46,"value":721},{"type":41,"tag":109,"props":1824,"children":1825},{"style":481},[1826],{"type":46,"value":505},{"type":41,"tag":109,"props":1828,"children":1829},{"style":122},[1830],{"type":46,"value":1831},"render",{"type":41,"tag":109,"props":1833,"children":1834},{"style":481},[1835],{"type":46,"value":514},{"type":41,"tag":109,"props":1837,"children":1838},{"style":481},[1839],{"type":46,"value":1650},{"type":41,"tag":109,"props":1841,"children":1842},{"style":481},[1843],{"type":46,"value":505},{"type":41,"tag":109,"props":1845,"children":1846},{"style":122},[1847],{"type":46,"value":327},{"type":41,"tag":109,"props":1849,"children":1850},{"style":481},[1851],{"type":46,"value":514},{"type":41,"tag":109,"props":1853,"children":1854},{"style":481},[1855],{"type":46,"value":1650},{"type":41,"tag":109,"props":1857,"children":1858},{"style":481},[1859],{"type":46,"value":505},{"type":41,"tag":109,"props":1861,"children":1862},{"style":122},[1863],{"type":46,"value":1864},"both",{"type":41,"tag":109,"props":1866,"children":1867},{"style":481},[1868],{"type":46,"value":1869},"\"\n",{"type":41,"tag":109,"props":1871,"children":1872},{"class":111,"line":431},[1873,1877,1881],{"type":41,"tag":109,"props":1874,"children":1875},{"style":481},[1876],{"type":46,"value":1152},{"type":41,"tag":109,"props":1878,"children":1879},{"style":487},[1880],{"type":46,"value":620},{"type":41,"tag":109,"props":1882,"children":1883},{"style":481},[1884],{"type":46,"value":519},{"type":41,"tag":109,"props":1886,"children":1887},{"class":111,"line":29},[1888],{"type":41,"tag":109,"props":1889,"children":1890},{"emptyLinePlaceholder":525},[1891],{"type":46,"value":528},{"type":41,"tag":109,"props":1893,"children":1894},{"class":111,"line":448},[1895,1899,1903,1908,1913,1917],{"type":41,"tag":109,"props":1896,"children":1897},{"style":487},[1898],{"type":46,"value":225},{"type":41,"tag":109,"props":1900,"children":1901},{"style":481},[1902],{"type":46,"value":563},{"type":41,"tag":109,"props":1904,"children":1905},{"style":566},[1906],{"type":46,"value":1907},"setTarget",{"type":41,"tag":109,"props":1909,"children":1910},{"style":487},[1911],{"type":46,"value":1912},"(target)",{"type":41,"tag":109,"props":1914,"children":1915},{"style":481},[1916],{"type":46,"value":1374},{"type":41,"tag":109,"props":1918,"children":1919},{"style":137},[1920],{"type":46,"value":1921},"  \u002F\u002F Render to target\n",{"type":41,"tag":109,"props":1923,"children":1924},{"class":111,"line":653},[1925,1929,1933,1937,1941,1946,1950,1954],{"type":41,"tag":109,"props":1926,"children":1927},{"style":487},[1928],{"type":46,"value":225},{"type":41,"tag":109,"props":1930,"children":1931},{"style":481},[1932],{"type":46,"value":563},{"type":41,"tag":109,"props":1934,"children":1935},{"style":566},[1936],{"type":46,"value":1907},{"type":41,"tag":109,"props":1938,"children":1939},{"style":487},[1940],{"type":46,"value":602},{"type":41,"tag":109,"props":1942,"children":1943},{"style":481},[1944],{"type":46,"value":1945},"null",{"type":41,"tag":109,"props":1947,"children":1948},{"style":487},[1949],{"type":46,"value":620},{"type":41,"tag":109,"props":1951,"children":1952},{"style":481},[1953],{"type":46,"value":1374},{"type":41,"tag":109,"props":1955,"children":1956},{"style":137},[1957],{"type":46,"value":1958},"    \u002F\u002F Render to screen\n",{"type":41,"tag":924,"props":1960,"children":1962},{"id":1961},"ping-pong-buffers",[1963],{"type":46,"value":1964},"Ping-Pong Buffers",{"type":41,"tag":97,"props":1966,"children":1968},{"className":463,"code":1967,"language":465,"meta":102,"style":102},"const simulation = ctx.pingPong(128, 128, {\n  format: \"rgba16float\"\n});\n\n\u002F\u002F In render loop:\nuniforms.inputTex.value = simulation.read;\nctx.setTarget(simulation.write);\nprocessPass.draw();\nsimulation.swap();\n",[1969],{"type":41,"tag":105,"props":1970,"children":1971},{"__ignoreMap":102},[1972,2026,2050,2065,2072,2080,2126,2159,2185],{"type":41,"tag":109,"props":1973,"children":1974},{"class":111,"line":112},[1975,1979,1984,1988,1992,1996,2000,2004,2009,2013,2018,2022],{"type":41,"tag":109,"props":1976,"children":1977},{"style":666},[1978],{"type":46,"value":669},{"type":41,"tag":109,"props":1980,"children":1981},{"style":487},[1982],{"type":46,"value":1983}," simulation ",{"type":41,"tag":109,"props":1985,"children":1986},{"style":481},[1987],{"type":46,"value":679},{"type":41,"tag":109,"props":1989,"children":1990},{"style":487},[1991],{"type":46,"value":778},{"type":41,"tag":109,"props":1993,"children":1994},{"style":481},[1995],{"type":46,"value":563},{"type":41,"tag":109,"props":1997,"children":1998},{"style":566},[1999],{"type":46,"value":293},{"type":41,"tag":109,"props":2001,"children":2002},{"style":487},[2003],{"type":46,"value":602},{"type":41,"tag":109,"props":2005,"children":2006},{"style":1262},[2007],{"type":46,"value":2008},"128",{"type":41,"tag":109,"props":2010,"children":2011},{"style":481},[2012],{"type":46,"value":707},{"type":41,"tag":109,"props":2014,"children":2015},{"style":1262},[2016],{"type":46,"value":2017}," 128",{"type":41,"tag":109,"props":2019,"children":2020},{"style":481},[2021],{"type":46,"value":707},{"type":41,"tag":109,"props":2023,"children":2024},{"style":481},[2025],{"type":46,"value":980},{"type":41,"tag":109,"props":2027,"children":2028},{"class":111,"line":133},[2029,2034,2038,2042,2046],{"type":41,"tag":109,"props":2030,"children":2031},{"style":599},[2032],{"type":46,"value":2033},"  format",{"type":41,"tag":109,"props":2035,"children":2036},{"style":481},[2037],{"type":46,"value":721},{"type":41,"tag":109,"props":2039,"children":2040},{"style":481},[2041],{"type":46,"value":505},{"type":41,"tag":109,"props":2043,"children":2044},{"style":122},[2045],{"type":46,"value":1659},{"type":41,"tag":109,"props":2047,"children":2048},{"style":481},[2049],{"type":46,"value":1869},{"type":41,"tag":109,"props":2051,"children":2052},{"class":111,"line":143},[2053,2057,2061],{"type":41,"tag":109,"props":2054,"children":2055},{"style":481},[2056],{"type":46,"value":1152},{"type":41,"tag":109,"props":2058,"children":2059},{"style":487},[2060],{"type":46,"value":620},{"type":41,"tag":109,"props":2062,"children":2063},{"style":481},[2064],{"type":46,"value":519},{"type":41,"tag":109,"props":2066,"children":2067},{"class":111,"line":413},[2068],{"type":41,"tag":109,"props":2069,"children":2070},{"emptyLinePlaceholder":525},[2071],{"type":46,"value":528},{"type":41,"tag":109,"props":2073,"children":2074},{"class":111,"line":422},[2075],{"type":41,"tag":109,"props":2076,"children":2077},{"style":137},[2078],{"type":46,"value":2079},"\u002F\u002F In render loop:\n",{"type":41,"tag":109,"props":2081,"children":2082},{"class":111,"line":431},[2083,2087,2091,2096,2100,2104,2108,2113,2117,2122],{"type":41,"tag":109,"props":2084,"children":2085},{"style":487},[2086],{"type":46,"value":1522},{"type":41,"tag":109,"props":2088,"children":2089},{"style":481},[2090],{"type":46,"value":563},{"type":41,"tag":109,"props":2092,"children":2093},{"style":487},[2094],{"type":46,"value":2095},"inputTex",{"type":41,"tag":109,"props":2097,"children":2098},{"style":481},[2099],{"type":46,"value":563},{"type":41,"tag":109,"props":2101,"children":2102},{"style":487},[2103],{"type":46,"value":1540},{"type":41,"tag":109,"props":2105,"children":2106},{"style":481},[2107],{"type":46,"value":679},{"type":41,"tag":109,"props":2109,"children":2110},{"style":487},[2111],{"type":46,"value":2112}," simulation",{"type":41,"tag":109,"props":2114,"children":2115},{"style":481},[2116],{"type":46,"value":563},{"type":41,"tag":109,"props":2118,"children":2119},{"style":487},[2120],{"type":46,"value":2121},"read",{"type":41,"tag":109,"props":2123,"children":2124},{"style":481},[2125],{"type":46,"value":519},{"type":41,"tag":109,"props":2127,"children":2128},{"class":111,"line":29},[2129,2133,2137,2141,2146,2150,2155],{"type":41,"tag":109,"props":2130,"children":2131},{"style":487},[2132],{"type":46,"value":225},{"type":41,"tag":109,"props":2134,"children":2135},{"style":481},[2136],{"type":46,"value":563},{"type":41,"tag":109,"props":2138,"children":2139},{"style":566},[2140],{"type":46,"value":1907},{"type":41,"tag":109,"props":2142,"children":2143},{"style":487},[2144],{"type":46,"value":2145},"(simulation",{"type":41,"tag":109,"props":2147,"children":2148},{"style":481},[2149],{"type":46,"value":563},{"type":41,"tag":109,"props":2151,"children":2152},{"style":487},[2153],{"type":46,"value":2154},"write)",{"type":41,"tag":109,"props":2156,"children":2157},{"style":481},[2158],{"type":46,"value":519},{"type":41,"tag":109,"props":2160,"children":2161},{"class":111,"line":448},[2162,2167,2171,2176,2181],{"type":41,"tag":109,"props":2163,"children":2164},{"style":487},[2165],{"type":46,"value":2166},"processPass",{"type":41,"tag":109,"props":2168,"children":2169},{"style":481},[2170],{"type":46,"value":563},{"type":41,"tag":109,"props":2172,"children":2173},{"style":566},[2174],{"type":46,"value":2175},"draw",{"type":41,"tag":109,"props":2177,"children":2178},{"style":487},[2179],{"type":46,"value":2180},"()",{"type":41,"tag":109,"props":2182,"children":2183},{"style":481},[2184],{"type":46,"value":519},{"type":41,"tag":109,"props":2186,"children":2187},{"class":111,"line":653},[2188,2193,2197,2202,2206],{"type":41,"tag":109,"props":2189,"children":2190},{"style":487},[2191],{"type":46,"value":2192},"simulation",{"type":41,"tag":109,"props":2194,"children":2195},{"style":481},[2196],{"type":46,"value":563},{"type":41,"tag":109,"props":2198,"children":2199},{"style":566},[2200],{"type":46,"value":2201},"swap",{"type":41,"tag":109,"props":2203,"children":2204},{"style":487},[2205],{"type":46,"value":2180},{"type":41,"tag":109,"props":2207,"children":2208},{"style":481},[2209],{"type":46,"value":519},{"type":41,"tag":924,"props":2211,"children":2213},{"id":2212},"particles-instanced-quads",[2214],{"type":46,"value":2215},"Particles (Instanced Quads)",{"type":41,"tag":97,"props":2217,"children":2219},{"className":463,"code":2218,"language":465,"meta":102,"style":102},"const particles = ctx.particles(1000, {\n  shader: wgslCode,      \u002F\u002F Full vertex + fragment shader\n  bufferSize: 1000 * 16, \u002F\u002F Buffer size in bytes\n  blend: \"additive\"\n});\n\nparticles.write(particleData);  \u002F\u002F Float32Array\nparticles.draw();\n",[2220],{"type":41,"tag":105,"props":2221,"children":2222},{"__ignoreMap":102},[2223,2269,2295,2331,2356,2371,2378,2408],{"type":41,"tag":109,"props":2224,"children":2225},{"class":111,"line":112},[2226,2230,2235,2239,2243,2247,2252,2256,2261,2265],{"type":41,"tag":109,"props":2227,"children":2228},{"style":666},[2229],{"type":46,"value":669},{"type":41,"tag":109,"props":2231,"children":2232},{"style":487},[2233],{"type":46,"value":2234}," particles ",{"type":41,"tag":109,"props":2236,"children":2237},{"style":481},[2238],{"type":46,"value":679},{"type":41,"tag":109,"props":2240,"children":2241},{"style":487},[2242],{"type":46,"value":778},{"type":41,"tag":109,"props":2244,"children":2245},{"style":481},[2246],{"type":46,"value":563},{"type":41,"tag":109,"props":2248,"children":2249},{"style":566},[2250],{"type":46,"value":2251},"particles",{"type":41,"tag":109,"props":2253,"children":2254},{"style":487},[2255],{"type":46,"value":602},{"type":41,"tag":109,"props":2257,"children":2258},{"style":1262},[2259],{"type":46,"value":2260},"1000",{"type":41,"tag":109,"props":2262,"children":2263},{"style":481},[2264],{"type":46,"value":707},{"type":41,"tag":109,"props":2266,"children":2267},{"style":481},[2268],{"type":46,"value":980},{"type":41,"tag":109,"props":2270,"children":2271},{"class":111,"line":133},[2272,2277,2281,2286,2290],{"type":41,"tag":109,"props":2273,"children":2274},{"style":599},[2275],{"type":46,"value":2276},"  shader",{"type":41,"tag":109,"props":2278,"children":2279},{"style":481},[2280],{"type":46,"value":721},{"type":41,"tag":109,"props":2282,"children":2283},{"style":487},[2284],{"type":46,"value":2285}," wgslCode",{"type":41,"tag":109,"props":2287,"children":2288},{"style":481},[2289],{"type":46,"value":707},{"type":41,"tag":109,"props":2291,"children":2292},{"style":137},[2293],{"type":46,"value":2294},"      \u002F\u002F Full vertex + fragment shader\n",{"type":41,"tag":109,"props":2296,"children":2297},{"class":111,"line":143},[2298,2303,2307,2312,2317,2322,2326],{"type":41,"tag":109,"props":2299,"children":2300},{"style":599},[2301],{"type":46,"value":2302},"  bufferSize",{"type":41,"tag":109,"props":2304,"children":2305},{"style":481},[2306],{"type":46,"value":721},{"type":41,"tag":109,"props":2308,"children":2309},{"style":1262},[2310],{"type":46,"value":2311}," 1000",{"type":41,"tag":109,"props":2313,"children":2314},{"style":481},[2315],{"type":46,"value":2316}," *",{"type":41,"tag":109,"props":2318,"children":2319},{"style":1262},[2320],{"type":46,"value":2321}," 16",{"type":41,"tag":109,"props":2323,"children":2324},{"style":481},[2325],{"type":46,"value":707},{"type":41,"tag":109,"props":2327,"children":2328},{"style":137},[2329],{"type":46,"value":2330}," \u002F\u002F Buffer size in bytes\n",{"type":41,"tag":109,"props":2332,"children":2333},{"class":111,"line":413},[2334,2339,2343,2347,2352],{"type":41,"tag":109,"props":2335,"children":2336},{"style":599},[2337],{"type":46,"value":2338},"  blend",{"type":41,"tag":109,"props":2340,"children":2341},{"style":481},[2342],{"type":46,"value":721},{"type":41,"tag":109,"props":2344,"children":2345},{"style":481},[2346],{"type":46,"value":505},{"type":41,"tag":109,"props":2348,"children":2349},{"style":122},[2350],{"type":46,"value":2351},"additive",{"type":41,"tag":109,"props":2353,"children":2354},{"style":481},[2355],{"type":46,"value":1869},{"type":41,"tag":109,"props":2357,"children":2358},{"class":111,"line":422},[2359,2363,2367],{"type":41,"tag":109,"props":2360,"children":2361},{"style":481},[2362],{"type":46,"value":1152},{"type":41,"tag":109,"props":2364,"children":2365},{"style":487},[2366],{"type":46,"value":620},{"type":41,"tag":109,"props":2368,"children":2369},{"style":481},[2370],{"type":46,"value":519},{"type":41,"tag":109,"props":2372,"children":2373},{"class":111,"line":431},[2374],{"type":41,"tag":109,"props":2375,"children":2376},{"emptyLinePlaceholder":525},[2377],{"type":46,"value":528},{"type":41,"tag":109,"props":2379,"children":2380},{"class":111,"line":29},[2381,2385,2389,2394,2399,2403],{"type":41,"tag":109,"props":2382,"children":2383},{"style":487},[2384],{"type":46,"value":2251},{"type":41,"tag":109,"props":2386,"children":2387},{"style":481},[2388],{"type":46,"value":563},{"type":41,"tag":109,"props":2390,"children":2391},{"style":566},[2392],{"type":46,"value":2393},"write",{"type":41,"tag":109,"props":2395,"children":2396},{"style":487},[2397],{"type":46,"value":2398},"(particleData)",{"type":41,"tag":109,"props":2400,"children":2401},{"style":481},[2402],{"type":46,"value":1374},{"type":41,"tag":109,"props":2404,"children":2405},{"style":137},[2406],{"type":46,"value":2407},"  \u002F\u002F Float32Array\n",{"type":41,"tag":109,"props":2409,"children":2410},{"class":111,"line":448},[2411,2415,2419,2423,2427],{"type":41,"tag":109,"props":2412,"children":2413},{"style":487},[2414],{"type":46,"value":2251},{"type":41,"tag":109,"props":2416,"children":2417},{"style":481},[2418],{"type":46,"value":563},{"type":41,"tag":109,"props":2420,"children":2421},{"style":566},[2422],{"type":46,"value":2175},{"type":41,"tag":109,"props":2424,"children":2425},{"style":487},[2426],{"type":46,"value":2180},{"type":41,"tag":109,"props":2428,"children":2429},{"style":481},[2430],{"type":46,"value":519},{"type":41,"tag":924,"props":2432,"children":2434},{"id":2433},"compute-shaders",[2435],{"type":46,"value":2436},"Compute Shaders",{"type":41,"tag":97,"props":2438,"children":2440},{"className":463,"code":2439,"language":465,"meta":102,"style":102},"const compute = ctx.compute(\\`\n  @compute @workgroup_size(64)\n  fn main(@builtin(global_invocation_id) id: vec3\u003Cu32>) {\n    \u002F\u002F GPU computation\n  }\n\\`);\n\ncompute.storage(\"buffer\", storageBuffer);\ncompute.dispatch(Math.ceil(count \u002F 64));\n",[2441],{"type":41,"tag":105,"props":2442,"children":2443},{"__ignoreMap":102},[2444,2480,2488,2496,2504,2511,2522,2529,2537],{"type":41,"tag":109,"props":2445,"children":2446},{"class":111,"line":112},[2447,2451,2456,2460,2464,2468,2472,2476],{"type":41,"tag":109,"props":2448,"children":2449},{"style":666},[2450],{"type":46,"value":669},{"type":41,"tag":109,"props":2452,"children":2453},{"style":487},[2454],{"type":46,"value":2455}," compute ",{"type":41,"tag":109,"props":2457,"children":2458},{"style":481},[2459],{"type":46,"value":679},{"type":41,"tag":109,"props":2461,"children":2462},{"style":487},[2463],{"type":46,"value":778},{"type":41,"tag":109,"props":2465,"children":2466},{"style":481},[2467],{"type":46,"value":563},{"type":41,"tag":109,"props":2469,"children":2470},{"style":566},[2471],{"type":46,"value":310},{"type":41,"tag":109,"props":2473,"children":2474},{"style":487},[2475],{"type":46,"value":791},{"type":41,"tag":109,"props":2477,"children":2478},{"style":481},[2479],{"type":46,"value":796},{"type":41,"tag":109,"props":2481,"children":2482},{"class":111,"line":133},[2483],{"type":41,"tag":109,"props":2484,"children":2485},{"style":122},[2486],{"type":46,"value":2487},"  @compute @workgroup_size(64)\n",{"type":41,"tag":109,"props":2489,"children":2490},{"class":111,"line":143},[2491],{"type":41,"tag":109,"props":2492,"children":2493},{"style":122},[2494],{"type":46,"value":2495},"  fn main(@builtin(global_invocation_id) id: vec3\u003Cu32>) {\n",{"type":41,"tag":109,"props":2497,"children":2498},{"class":111,"line":413},[2499],{"type":41,"tag":109,"props":2500,"children":2501},{"style":122},[2502],{"type":46,"value":2503},"    \u002F\u002F GPU computation\n",{"type":41,"tag":109,"props":2505,"children":2506},{"class":111,"line":422},[2507],{"type":41,"tag":109,"props":2508,"children":2509},{"style":122},[2510],{"type":46,"value":841},{"type":41,"tag":109,"props":2512,"children":2513},{"class":111,"line":431},[2514,2518],{"type":41,"tag":109,"props":2515,"children":2516},{"style":487},[2517],{"type":46,"value":850},{"type":41,"tag":109,"props":2519,"children":2520},{"style":122},[2521],{"type":46,"value":855},{"type":41,"tag":109,"props":2523,"children":2524},{"class":111,"line":29},[2525],{"type":41,"tag":109,"props":2526,"children":2527},{"emptyLinePlaceholder":525},[2528],{"type":46,"value":528},{"type":41,"tag":109,"props":2530,"children":2531},{"class":111,"line":448},[2532],{"type":41,"tag":109,"props":2533,"children":2534},{"style":122},[2535],{"type":46,"value":2536},"compute.storage(\"buffer\", storageBuffer);\n",{"type":41,"tag":109,"props":2538,"children":2539},{"class":111,"line":653},[2540],{"type":41,"tag":109,"props":2541,"children":2542},{"style":122},[2543],{"type":46,"value":2544},"compute.dispatch(Math.ceil(count \u002F 64));\n",{"type":41,"tag":924,"props":2546,"children":2548},{"id":2547},"storage-buffers",[2549],{"type":46,"value":2550},"Storage Buffers",{"type":41,"tag":97,"props":2552,"children":2554},{"className":463,"code":2553,"language":465,"meta":102,"style":102},"const buffer = ctx.storage(byteSize);\nbuffer.write(new Float32Array([...]));\n\n\u002F\u002F Bind to shader\npass.storage(\"dataBuffer\", buffer);\n",[2555],{"type":41,"tag":105,"props":2556,"children":2557},{"__ignoreMap":102},[2558,2595,2644,2651,2659],{"type":41,"tag":109,"props":2559,"children":2560},{"class":111,"line":112},[2561,2565,2570,2574,2578,2582,2586,2591],{"type":41,"tag":109,"props":2562,"children":2563},{"style":666},[2564],{"type":46,"value":669},{"type":41,"tag":109,"props":2566,"children":2567},{"style":487},[2568],{"type":46,"value":2569}," buffer ",{"type":41,"tag":109,"props":2571,"children":2572},{"style":481},[2573],{"type":46,"value":679},{"type":41,"tag":109,"props":2575,"children":2576},{"style":487},[2577],{"type":46,"value":778},{"type":41,"tag":109,"props":2579,"children":2580},{"style":481},[2581],{"type":46,"value":563},{"type":41,"tag":109,"props":2583,"children":2584},{"style":566},[2585],{"type":46,"value":327},{"type":41,"tag":109,"props":2587,"children":2588},{"style":487},[2589],{"type":46,"value":2590},"(byteSize)",{"type":41,"tag":109,"props":2592,"children":2593},{"style":481},[2594],{"type":46,"value":519},{"type":41,"tag":109,"props":2596,"children":2597},{"class":111,"line":133},[2598,2603,2607,2611,2615,2620,2625,2630,2635,2640],{"type":41,"tag":109,"props":2599,"children":2600},{"style":487},[2601],{"type":46,"value":2602},"buffer",{"type":41,"tag":109,"props":2604,"children":2605},{"style":481},[2606],{"type":46,"value":563},{"type":41,"tag":109,"props":2608,"children":2609},{"style":566},[2610],{"type":46,"value":2393},{"type":41,"tag":109,"props":2612,"children":2613},{"style":487},[2614],{"type":46,"value":602},{"type":41,"tag":109,"props":2616,"children":2617},{"style":481},[2618],{"type":46,"value":2619},"new",{"type":41,"tag":109,"props":2621,"children":2622},{"style":566},[2623],{"type":46,"value":2624}," Float32Array",{"type":41,"tag":109,"props":2626,"children":2627},{"style":487},[2628],{"type":46,"value":2629},"([",{"type":41,"tag":109,"props":2631,"children":2632},{"style":481},[2633],{"type":46,"value":2634},"...",{"type":41,"tag":109,"props":2636,"children":2637},{"style":487},[2638],{"type":46,"value":2639},"]))",{"type":41,"tag":109,"props":2641,"children":2642},{"style":481},[2643],{"type":46,"value":519},{"type":41,"tag":109,"props":2645,"children":2646},{"class":111,"line":143},[2647],{"type":41,"tag":109,"props":2648,"children":2649},{"emptyLinePlaceholder":525},[2650],{"type":46,"value":528},{"type":41,"tag":109,"props":2652,"children":2653},{"class":111,"line":413},[2654],{"type":41,"tag":109,"props":2655,"children":2656},{"style":137},[2657],{"type":46,"value":2658},"\u002F\u002F Bind to shader\n",{"type":41,"tag":109,"props":2660,"children":2661},{"class":111,"line":422},[2662,2666,2670,2674,2678,2682,2687,2691,2695,2700],{"type":41,"tag":109,"props":2663,"children":2664},{"style":487},[2665],{"type":46,"value":242},{"type":41,"tag":109,"props":2667,"children":2668},{"style":481},[2669],{"type":46,"value":563},{"type":41,"tag":109,"props":2671,"children":2672},{"style":566},[2673],{"type":46,"value":327},{"type":41,"tag":109,"props":2675,"children":2676},{"style":487},[2677],{"type":46,"value":602},{"type":41,"tag":109,"props":2679,"children":2680},{"style":481},[2681],{"type":46,"value":514},{"type":41,"tag":109,"props":2683,"children":2684},{"style":122},[2685],{"type":46,"value":2686},"dataBuffer",{"type":41,"tag":109,"props":2688,"children":2689},{"style":481},[2690],{"type":46,"value":514},{"type":41,"tag":109,"props":2692,"children":2693},{"style":481},[2694],{"type":46,"value":707},{"type":41,"tag":109,"props":2696,"children":2697},{"style":487},[2698],{"type":46,"value":2699}," buffer)",{"type":41,"tag":109,"props":2701,"children":2702},{"style":481},[2703],{"type":46,"value":519},{"type":41,"tag":924,"props":2705,"children":2707},{"id":2706},"texture-loading",[2708],{"type":46,"value":2709},"Texture Loading",{"type":41,"tag":97,"props":2711,"children":2713},{"className":463,"code":2712,"language":465,"meta":102,"style":102},"\u002F\u002F From URL (async)\nconst tex = await ctx.texture(\"image.png\");\n\n\u002F\u002F From canvas \u002F video \u002F ImageBitmap (sync)\nconst tex = ctx.texture(canvas);\n\n\u002F\u002F From raw pixel data (sync)\nconst tex = ctx.texture(new Uint8Array(data), { width: 256, height: 256 });\n\n\u002F\u002F Options\nconst tex = await ctx.texture(\"photo.jpg\", {\n  filter: \"linear\",     \u002F\u002F \"linear\" | \"nearest\"\n  wrap: \"repeat\",       \u002F\u002F \"clamp\" | \"repeat\" | \"mirror\"\n  format: \"rgba8unorm\", \u002F\u002F GPU texture format\n  flipY: true,          \u002F\u002F Flip vertically on load\n});\n\n\u002F\u002F Bind to shader (manual mode)\nconst pass = ctx.pass(shader, {\n  uniforms: {\n    uTex: { value: tex },  \u002F\u002F .texture and .sampler auto-bound\n  }\n});\n\n\u002F\u002F Update from live source (canvas, video)\ntex.update(videoElement);\n\n\u002F\u002F Clean up\ntex.dispose();\n",[2714],{"type":41,"tag":105,"props":2715,"children":2716},{"__ignoreMap":102},[2717,2725,2782,2789,2797,2833,2840,2848,2944,2951,2959,3015,3048,3081,3113,3138,3153,3160,3168,3208,3223,3261,3268,3283,3290,3298,3324,3332,3341],{"type":41,"tag":109,"props":2718,"children":2719},{"class":111,"line":112},[2720],{"type":41,"tag":109,"props":2721,"children":2722},{"style":137},[2723],{"type":46,"value":2724},"\u002F\u002F From URL (async)\n",{"type":41,"tag":109,"props":2726,"children":2727},{"class":111,"line":133},[2728,2732,2737,2741,2745,2749,2753,2757,2761,2765,2770,2774,2778],{"type":41,"tag":109,"props":2729,"children":2730},{"style":666},[2731],{"type":46,"value":669},{"type":41,"tag":109,"props":2733,"children":2734},{"style":487},[2735],{"type":46,"value":2736}," tex ",{"type":41,"tag":109,"props":2738,"children":2739},{"style":481},[2740],{"type":46,"value":679},{"type":41,"tag":109,"props":2742,"children":2743},{"style":475},[2744],{"type":46,"value":684},{"type":41,"tag":109,"props":2746,"children":2747},{"style":487},[2748],{"type":46,"value":778},{"type":41,"tag":109,"props":2750,"children":2751},{"style":481},[2752],{"type":46,"value":563},{"type":41,"tag":109,"props":2754,"children":2755},{"style":566},[2756],{"type":46,"value":361},{"type":41,"tag":109,"props":2758,"children":2759},{"style":487},[2760],{"type":46,"value":602},{"type":41,"tag":109,"props":2762,"children":2763},{"style":481},[2764],{"type":46,"value":514},{"type":41,"tag":109,"props":2766,"children":2767},{"style":122},[2768],{"type":46,"value":2769},"image.png",{"type":41,"tag":109,"props":2771,"children":2772},{"style":481},[2773],{"type":46,"value":514},{"type":41,"tag":109,"props":2775,"children":2776},{"style":487},[2777],{"type":46,"value":620},{"type":41,"tag":109,"props":2779,"children":2780},{"style":481},[2781],{"type":46,"value":519},{"type":41,"tag":109,"props":2783,"children":2784},{"class":111,"line":143},[2785],{"type":41,"tag":109,"props":2786,"children":2787},{"emptyLinePlaceholder":525},[2788],{"type":46,"value":528},{"type":41,"tag":109,"props":2790,"children":2791},{"class":111,"line":413},[2792],{"type":41,"tag":109,"props":2793,"children":2794},{"style":137},[2795],{"type":46,"value":2796},"\u002F\u002F From canvas \u002F video \u002F ImageBitmap (sync)\n",{"type":41,"tag":109,"props":2798,"children":2799},{"class":111,"line":422},[2800,2804,2808,2812,2816,2820,2824,2829],{"type":41,"tag":109,"props":2801,"children":2802},{"style":666},[2803],{"type":46,"value":669},{"type":41,"tag":109,"props":2805,"children":2806},{"style":487},[2807],{"type":46,"value":2736},{"type":41,"tag":109,"props":2809,"children":2810},{"style":481},[2811],{"type":46,"value":679},{"type":41,"tag":109,"props":2813,"children":2814},{"style":487},[2815],{"type":46,"value":778},{"type":41,"tag":109,"props":2817,"children":2818},{"style":481},[2819],{"type":46,"value":563},{"type":41,"tag":109,"props":2821,"children":2822},{"style":566},[2823],{"type":46,"value":361},{"type":41,"tag":109,"props":2825,"children":2826},{"style":487},[2827],{"type":46,"value":2828},"(canvas)",{"type":41,"tag":109,"props":2830,"children":2831},{"style":481},[2832],{"type":46,"value":519},{"type":41,"tag":109,"props":2834,"children":2835},{"class":111,"line":431},[2836],{"type":41,"tag":109,"props":2837,"children":2838},{"emptyLinePlaceholder":525},[2839],{"type":46,"value":528},{"type":41,"tag":109,"props":2841,"children":2842},{"class":111,"line":29},[2843],{"type":41,"tag":109,"props":2844,"children":2845},{"style":137},[2846],{"type":46,"value":2847},"\u002F\u002F From raw pixel data (sync)\n",{"type":41,"tag":109,"props":2849,"children":2850},{"class":111,"line":448},[2851,2855,2859,2863,2867,2871,2875,2879,2883,2888,2893,2897,2901,2906,2910,2915,2919,2924,2928,2932,2936,2940],{"type":41,"tag":109,"props":2852,"children":2853},{"style":666},[2854],{"type":46,"value":669},{"type":41,"tag":109,"props":2856,"children":2857},{"style":487},[2858],{"type":46,"value":2736},{"type":41,"tag":109,"props":2860,"children":2861},{"style":481},[2862],{"type":46,"value":679},{"type":41,"tag":109,"props":2864,"children":2865},{"style":487},[2866],{"type":46,"value":778},{"type":41,"tag":109,"props":2868,"children":2869},{"style":481},[2870],{"type":46,"value":563},{"type":41,"tag":109,"props":2872,"children":2873},{"style":566},[2874],{"type":46,"value":361},{"type":41,"tag":109,"props":2876,"children":2877},{"style":487},[2878],{"type":46,"value":602},{"type":41,"tag":109,"props":2880,"children":2881},{"style":481},[2882],{"type":46,"value":2619},{"type":41,"tag":109,"props":2884,"children":2885},{"style":566},[2886],{"type":46,"value":2887}," Uint8Array",{"type":41,"tag":109,"props":2889,"children":2890},{"style":487},[2891],{"type":46,"value":2892},"(data)",{"type":41,"tag":109,"props":2894,"children":2895},{"style":481},[2896],{"type":46,"value":707},{"type":41,"tag":109,"props":2898,"children":2899},{"style":481},[2900],{"type":46,"value":484},{"type":41,"tag":109,"props":2902,"children":2903},{"style":599},[2904],{"type":46,"value":2905}," width",{"type":41,"tag":109,"props":2907,"children":2908},{"style":481},[2909],{"type":46,"value":721},{"type":41,"tag":109,"props":2911,"children":2912},{"style":1262},[2913],{"type":46,"value":2914}," 256",{"type":41,"tag":109,"props":2916,"children":2917},{"style":481},[2918],{"type":46,"value":707},{"type":41,"tag":109,"props":2920,"children":2921},{"style":599},[2922],{"type":46,"value":2923}," height",{"type":41,"tag":109,"props":2925,"children":2926},{"style":481},[2927],{"type":46,"value":721},{"type":41,"tag":109,"props":2929,"children":2930},{"style":1262},[2931],{"type":46,"value":2914},{"type":41,"tag":109,"props":2933,"children":2934},{"style":481},[2935],{"type":46,"value":495},{"type":41,"tag":109,"props":2937,"children":2938},{"style":487},[2939],{"type":46,"value":620},{"type":41,"tag":109,"props":2941,"children":2942},{"style":481},[2943],{"type":46,"value":519},{"type":41,"tag":109,"props":2945,"children":2946},{"class":111,"line":653},[2947],{"type":41,"tag":109,"props":2948,"children":2949},{"emptyLinePlaceholder":525},[2950],{"type":46,"value":528},{"type":41,"tag":109,"props":2952,"children":2953},{"class":111,"line":662},[2954],{"type":41,"tag":109,"props":2955,"children":2956},{"style":137},[2957],{"type":46,"value":2958},"\u002F\u002F Options\n",{"type":41,"tag":109,"props":2960,"children":2961},{"class":111,"line":742},[2962,2966,2970,2974,2978,2982,2986,2990,2994,2998,3003,3007,3011],{"type":41,"tag":109,"props":2963,"children":2964},{"style":666},[2965],{"type":46,"value":669},{"type":41,"tag":109,"props":2967,"children":2968},{"style":487},[2969],{"type":46,"value":2736},{"type":41,"tag":109,"props":2971,"children":2972},{"style":481},[2973],{"type":46,"value":679},{"type":41,"tag":109,"props":2975,"children":2976},{"style":475},[2977],{"type":46,"value":684},{"type":41,"tag":109,"props":2979,"children":2980},{"style":487},[2981],{"type":46,"value":778},{"type":41,"tag":109,"props":2983,"children":2984},{"style":481},[2985],{"type":46,"value":563},{"type":41,"tag":109,"props":2987,"children":2988},{"style":566},[2989],{"type":46,"value":361},{"type":41,"tag":109,"props":2991,"children":2992},{"style":487},[2993],{"type":46,"value":602},{"type":41,"tag":109,"props":2995,"children":2996},{"style":481},[2997],{"type":46,"value":514},{"type":41,"tag":109,"props":2999,"children":3000},{"style":122},[3001],{"type":46,"value":3002},"photo.jpg",{"type":41,"tag":109,"props":3004,"children":3005},{"style":481},[3006],{"type":46,"value":514},{"type":41,"tag":109,"props":3008,"children":3009},{"style":481},[3010],{"type":46,"value":707},{"type":41,"tag":109,"props":3012,"children":3013},{"style":481},[3014],{"type":46,"value":980},{"type":41,"tag":109,"props":3016,"children":3017},{"class":111,"line":750},[3018,3023,3027,3031,3035,3039,3043],{"type":41,"tag":109,"props":3019,"children":3020},{"style":599},[3021],{"type":46,"value":3022},"  filter",{"type":41,"tag":109,"props":3024,"children":3025},{"style":481},[3026],{"type":46,"value":721},{"type":41,"tag":109,"props":3028,"children":3029},{"style":481},[3030],{"type":46,"value":505},{"type":41,"tag":109,"props":3032,"children":3033},{"style":122},[3034],{"type":46,"value":1722},{"type":41,"tag":109,"props":3036,"children":3037},{"style":481},[3038],{"type":46,"value":514},{"type":41,"tag":109,"props":3040,"children":3041},{"style":481},[3042],{"type":46,"value":707},{"type":41,"tag":109,"props":3044,"children":3045},{"style":137},[3046],{"type":46,"value":3047},"     \u002F\u002F \"linear\" | \"nearest\"\n",{"type":41,"tag":109,"props":3049,"children":3050},{"class":111,"line":759},[3051,3056,3060,3064,3068,3072,3076],{"type":41,"tag":109,"props":3052,"children":3053},{"style":599},[3054],{"type":46,"value":3055},"  wrap",{"type":41,"tag":109,"props":3057,"children":3058},{"style":481},[3059],{"type":46,"value":721},{"type":41,"tag":109,"props":3061,"children":3062},{"style":481},[3063],{"type":46,"value":505},{"type":41,"tag":109,"props":3065,"children":3066},{"style":122},[3067],{"type":46,"value":1785},{"type":41,"tag":109,"props":3069,"children":3070},{"style":481},[3071],{"type":46,"value":514},{"type":41,"tag":109,"props":3073,"children":3074},{"style":481},[3075],{"type":46,"value":707},{"type":41,"tag":109,"props":3077,"children":3078},{"style":137},[3079],{"type":46,"value":3080},"       \u002F\u002F \"clamp\" | \"repeat\" | \"mirror\"\n",{"type":41,"tag":109,"props":3082,"children":3083},{"class":111,"line":799},[3084,3088,3092,3096,3100,3104,3108],{"type":41,"tag":109,"props":3085,"children":3086},{"style":599},[3087],{"type":46,"value":2033},{"type":41,"tag":109,"props":3089,"children":3090},{"style":481},[3091],{"type":46,"value":721},{"type":41,"tag":109,"props":3093,"children":3094},{"style":481},[3095],{"type":46,"value":505},{"type":41,"tag":109,"props":3097,"children":3098},{"style":122},[3099],{"type":46,"value":1641},{"type":41,"tag":109,"props":3101,"children":3102},{"style":481},[3103],{"type":46,"value":514},{"type":41,"tag":109,"props":3105,"children":3106},{"style":481},[3107],{"type":46,"value":707},{"type":41,"tag":109,"props":3109,"children":3110},{"style":137},[3111],{"type":46,"value":3112}," \u002F\u002F GPU texture format\n",{"type":41,"tag":109,"props":3114,"children":3115},{"class":111,"line":808},[3116,3121,3125,3129,3133],{"type":41,"tag":109,"props":3117,"children":3118},{"style":599},[3119],{"type":46,"value":3120},"  flipY",{"type":41,"tag":109,"props":3122,"children":3123},{"style":481},[3124],{"type":46,"value":721},{"type":41,"tag":109,"props":3126,"children":3127},{"style":724},[3128],{"type":46,"value":727},{"type":41,"tag":109,"props":3130,"children":3131},{"style":481},[3132],{"type":46,"value":707},{"type":41,"tag":109,"props":3134,"children":3135},{"style":137},[3136],{"type":46,"value":3137},"          \u002F\u002F Flip vertically on load\n",{"type":41,"tag":109,"props":3139,"children":3140},{"class":111,"line":817},[3141,3145,3149],{"type":41,"tag":109,"props":3142,"children":3143},{"style":481},[3144],{"type":46,"value":1152},{"type":41,"tag":109,"props":3146,"children":3147},{"style":487},[3148],{"type":46,"value":620},{"type":41,"tag":109,"props":3150,"children":3151},{"style":481},[3152],{"type":46,"value":519},{"type":41,"tag":109,"props":3154,"children":3155},{"class":111,"line":826},[3156],{"type":41,"tag":109,"props":3157,"children":3158},{"emptyLinePlaceholder":525},[3159],{"type":46,"value":528},{"type":41,"tag":109,"props":3161,"children":3162},{"class":111,"line":835},[3163],{"type":41,"tag":109,"props":3164,"children":3165},{"style":137},[3166],{"type":46,"value":3167},"\u002F\u002F Bind to shader (manual mode)\n",{"type":41,"tag":109,"props":3169,"children":3170},{"class":111,"line":844},[3171,3175,3179,3183,3187,3191,3195,3200,3204],{"type":41,"tag":109,"props":3172,"children":3173},{"style":666},[3174],{"type":46,"value":669},{"type":41,"tag":109,"props":3176,"children":3177},{"style":487},[3178],{"type":46,"value":769},{"type":41,"tag":109,"props":3180,"children":3181},{"style":481},[3182],{"type":46,"value":679},{"type":41,"tag":109,"props":3184,"children":3185},{"style":487},[3186],{"type":46,"value":778},{"type":41,"tag":109,"props":3188,"children":3189},{"style":481},[3190],{"type":46,"value":563},{"type":41,"tag":109,"props":3192,"children":3193},{"style":566},[3194],{"type":46,"value":242},{"type":41,"tag":109,"props":3196,"children":3197},{"style":487},[3198],{"type":46,"value":3199},"(shader",{"type":41,"tag":109,"props":3201,"children":3202},{"style":481},[3203],{"type":46,"value":707},{"type":41,"tag":109,"props":3205,"children":3206},{"style":481},[3207],{"type":46,"value":980},{"type":41,"tag":109,"props":3209,"children":3210},{"class":111,"line":858},[3211,3215,3219],{"type":41,"tag":109,"props":3212,"children":3213},{"style":599},[3214],{"type":46,"value":1441},{"type":41,"tag":109,"props":3216,"children":3217},{"style":481},[3218],{"type":46,"value":721},{"type":41,"tag":109,"props":3220,"children":3221},{"style":481},[3222],{"type":46,"value":980},{"type":41,"tag":109,"props":3224,"children":3225},{"class":111,"line":866},[3226,3231,3235,3239,3243,3247,3251,3256],{"type":41,"tag":109,"props":3227,"children":3228},{"style":599},[3229],{"type":46,"value":3230},"    uTex",{"type":41,"tag":109,"props":3232,"children":3233},{"style":481},[3234],{"type":46,"value":721},{"type":41,"tag":109,"props":3236,"children":3237},{"style":481},[3238],{"type":46,"value":484},{"type":41,"tag":109,"props":3240,"children":3241},{"style":599},[3242],{"type":46,"value":1470},{"type":41,"tag":109,"props":3244,"children":3245},{"style":481},[3246],{"type":46,"value":721},{"type":41,"tag":109,"props":3248,"children":3249},{"style":487},[3250],{"type":46,"value":2736},{"type":41,"tag":109,"props":3252,"children":3253},{"style":481},[3254],{"type":46,"value":3255},"},",{"type":41,"tag":109,"props":3257,"children":3258},{"style":137},[3259],{"type":46,"value":3260},"  \u002F\u002F .texture and .sampler auto-bound\n",{"type":41,"tag":109,"props":3262,"children":3263},{"class":111,"line":875},[3264],{"type":41,"tag":109,"props":3265,"children":3266},{"style":481},[3267],{"type":46,"value":841},{"type":41,"tag":109,"props":3269,"children":3270},{"class":111,"line":884},[3271,3275,3279],{"type":41,"tag":109,"props":3272,"children":3273},{"style":481},[3274],{"type":46,"value":1152},{"type":41,"tag":109,"props":3276,"children":3277},{"style":487},[3278],{"type":46,"value":620},{"type":41,"tag":109,"props":3280,"children":3281},{"style":481},[3282],{"type":46,"value":519},{"type":41,"tag":109,"props":3284,"children":3285},{"class":111,"line":893},[3286],{"type":41,"tag":109,"props":3287,"children":3288},{"emptyLinePlaceholder":525},[3289],{"type":46,"value":528},{"type":41,"tag":109,"props":3291,"children":3292},{"class":111,"line":902},[3293],{"type":41,"tag":109,"props":3294,"children":3295},{"style":137},[3296],{"type":46,"value":3297},"\u002F\u002F Update from live source (canvas, video)\n",{"type":41,"tag":109,"props":3299,"children":3300},{"class":111,"line":910},[3301,3306,3310,3315,3320],{"type":41,"tag":109,"props":3302,"children":3303},{"style":487},[3304],{"type":46,"value":3305},"tex",{"type":41,"tag":109,"props":3307,"children":3308},{"style":481},[3309],{"type":46,"value":563},{"type":41,"tag":109,"props":3311,"children":3312},{"style":566},[3313],{"type":46,"value":3314},"update",{"type":41,"tag":109,"props":3316,"children":3317},{"style":487},[3318],{"type":46,"value":3319},"(videoElement)",{"type":41,"tag":109,"props":3321,"children":3322},{"style":481},[3323],{"type":46,"value":519},{"type":41,"tag":109,"props":3325,"children":3327},{"class":111,"line":3326},27,[3328],{"type":41,"tag":109,"props":3329,"children":3330},{"emptyLinePlaceholder":525},[3331],{"type":46,"value":528},{"type":41,"tag":109,"props":3333,"children":3335},{"class":111,"line":3334},28,[3336],{"type":41,"tag":109,"props":3337,"children":3338},{"style":137},[3339],{"type":46,"value":3340},"\u002F\u002F Clean up\n",{"type":41,"tag":109,"props":3342,"children":3344},{"class":111,"line":3343},29,[3345,3349,3353,3358,3362],{"type":41,"tag":109,"props":3346,"children":3347},{"style":487},[3348],{"type":46,"value":3305},{"type":41,"tag":109,"props":3350,"children":3351},{"style":481},[3352],{"type":46,"value":563},{"type":41,"tag":109,"props":3354,"children":3355},{"style":566},[3356],{"type":46,"value":3357},"dispose",{"type":41,"tag":109,"props":3359,"children":3360},{"style":487},[3361],{"type":46,"value":2180},{"type":41,"tag":109,"props":3363,"children":3364},{"style":481},[3365],{"type":46,"value":519},{"type":41,"tag":54,"props":3367,"children":3369},{"id":3368},"important-notes",[3370],{"type":46,"value":3371},"Important Notes",{"type":41,"tag":48,"props":3373,"children":3374},{},[3375,3381,3383,3389],{"type":41,"tag":3376,"props":3377,"children":3378},"strong",{},[3379],{"type":46,"value":3380},"WGSL Alignment",{"type":46,"value":3382},": ",{"type":41,"tag":105,"props":3384,"children":3386},{"className":3385},[],[3387],{"type":46,"value":3388},"array\u003Cvec3f>",{"type":46,"value":3390}," has 16-byte stride, not 12. Always pad to 16 bytes:",{"type":41,"tag":97,"props":3392,"children":3394},{"className":463,"code":3393,"language":465,"meta":102,"style":102},"\u002F\u002F Correct: [x, y, z, 0.0] per element\nconst buffer = ctx.storage(count * 16);\n",[3395],{"type":41,"tag":105,"props":3396,"children":3397},{"__ignoreMap":102},[3398,3406],{"type":41,"tag":109,"props":3399,"children":3400},{"class":111,"line":112},[3401],{"type":41,"tag":109,"props":3402,"children":3403},{"style":137},[3404],{"type":46,"value":3405},"\u002F\u002F Correct: [x, y, z, 0.0] per element\n",{"type":41,"tag":109,"props":3407,"children":3408},{"class":111,"line":133},[3409,3413,3417,3421,3425,3429,3433,3438,3443,3447,3451],{"type":41,"tag":109,"props":3410,"children":3411},{"style":666},[3412],{"type":46,"value":669},{"type":41,"tag":109,"props":3414,"children":3415},{"style":487},[3416],{"type":46,"value":2569},{"type":41,"tag":109,"props":3418,"children":3419},{"style":481},[3420],{"type":46,"value":679},{"type":41,"tag":109,"props":3422,"children":3423},{"style":487},[3424],{"type":46,"value":778},{"type":41,"tag":109,"props":3426,"children":3427},{"style":481},[3428],{"type":46,"value":563},{"type":41,"tag":109,"props":3430,"children":3431},{"style":566},[3432],{"type":46,"value":327},{"type":41,"tag":109,"props":3434,"children":3435},{"style":487},[3436],{"type":46,"value":3437},"(count ",{"type":41,"tag":109,"props":3439,"children":3440},{"style":481},[3441],{"type":46,"value":3442},"*",{"type":41,"tag":109,"props":3444,"children":3445},{"style":1262},[3446],{"type":46,"value":2321},{"type":41,"tag":109,"props":3448,"children":3449},{"style":487},[3450],{"type":46,"value":620},{"type":41,"tag":109,"props":3452,"children":3453},{"style":481},[3454],{"type":46,"value":519},{"type":41,"tag":48,"props":3456,"children":3457},{},[3458,3463],{"type":41,"tag":3376,"props":3459,"children":3460},{},[3461],{"type":46,"value":3462},"Particle Rendering",{"type":46,"value":3464},": Use instanced quads, not point-list (WebGPU points are always 1px)",{"type":41,"tag":48,"props":3466,"children":3467},{},[3468,3473],{"type":41,"tag":3376,"props":3469,"children":3470},{},[3471],{"type":46,"value":3472},"Texture References",{"type":46,"value":3474},": Target references stay valid after resize — no need to update uniforms",{"type":41,"tag":48,"props":3476,"children":3477},{},[3478,3483],{"type":41,"tag":3376,"props":3479,"children":3480},{},[3481],{"type":46,"value":3482},"Screen Readback",{"type":46,"value":3484},": Cannot read pixels from screen, only from render targets",{"type":41,"tag":54,"props":3486,"children":3488},{"id":3487},"examples",[3489],{"type":46,"value":3490},"Examples",{"type":41,"tag":48,"props":3492,"children":3493},{},[3494],{"type":46,"value":3495},"Full working examples extracted from the docs app:",{"type":41,"tag":66,"props":3497,"children":3498},{},[3499,3511,3522,3533,3544,3555,3566,3577,3588,3599],{"type":41,"tag":70,"props":3500,"children":3501},{},[3502,3509],{"type":41,"tag":3503,"props":3504,"children":3506},"a",{"href":3505},".\u002Fexamples\u002Fgradient.md",[3507],{"type":46,"value":3508},"Simple Gradient",{"type":46,"value":3510}," — The simplest possible shader — map UV coordinates to colors. This creates a gradient from black (bottom-left) to cyan (top-right).",{"type":41,"tag":70,"props":3512,"children":3513},{},[3514,3520],{"type":41,"tag":3503,"props":3515,"children":3517},{"href":3516},".\u002Fexamples\u002Fwave.md",[3518],{"type":46,"value":3519},"Animated Wave",{"type":46,"value":3521}," — A glowing sine wave with custom uniforms. The wave animates over time using globals.time.",{"type":41,"tag":70,"props":3523,"children":3524},{},[3525,3531],{"type":41,"tag":3503,"props":3526,"children":3528},{"href":3527},".\u002Fexamples\u002Fcolor-cycle.md",[3529],{"type":46,"value":3530},"Time-Based Color Cycling",{"type":46,"value":3532}," — A hypnotic pattern that cycles through colors over time. Combines time, distance, and angle for a mesmerizing effect.",{"type":41,"tag":70,"props":3534,"children":3535},{},[3536,3542],{"type":41,"tag":3503,"props":3537,"children":3539},{"href":3538},".\u002Fexamples\u002Fraymarching.md",[3540],{"type":46,"value":3541},"Raymarching Sphere",{"type":46,"value":3543}," — A basic 3D sphere rendered using raymarching. This demonstrates how to create 3D shapes and lighting entirely within a fragment shader.",{"type":41,"tag":70,"props":3545,"children":3546},{},[3547,3553],{"type":41,"tag":3503,"props":3548,"children":3550},{"href":3549},".\u002Fexamples\u002Fnoise.md",[3551],{"type":46,"value":3552},"Perlin-style Noise",{"type":46,"value":3554}," — Layered fractional Brownian motion (fBm) noise. This technique is fundamental for generating procedural textures, terrain, and natural-looking patterns.",{"type":41,"tag":70,"props":3556,"children":3557},{},[3558,3564],{"type":41,"tag":3503,"props":3559,"children":3561},{"href":3560},".\u002Fexamples\u002Fmetaballs.md",[3562],{"type":46,"value":3563},"Metaballs",{"type":46,"value":3565}," — Organic-looking \"blobs\" that merge together based on an implicit surface. This effect uses a distance-based field and a threshold to create smooth blending.",{"type":41,"tag":70,"props":3567,"children":3568},{},[3569,3575],{"type":41,"tag":3503,"props":3570,"children":3572},{"href":3571},".\u002Fexamples\u002Ffractal.md",[3573],{"type":46,"value":3574},"Mandelbrot Set",{"type":46,"value":3576}," — The classic complex number fractal. This shader computes the set by iterating z = z² + c and mapping the escape time to vibrant colors.",{"type":41,"tag":70,"props":3578,"children":3579},{},[3580,3586],{"type":41,"tag":3503,"props":3581,"children":3583},{"href":3582},".\u002Fexamples\u002Falien-planet.md",[3584],{"type":46,"value":3585},"Alien Planet",{"type":46,"value":3587}," — A procedurally generated alien world with atmospheric scattering and an orbiting moon. Uses raymarching with fBm noise for terrain detail.",{"type":41,"tag":70,"props":3589,"children":3590},{},[3591,3597],{"type":41,"tag":3503,"props":3592,"children":3594},{"href":3593},".\u002Fexamples\u002Ffluid.md",[3595],{"type":46,"value":3596},"Fluid Simulation",{"type":46,"value":3598}," — Real-time Navier-Stokes fluid simulation using ping-pong buffers, vorticity confinement, and pressure projection.",{"type":41,"tag":70,"props":3600,"children":3601},{},[3602,3608],{"type":41,"tag":3503,"props":3603,"children":3605},{"href":3604},".\u002Fexamples\u002Ftriangle-particles.md",[3606],{"type":46,"value":3607},"Triangle Particles",{"type":46,"value":3609}," — GPU-driven particle system with SDF-based physics. 30,000 particles spawn on triangle edges and flow along a signed distance field with chromatic aberration postprocessing.",{"type":41,"tag":54,"props":3611,"children":3613},{"id":3612},"resources",[3614],{"type":46,"value":3615},"Resources",{"type":41,"tag":66,"props":3617,"children":3618},{},[3619,3630,3640],{"type":41,"tag":70,"props":3620,"children":3621},{},[3622],{"type":41,"tag":3503,"props":3623,"children":3627},{"href":3624,"rel":3625},"https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fralph-gpu",[3626],"nofollow",[3628],{"type":46,"value":3629},"GitHub Repository",{"type":41,"tag":70,"props":3631,"children":3632},{},[3633],{"type":41,"tag":3503,"props":3634,"children":3637},{"href":3635,"rel":3636},"https:\u002F\u002Fralph-gpu.dev\u002Fdocs",[3626],[3638],{"type":46,"value":3639},"API Documentation",{"type":41,"tag":70,"props":3641,"children":3642},{},[3643],{"type":41,"tag":3503,"props":3644,"children":3647},{"href":3645,"rel":3646},"https:\u002F\u002Fgpuweb.github.io\u002Fgpuweb\u002F",[3626],[3648],{"type":46,"value":3649},"WebGPU Specification",{"type":41,"tag":3651,"props":3652,"children":3653},"style",{},[3654],{"type":46,"value":3655},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3657,"total":3827},[3658,3676,3688,3700,3715,3732,3744,3757,3770,3783,3795,3814],{"slug":3659,"name":3659,"fn":3660,"description":3661,"org":3662,"tags":3663,"stars":3673,"repoUrl":3674,"updatedAt":3675},"agent-browser","automate browser interactions for AI agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3664,3667,3670],{"name":3665,"slug":3666,"type":15},"Agents","agents",{"name":3668,"slug":3669,"type":15},"Automation","automation",{"name":3671,"slug":3672,"type":15},"Browser Automation","browser-automation",38346,"https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fagent-browser","2026-07-20T05:55:17.314329",{"slug":3677,"name":3677,"fn":3678,"description":3679,"org":3680,"tags":3681,"stars":3673,"repoUrl":3674,"updatedAt":3687},"agentcore","run browser automation on AWS Bedrock","Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include \"use agentcore\", \"run on AWS\", \"cloud browser with AWS\", \"bedrock browser\", \"agentcore session\", or any task requiring AWS-hosted browser automation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3682,3683,3686],{"name":3668,"slug":3669,"type":15},{"name":3684,"slug":3685,"type":15},"AWS","aws",{"name":3671,"slug":3672,"type":15},"2026-07-17T06:08:33.665276",{"slug":3689,"name":3689,"fn":3690,"description":3691,"org":3692,"tags":3693,"stars":3673,"repoUrl":3674,"updatedAt":3699},"core","navigate and interact with web pages","Core agent-browser usage guide. Read this before running any agent-browser commands. Covers the snapshot-and-ref workflow, navigating pages, interacting with elements (click, fill, type, select), extracting text and data, taking screenshots, managing tabs, handling forms and auth, waiting for content, running multiple browser sessions in parallel, and troubleshooting common failures. Use when the user asks to interact with a website, fill a form, click something, extract data, take a screenshot, log into a site, test a web app, or automate any browser task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3694,3695,3696],{"name":3665,"slug":3666,"type":15},{"name":3671,"slug":3672,"type":15},{"name":3697,"slug":3698,"type":15},"Navigation","navigation","2026-07-26T05:47:42.378419",{"slug":3701,"name":3701,"fn":3702,"description":3703,"org":3704,"tags":3705,"stars":3673,"repoUrl":3674,"updatedAt":3714},"derive-client","reverse engineer internal APIs from browser traffic","Reverse-engineer a website's internal API by recording browser traffic into a HAR file, then generate a standalone client or CLI that calls the endpoints directly, with no browser needed after the first recording. Use when asked to \"derive a client\", \"build a CLI for \u003Csite>\", \"reverse engineer this site's API\", \"record network requests\", \"turn this site into an API\", or when the same site will be automated repeatedly and direct HTTP calls would beat driving the browser every time.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3706,3709,3710,3711],{"name":3707,"slug":3708,"type":15},"API Development","api-development",{"name":3668,"slug":3669,"type":15},{"name":3671,"slug":3672,"type":15},{"name":3712,"slug":3713,"type":15},"Web Scraping","web-scraping","2026-07-20T06:24:11.928835",{"slug":3716,"name":3716,"fn":3717,"description":3718,"org":3719,"tags":3720,"stars":3673,"repoUrl":3674,"updatedAt":3731},"dogfood","perform exploratory testing on web applications","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3721,3722,3725,3728],{"name":3671,"slug":3672,"type":15},{"name":3723,"slug":3724,"type":15},"Debugging","debugging",{"name":3726,"slug":3727,"type":15},"QA","qa",{"name":3729,"slug":3730,"type":15},"Testing","testing","2026-07-17T06:07:41.421482",{"slug":3733,"name":3733,"fn":3734,"description":3735,"org":3736,"tags":3737,"stars":3673,"repoUrl":3674,"updatedAt":3743},"electron","automate Electron desktop applications","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3738,3739,3740],{"name":3665,"slug":3666,"type":15},{"name":3671,"slug":3672,"type":15},{"name":3741,"slug":3742,"type":15},"Desktop","desktop","2026-07-17T06:08:28.007783",{"slug":3745,"name":3745,"fn":3746,"description":3747,"org":3748,"tags":3749,"stars":3673,"repoUrl":3674,"updatedAt":3756},"slack","interact with Slack workspaces","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3750,3751,3754],{"name":3671,"slug":3672,"type":15},{"name":3752,"slug":3753,"type":15},"Messaging","messaging",{"name":3755,"slug":3745,"type":15},"Slack","2026-07-17T06:08:27.679015",{"slug":3758,"name":3758,"fn":3759,"description":3760,"org":3761,"tags":3762,"stars":3673,"repoUrl":3674,"updatedAt":3769},"vercel-sandbox","run browser automation in Vercel Sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3763,3764,3765,3766],{"name":3668,"slug":3669,"type":15},{"name":3671,"slug":3672,"type":15},{"name":3729,"slug":3730,"type":15},{"name":3767,"slug":3768,"type":15},"Vercel","vercel","2026-07-17T06:08:28.349899",{"slug":3771,"name":3771,"fn":3772,"description":3773,"org":3774,"tags":3775,"stars":3780,"repoUrl":3781,"updatedAt":3782},"deploy-to-vercel","deploy applications to Vercel","Deploy applications and websites to Vercel. Use when the user requests deployment actions like \"deploy my app\", \"deploy and give me the link\", \"push this live\", or \"create a preview deployment\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3776,3779],{"name":3777,"slug":3778,"type":15},"Deployment","deployment",{"name":3767,"slug":3768,"type":15},28993,"https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fagent-skills","2026-07-17T06:08:41.18374",{"slug":3784,"name":3784,"fn":3785,"description":3786,"org":3787,"tags":3788,"stars":3780,"repoUrl":3781,"updatedAt":3794},"vercel-cli-with-tokens","manage Vercel projects via CLI","Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. \"deploy to vercel\", \"set up vercel\", \"add environment variables to vercel\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3789,3792,3793],{"name":3790,"slug":3791,"type":15},"CLI","cli",{"name":3777,"slug":3778,"type":15},{"name":3767,"slug":3768,"type":15},"2026-07-17T06:08:41.84179",{"slug":3796,"name":3796,"fn":3797,"description":3798,"org":3799,"tags":3800,"stars":3780,"repoUrl":3781,"updatedAt":3813},"vercel-composition-patterns","implement scalable React composition patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3801,3804,3807,3810],{"name":3802,"slug":3803,"type":15},"Best Practices","best-practices",{"name":3805,"slug":3806,"type":15},"Frontend","frontend",{"name":3808,"slug":3809,"type":15},"React","react",{"name":3811,"slug":3812,"type":15},"UI Components","ui-components","2026-07-17T06:05:40.576913",{"slug":3815,"name":3815,"fn":3816,"description":3817,"org":3818,"tags":3819,"stars":3780,"repoUrl":3781,"updatedAt":3826},"vercel-optimize","optimize Vercel project performance and costs","Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel\u002Fframework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3820,3823,3824,3825],{"name":3821,"slug":3822,"type":15},"Cost Optimization","cost-optimization",{"name":3777,"slug":3778,"type":15},{"name":13,"slug":14,"type":15},{"name":3767,"slug":3768,"type":15},"2026-07-17T06:04:08.327515",100,{"items":3829,"total":112},[3830],{"slug":4,"name":4,"fn":5,"description":6,"org":3831,"tags":3832,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3833,3834,3835,3836],{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15}]