{
  "id": "ripple-grid",
  "kind": "element",
  "title": "Ripple grid",
  "summary": "A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.",
  "url": "https://enrichr.dev/elements/ripple-grid.html",
  "section": "background",
  "techniques": [
    "pointer-interaction"
  ],
  "stack": [
    "Canvas 2D",
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "playful",
    "energetic",
    "technical"
  ],
  "intents": [
    "ripple grid background",
    "click ripple dot grid",
    "pointer wave through dots",
    "interactive dot matrix ripple",
    "canvas grid wave effect"
  ],
  "status": "tested",
  "params": [
    {
      "key": "text",
      "label": "Caption",
      "type": "text",
      "value": "Move, click, ripple"
    },
    {
      "key": "shape",
      "label": "Cell shape",
      "type": "select",
      "options": [
        "dots",
        "squares"
      ],
      "value": "dots"
    },
    {
      "key": "cell",
      "label": "Cell size (px)",
      "type": "range",
      "min": 14,
      "max": 48,
      "step": 2,
      "value": 24
    },
    {
      "key": "speed",
      "label": "Wave speed",
      "type": "range",
      "min": 0.4,
      "max": 2,
      "step": 0.1,
      "value": 1
    },
    {
      "key": "accent",
      "label": "Wave colour",
      "type": "color",
      "value": "#e6ff55"
    }
  ],
  "license": "Free to use in personal and client projects during the preview. Final licence terms will be published here before any paid tier starts; ask before reselling the code as a collection.",
  "contract": "function mount(root, opts) -> { update(partialOpts), destroy() }; root must contain the element markup",
  "exports": {
    "claude": "Add the \"Ripple grid\" element to this project.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSteps:\n1. Look at the project first to see its framework and where components, styles and static files live. Follow its conventions.\n2. Fetch https://enrichr.dev/elements/ripple-grid.json if you can read URLs (fields: source.markup, source.css, source.js, params); otherwise use the source at the end of this message.\n3. Add the files, mount it where I tell you (default: the top of the home page), and pass the settings below as the opts.\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n5. Run the dev server and check it. with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "chatgpt": "I want the \"Ripple grid\" element on my website. Below is its complete source. Please:\n1. Build one self-contained index.html that I can open locally to see it working (put the CSS in a <style> tag and the JavaScript in a <script> tag, with the markup in the body).\n2. Then explain, step by step, which parts go where in my own site, and how to mount it. My stack is: [tell me yours, or say \"plain HTML\"].\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "cursor": "Add the \"Ripple grid\" element to this codebase.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nUse Composer / agent mode. First search the repo for how components, styles and scripts are organised, then add the files in the matching places, mount it on the page I name, and run the app to confirm it works. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nOptional: save this as .cursor/rules/enrichr-ripple-grid.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Ripple grid element\nalwaysApply: false\n---\nmount(root, opts) expects the element markup inside root and returns { update, destroy }. Always call destroy() on unmount and never edit the ef- class names.",
    "v0": "Create a Next.js (App Router) client component for the \"Ripple grid\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- ripple-grid.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nUse this component as the wrapper (adjust the import paths):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./ripple-grid\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RippleGrid(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRender it on the home page so I can see it. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "lovable": "Add the \"Ripple grid\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- ripple-grid.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nWrapper component (src/components/RippleGrid.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./ripple-grid\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RippleGrid(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRemove the \"use client\" line if it is not needed. Show it on the home page. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "bolt": "Create a small Vite project (vanilla JavaScript, no framework unless I already have one) that shows the \"Ripple grid\" element.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, then a script tag), style.css (the CSS below), ripple-grid.js (the JavaScript below) and main.js that sets the container's innerHTML to the markup and calls mount(container, opts) with the settings below. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "replit": "Create a new HTML, CSS and JavaScript Repl that shows the \"Ripple grid\" element. No packages, no server code.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, link style.css, load ripple-grid.js and then main.js), style.css (the CSS below), ripple-grid.js (the JavaScript below), main.js (sets the container's innerHTML to the markup, then calls mount(container, opts) with the settings below). Press Run to preview. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "figma": "Designer handoff notes for the \"Ripple grid\" element (Enrichr Library). Figma cannot run this JavaScript inside a design file, so use it as a motion reference and hand the code to a developer.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nWhat it does: The canvas is redrawn each frame as a grid of cells. Each ripple stores its origin and start time; its ring radius is age times speed. For every cell the script measures the distance to the ring and adds a Gaussian bump centred on it, scaled by a fade that falls with age. Several ripples add together. The summed value drives cell radius (small dot to large) and colour (deep green, through mid green, to the wave colour, then cream at the peak). Moving the pointer spawns a small ripple every couple of cells of travel; a click spawns a large one. Old ripples are dropped once they have faded.\nAccessibility: The canvas is decorative and hidden from assistive tech. With prefers-reduced-motion the grid draws one still frame with ripples caught mid-flight and ignores the pointer. The effect is pointer-only, so keep real content or actions outside the canvas.\n\nTunable settings:\n- Caption: text, default Move, click, ripple\n- Cell shape: select (o / q), default dots\n- Cell size (px): range 14 to 48, step 2, default 24\n- Wave speed: range 0.4 to 2, step 0.1, default 1\n- Wave colour: color, default #e6ff55\n\nCurrent settings:\n{{SETTINGS}}\n\nFor the developer: Element contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nIn Figma:\n- Draw the resting state as a frame and the end state as a second frame; link them with Smart Animate to show the motion in a prototype.\n- Put the settings above in the frame's notes or Dev Mode annotations so the developer matches them.\n- Link https://enrichr.dev/elements/ripple-grid.html in the handoff: the live demo and the copy-ready code are there. Developers can paste the prompts for Claude, Cursor or v0 from the Export menu.\nNothing is copied from another designer's file; this is original code from Enrichr.",
    "framer": "Add the \"Ripple grid\" element to Framer as a code component. Framer code components are React, so wrap the vanilla code like this. Check it in the Framer editor, as Framer's component API can change.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. In Framer: Assets > Code > New component. Name it RippleGrid.\n2. Paste the JavaScript below into a separate code file named ripple-grid.js in the same project, with  export { mount };  and  export const markup = \"<the markup string>\";  added. Put the CSS into the component as a <style> tag.\n3. Component:\n```tsx\nimport { addPropertyControls, ControlType } from \"framer\"\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./ripple-grid\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RippleGrid(props: any) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n\naddPropertyControls(RippleGrid, {\n  text: { type: ControlType.String, title: \"Caption\", defaultValue: \"Move, click, ripple\" },\n  shape: { type: ControlType.Enum, title: \"Cell shape\", options: [\"d\",\"s\"], optionTitles: [\"o\",\"q\"], defaultValue: \"dots\" },\n  cell: { type: ControlType.Number, title: \"Cell size\", min: 14, max: 48, step: 2, defaultValue: 24 },\n  speed: { type: ControlType.Number, title: \"Wave speed\", min: 0.4, max: 2, step: 0.1, defaultValue: 1 },\n  accent: { type: ControlType.Color, title: \"Wave colour\", defaultValue: \"#e6ff55\" },\n})\n```\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "webflow": "Add the \"Ripple grid\" element to a Webflow site with an Embed element. Test it on the published or preview site: scripts in embeds may not run inside the Designer canvas.\n\nThis is the \"Ripple grid\" element from the Enrichr Library: A canvas grid of dots or squares where pointer movement and clicks send circular ripples outward, scaling and brightening cells as each wave passes, with floating puzzle pieces on top.\nPage: https://enrichr.dev/elements/ripple-grid.html\nMachine-readable spec: https://enrichr.dev/elements/ripple-grid.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. Add an Embed element where it should appear. Paste a <style> block with the CSS, one container <div id=\"enrichr-ripple-grid\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-ripple-grid\"), { ...your settings... });\n   (set the container's innerHTML to the markup first, as in the contract).\n2. Embed elements have a size limit (check Webflow's current number). If the code is longer, host the JS and CSS as files and link them from Custom code in the page settings, then keep only the container and the mount call in the Embed.\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}"
  },
  "exportTools": [
    "claude",
    "chatgpt",
    "cursor",
    "v0",
    "lovable",
    "bolt",
    "replit",
    "figma",
    "framer",
    "webflow"
  ],
  "accessibility": "The canvas is decorative and hidden from assistive tech. With prefers-reduced-motion the grid draws one still frame with ripples caught mid-flight and ignores the pointer. The effect is pointer-only, so keep real content or actions outside the canvas.",
  "performance": "Cost is cells times live ripples per frame, capped at 14 ripples; a 520px box at 24px cells is about 500 cells. Larger cells are cheaper. It pauses off-screen and caps the pixel ratio at 2.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/dPvwjxe",
  "source": {
    "markup": "<div class=\"ef-rpg\">\n  <div class=\"ef-rpg__wrap\">\n    <canvas class=\"ef-rpg__cv\" aria-hidden=\"true\"></canvas>\n    <svg width=\"0\" height=\"0\" aria-hidden=\"true\" focusable=\"false\" style=\"position:absolute\">\n      <symbol id=\"rpg-puzzlePiece1\" viewBox=\"1513.7 1453.9 322.3 322.3\"><path fill=\"currentColor\" d=\"M1821 1761.2h-292.3v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5.1 7.8 8.6 19.7 13.6 32.7 11.9 16.8-2.3 30.1-16 32-32.7 2.5-22.6-15.1-41.6-37.1-41.6-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.4-14.5-14.4v-111.7h292.3v111.7c0 8-6.4 14.4-14.5 14.4-4.2 0-8.1-1.8-10.9-5-7.9-8.6-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.6 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5z\"/></symbol>\n      <symbol id=\"rpg-puzzlePiece4\" viewBox=\"1423.36 860.8 503.07 322.3\"><path fill=\"currentColor\" d=\"M1821 875.8v111.6c0 8 6.5 14.5 14.5 14.5 4.2 0 8.1-1.9 10.9-5 6.8-7.5 16.7-12.3 27.7-12.3 22 0 39.6 19 37.1 41.6-1.9 16.7-15.2 30.5-32 32.7-13 1.7-24.8-3.3-32.7-11.9-2.8-3.2-6.8-5-11-5-8 0-14.5 6.4-14.5 14.4v111.7h-111.6c-8 0-14.5-6.5-14.5-14.5 0-4.2 1.9-8.2 5-11 8.7-7.9 13.7-19.7 12-32.7-2.3-16.8-16-30.1-32.8-32-22.5-2.5-41.5 15.1-41.5 37.1 0 11 4.7 20.9 12.3 27.7 3.1 2.8 4.9 6.7 4.9 10.8v0.1c0 8-6.4 14.5-14.5 14.5h-111.6v-111.7c0-8-6.4-14.4-14.5-14.4-4.1 0-8 1.8-10.8 4.9-6.9 7.6-16.7 12.3-27.7 12.3-22 0-39.6-19-37.1-41.6 1.9-16.7 15.2-30.4 32-32.7 13-1.7 24.8 3.3 32.7 11.9 2.8 3.2 6.7 5.1 10.9 5.1 8.1 0 14.5-6.5 14.5-14.5v-111.6z\"/></symbol>\n      <symbol id=\"rpg-puzzlePiece8\" viewBox=\"1513.7 166.86 322.3 503.06\"><path fill=\"currentColor\" d=\"M1528.7 564.5v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5 7.8 8.7 19.7 13.7 32.7 11.9 16.8-2.2 30.1-15.9 32-32.7 2.5-22.5-15.1-41.5-37.1-41.5-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.5-14.5-14.5v-111.6h111.6c8.1 0 14.5-6.5 14.5-14.5 0-4.1-1.8-8.1-4.9-10.9-7.6-6.8-12.3-16.6-12.3-27.6 0-22 19-39.6 41.5-37.1 16.8 1.8 30.5 15.2 32.8 32 1.7 12.9-3.3 24.8-12 32.7-3.1 2.8-5 6.7-5 10.9 0 8 6.5 14.5 14.5 14.5h111.6v111.6c0 8-6.4 14.5-14.5 14.5-4.2 0-8.1-1.9-10.9-5-7.9-8.7-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.5 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5v111.6h-111.6c-8 0-14.5 6.5-14.5 14.5 0 4.2 1.9 8.1 5 10.9 7.5 6.8 12.3 16.7 12.3 27.7 0 22-19 39.5-41.6 37.1-16.8-1.9-30.5-15.3-32.7-32-1.7-13 3.3-24.9 11.9-32.7 3.1-2.9 5-6.8 5-11 0-8-6.4-14.5-14.5-14.5z\"/></symbol>\n    </svg>\n    <div class=\"ef-rpg__art\" aria-hidden=\"true\">\n      <svg class=\"ef-rpg__pz ef-rpg__pz--a\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#rpg-puzzlePiece1\" width=\"1\" height=\"1\"/></svg>\n      <svg class=\"ef-rpg__pz ef-rpg__pz--b\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#rpg-puzzlePiece4\" width=\"1\" height=\"1\"/></svg>\n      <svg class=\"ef-rpg__pz ef-rpg__pz--c\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#rpg-puzzlePiece8\" width=\"1\" height=\"1\"/></svg>\n    </div>\n    <p class=\"ef-rpg__txt\"></p>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-rpg { width: 100%; height: 100%; min-height: 18rem; }\n.ef-rpg__wrap { position: relative; box-sizing: border-box; width: 100%; height: 100%; min-height: 18rem; overflow: hidden; border-radius: 1rem; background: #0c1e18; color: #fbf8f1; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; isolation: isolate; touch-action: pan-y; }\n.ef-rpg__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }\n.ef-rpg__art { position: absolute; inset: 0; pointer-events: none; }\n.ef-rpg__pz { position: absolute; display: block; opacity: 0.92; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); animation: ef-rpg-float 8s ease-in-out infinite; transform: rotate(var(--r, 0deg)); }\n.ef-rpg__pz--a { width: 4.6rem; height: 4.6rem; right: 14%; bottom: 16%; --r: 11deg; color: #e6ff55; }\n.ef-rpg__pz--b { width: 7.4rem; height: 4.8rem; left: 8%; top: 12%; --r: -8deg; color: #fbf8f1; animation-delay: -3s; }\n.ef-rpg__pz--c { width: 3.6rem; height: 5.6rem; right: 8%; top: 10%; --r: 16deg; color: #2f7d5b; animation-delay: -5.5s; }\n.ef-rpg__txt { position: absolute; left: 1.3rem; bottom: 1.1rem; margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; color: #fbf8f1; text-shadow: 0 2px 12px rgba(12, 30, 24, 0.9); pointer-events: none; }\n.ef-rpg__txt:empty { display: none; }\n@keyframes ef-rpg-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.6rem; } }\n@media (prefers-reduced-motion: reduce) { .ef-rpg__pz { animation: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Ripple grid: a canvas 2D field of dots or squares. Moving the pointer sends small circular ripples out through the grid, a click sends\n// a big one; cells scale up and shift from deep green toward lime and cream as the wave passes. Reduced motion draws one still frame.\n// Pauses off-screen. mount(root, { text, cell (14-48 px), shape (\"dots\"|\"squares\"), speed (0.4-2), strength (0.3-1.5), accent })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var wrap = root.querySelector(\".ef-rpg__wrap\");\n  var cv = root.querySelector(\".ef-rpg__cv\");\n  var txt = root.querySelector(\".ef-rpg__txt\");\n  var ctx = cv.getContext(\"2d\");\n  var opts = {}, W = 0, H = 0, dpr = 1, raf = 0, visible = true, dead = false;\n  var ripples = [], last = 0, lastSpawn = { x: -999, y: -999, t: 0 };\n  var BASE = [10, 76, 54], MID = [47, 125, 91], LIME = [198, 242, 107], CREAM = [251, 248, 241];\n\n  function hex(h) { h = h.replace(\"#\", \"\"); if (h.length === 3) h = h.replace(/(.)/g, \"$1$1\"); var n = parseInt(h, 16); return [(n >> 16) & 255, (n >> 8) & 255, n & 255]; }\n  function mix(a, b, t) { return [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t]; }\n  function size() {\n    var r = wrap.getBoundingClientRect();\n    dpr = Math.min(window.devicePixelRatio || 1, 2);\n    W = Math.max(1, r.width); H = Math.max(1, r.height);\n    cv.width = Math.round(W * dpr); cv.height = Math.round(H * dpr);\n  }\n  function spawn(x, y, amp, now) { ripples.push({ x: x, y: y, t: now, a: amp }); if (ripples.length > 14) ripples.shift(); }\n\n  function render(now) {\n    ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n    ctx.fillStyle = \"#0c1e18\"; ctx.fillRect(0, 0, W, H);\n    var cs = opts.cell, cols = Math.ceil(W / cs) + 1, rows = Math.ceil(H / cs) + 1;\n    var ox = (W - (cols - 1) * cs) / 2, oy = (H - (rows - 1) * cs) / 2;\n    var acc = hex(opts.accent), sp = 260 * opts.speed, wid = cs * 2.2, life = 1.9 / Math.max(0.5, opts.speed * 0.8);\n    var live = [];\n    for (var k = 0; k < ripples.length; k++) {\n      var age = (now - ripples[k].t) / 1000;\n      if (age < life) live.push({ x: ripples[k].x, y: ripples[k].y, r: age * sp, f: Math.pow(1 - age / life, 1.5) * ripples[k].a * opts.strength });\n    }\n    if (!reduce) ripples = ripples.filter(function (r) { return (now - r.t) / 1000 < life; });\n    var sq = opts.shape === \"squares\";\n    for (var j = 0; j < rows; j++) for (var i = 0; i < cols; i++) {\n      var x = ox + i * cs, y = oy + j * cs, w = 0;\n      for (var m = 0; m < live.length; m++) {\n        var p = live[m], dx = x - p.x, dy = y - p.y, d = Math.sqrt(dx * dx + dy * dy) - p.r;\n        w += p.f * Math.exp(-(d * d) / (wid * wid));\n      }\n      if (w > 1.4) w = 1.4;\n      var col = w < 0.6 ? mix(BASE, MID, w / 0.6) : mix(mix(MID, acc, Math.min(1, (w - 0.6) / 0.4)), CREAM, Math.max(0, (w - 1) / 0.4) * 0.8);\n      var rad = cs * (0.12 + w * 0.3);\n      ctx.fillStyle = \"rgb(\" + (col[0] | 0) + \",\" + (col[1] | 0) + \",\" + (col[2] | 0) + \")\";\n      if (sq) { ctx.fillRect(x - rad, y - rad, rad * 2, rad * 2); }\n      else { ctx.beginPath(); ctx.arc(x, y, rad, 0, 6.2832); ctx.fill(); }\n    }\n    return live.length;\n  }\n  function frame(now) {\n    raf = 0;\n    if (dead || !visible) return;\n    render(now);\n    raf = requestAnimationFrame(frame);\n  }\n  function start() { if (!raf && !reduce && !dead && visible) raf = requestAnimationFrame(frame); }\n  function stop() { if (raf) { cancelAnimationFrame(raf); raf = 0; } }\n  function still() {\n    if (!reduce) return;\n    // one frozen frame: a ripple caught mid-flight near the centre\n    var t = performance.now();\n    ripples = [{ x: W * 0.42, y: H * 0.45, t: t - 700, a: 1 }, { x: W * 0.72, y: H * 0.7, t: t - 1100, a: 0.8 }];\n    render(t); ripples = [];\n  }\n\n  function pos(e) { var r = wrap.getBoundingClientRect(); return { x: e.clientX - r.left, y: e.clientY - r.top }; }\n  function onMove(e) {\n    if (reduce) return;\n    var p = pos(e), now = performance.now();\n    var d = Math.hypot(p.x - lastSpawn.x, p.y - lastSpawn.y);\n    if (d > opts.cell * 1.6 && now - lastSpawn.t > 60) { spawn(p.x, p.y, 0.55, now); lastSpawn = { x: p.x, y: p.y, t: now }; }\n  }\n  function onDown(e) { if (reduce) return; var p = pos(e); spawn(p.x, p.y, 1.5, performance.now()); }\n\n  var io = new IntersectionObserver(function (es) { visible = es[0].isIntersecting; if (visible) start(); else stop(); });\n  var ro = new ResizeObserver(function () { size(); still(); });\n  cv.addEventListener(\"pointermove\", onMove);\n  cv.addEventListener(\"pointerdown\", onDown);\n  io.observe(wrap); ro.observe(wrap);\n\n  function update(next) {\n    opts = Object.assign({ text: \"Move, click, ripple\", cell: 24, shape: \"dots\", speed: 1, strength: 1, accent: \"#e6ff55\" }, opts, next || {});\n    opts.cell = Math.max(14, Math.min(48, +opts.cell));\n    opts.speed = Math.max(0.4, Math.min(2, +opts.speed));\n    opts.strength = Math.max(0.3, Math.min(1.5, +opts.strength));\n    txt.textContent = opts.text;\n    size();\n    if (reduce) still(); else if (!raf) render(performance.now());\n  }\n  update(o);\n  if (!reduce) spawn(W * 0.5, H * 0.5, 1.2, performance.now());\n  start();\n  return {\n    update: update,\n    destroy: function () {\n      dead = true; stop();\n      cv.removeEventListener(\"pointermove\", onMove);\n      cv.removeEventListener(\"pointerdown\", onDown);\n      io.disconnect(); ro.disconnect(); ripples = [];\n    }\n  };\n}"
  }
}