{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"neural-brain","type":"registry:component","title":"Neural Brain","description":"A brain drawn as a dense web of neurons that blink softly and fire, with signals that can race from neuron to neuron in chain reactions. It sways to show its depth and fires wherever you hover or click.","dependencies":[],"files":[{"path":"registry/dot/neural-brain.tsx","type":"registry:component","target":"components/dot/neural-brain.tsx","content":"\"use client\";\n\nimport { useEffect, useMemo, useRef, type CSSProperties } from \"react\";\n\nexport interface NeuralBrainProps {\n  /** Neurons in the network (300–1400) */\n  nodes?: number;\n  /** Neurons that fire on their own, per second (0 keeps it quiet until you touch it) */\n  activity?: number;\n  /** How far a signal travels (0–1): the chance each connection passes it on */\n  spread?: number;\n  /** Speed of the signals along the connections */\n  speed?: number;\n  /** Neurons blink softly at random */\n  blink?: boolean;\n  /** Turn gently from side to side, showing its depth */\n  sway?: boolean;\n  /** Hovering fires the neurons under the pointer; a click fires a burst */\n  interactive?: boolean;\n  /** Neurons and connections */\n  color?: string;\n  /** Firing neurons and travelling signals */\n  pulseColor?: string;\n  /** Opacity of the resting connections (0–1) */\n  lineOpacity?: number;\n  /** CSS background; \"transparent\" to sit on your page */\n  background?: string;\n  /** Same seed, same brain */\n  seed?: number;\n  /** Accessible description */\n  label?: string;\n  className?: string;\n  style?: CSSProperties;\n}\n\n// ─── Shape: a side view facing left, in a 1 × 0.86 box (y down) ──────────────\n\nconst CORTEX: [number, number][] = [\n  [0.07, 0.53], [0.035, 0.44], [0.035, 0.33], [0.075, 0.22], [0.15, 0.13], [0.25, 0.065], [0.37, 0.025], [0.5, 0.015],\n  [0.62, 0.035], [0.73, 0.08], [0.83, 0.15], [0.91, 0.25], [0.96, 0.37], [0.965, 0.47], [0.93, 0.56], [0.87, 0.6],\n  [0.78, 0.6], [0.68, 0.625], [0.56, 0.655], [0.44, 0.66], [0.34, 0.635], [0.27, 0.585], [0.235, 0.545], [0.2, 0.52],\n  [0.15, 0.55], [0.1, 0.56],\n];\nconst CEREBELLUM = { x: 0.775, y: 0.665, rx: 0.13, ry: 0.07 };\nconst STEM = { x1: 0.6, y1: 0.63, x2: 0.65, y2: 0.84, w: 0.035 };\n// Denser clusters, like the bright knots in a real scan\nconst HUBS = [\n  { x: 0.24, y: 0.3, s: 0.06, w: 0.13 },\n  { x: 0.48, y: 0.2, s: 0.07, w: 0.06 },\n  { x: 0.72, y: 0.42, s: 0.06, w: 0.05 },\n];\n\nfunction mulberry32(seed: number) {\n  let a = seed >>> 0;\n  return () => {\n    a = (a + 0x6d2b79f5) >>> 0;\n    let t = a;\n    t = Math.imul(t ^ (t >>> 15), t | 1);\n    t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n  };\n}\n\nfunction inPolygon(x: number, y: number, poly: [number, number][]) {\n  let inside = false;\n  for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {\n    const [xi, yi] = poly[i];\n    const [xj, yj] = poly[j];\n    if (yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) inside = !inside;\n  }\n  return inside;\n}\n\ninterface Brain {\n  /** x, y, z per neuron (x 0–1, y 0–0.86, z depth around 0) */\n  pos: Float32Array;\n  /** Per neuron: size between 0 and 1 */\n  size: Float32Array;\n  /** Connections as pairs of neuron indices */\n  edges: Uint16Array;\n  /** Per neuron: [neighbour, edge index] */\n  adj: [number, number][][];\n}\n\nfunction buildBrain(count: number, seed: number): Brain {\n  const rand = mulberry32(seed);\n  const gauss = () => Math.sqrt(-2 * Math.log(rand() + 1e-9)) * Math.cos(2 * Math.PI * rand());\n  const xs: number[] = [];\n  const ys: number[] = [];\n  const zs: number[] = [];\n  const sizes: number[] = [];\n  const keys = new Set<number>();\n  const list: number[] = [];\n  const add = (x: number, y: number, z: number) => {\n    xs.push(x);\n    ys.push(y);\n    zs.push(z);\n    sizes.push(rand() ** 3);\n    return xs.length - 1;\n  };\n  const link = (a: number, b: number) => {\n    const key = a < b ? a * 65536 + b : b * 65536 + a;\n    if (a === b || keys.has(key)) return;\n    keys.add(key);\n    list.push(a, b);\n  };\n  // The brain is roughly an ellipsoid; this is its half-depth at a point of the side view\n  const depth = (x: number, y: number) =>\n    0.3 * Math.sqrt(Math.max(0, 1 - ((x - 0.5) / 0.53) ** 2)) * Math.sqrt(Math.max(0, 1 - ((y - 0.36) / 0.42) ** 2));\n\n  // 1. The outline: neurons traced along the edge and linked in order, for a crisp silhouette\n  const seg = CORTEX.map((p, i) => {\n    const q = CORTEX[(i + 1) % CORTEX.length];\n    return Math.hypot(q[0] - p[0], q[1] - p[1]);\n  });\n  const perimeter = seg.reduce((t, l) => t + l, 0);\n  const outlineN = Math.round(count * 0.16);\n  const outline: number[] = [];\n  for (let k = 0; k < outlineN; k++) {\n    let d = (k / outlineN) * perimeter;\n    let i = 0;\n    while (d > seg[i]) d -= seg[i++];\n    const [x0, y0] = CORTEX[i];\n    const [x1, y1] = CORTEX[(i + 1) % CORTEX.length];\n    const t = d / seg[i];\n    outline.push(add(x0 + (x1 - x0) * t + gauss() * 0.005, y0 + (y1 - y0) * t + gauss() * 0.005, gauss() * 0.015));\n  }\n  outline.forEach((n, k) => link(n, outline[(k + 1) % outline.length]));\n\n  // 2. The cerebellum: rows of neurons linked side by side, like its fine stripes\n  const rows = 5;\n  const perRow = Math.max(6, Math.round(count * 0.016));\n  for (let r = 0; r < rows; r++) {\n    const yy = CEREBELLUM.y - CEREBELLUM.ry * 0.75 + (r * CEREBELLUM.ry * 1.5) / (rows - 1);\n    const half = CEREBELLUM.rx * Math.sqrt(Math.max(0, 1 - ((yy - CEREBELLUM.y) / CEREBELLUM.ry) ** 2));\n    let prevNode = -1;\n    for (let k = 0; k < perRow; k++) {\n      const x = CEREBELLUM.x - half + ((k + 0.5) * 2 * half) / perRow;\n      const node = add(x + gauss() * 0.003, yy + gauss() * 0.003 + Math.sin(k * 0.9) * 0.004, gauss() * 0.05);\n      if (prevNode >= 0) link(prevNode, node);\n      prevNode = node;\n    }\n  }\n\n  // 3. The brainstem: two strands\n  for (const side of [-0.5, 0.5]) {\n    let prevNode = -1;\n    for (let k = 0; k < 7; k++) {\n      const t = k / 6;\n      const y = STEM.y1 + (STEM.y2 - STEM.y1) * t;\n      const x = STEM.x1 + (STEM.x2 - STEM.x1) * t + side * STEM.w * (1 - t * 0.35);\n      const node = add(x, y, side * 0.03);\n      if (prevNode >= 0) link(prevNode, node);\n      prevNode = node;\n    }\n  }\n\n  // 4. The cortex: evenly spread (best of a few candidates each time), with denser clusters\n  const hubWeight = HUBS.reduce((t, h) => t + h.w, 0);\n  const candidate = (): [number, number, boolean] => {\n    for (let guard = 0; guard < 200; guard++) {\n      const r = rand();\n      let x: number;\n      let y: number;\n      const fromHub = r < hubWeight;\n      if (fromHub) {\n        let acc = 0;\n        const hub = HUBS.find((h) => (acc += h.w) > r) ?? HUBS[0];\n        x = hub.x + gauss() * hub.s;\n        y = hub.y + gauss() * hub.s * 0.8;\n      } else {\n        x = rand();\n        y = rand() * 0.7;\n      }\n      if (inPolygon(x, y, CORTEX)) return [x, y, fromHub];\n    }\n    return [0.5, 0.35, false];\n  };\n  while (xs.length < count) {\n    let best: [number, number] = [0.5, 0.35];\n    let bestD = -1;\n    for (let c = 0; c < 5; c++) {\n      const [x, y, fromHub] = candidate();\n      if (fromHub) {\n        best = [x, y];\n        break;\n      }\n      let dMin = Infinity;\n      for (let j = 0; j < xs.length; j++) {\n        const d = (xs[j] - x) ** 2 + (ys[j] - y) ** 2;\n        if (d < dMin) dMin = d;\n      }\n      if (dMin > bestD) {\n        bestD = dMin;\n        best = [x, y];\n      }\n    }\n    const [x, y] = best;\n    const range = depth(x, y);\n    // Most neurons sit near the surface, the rest inside\n    const z = rand() < 0.65 ? (rand() < 0.5 ? -1 : 1) * range * (0.75 + 0.25 * rand()) : (rand() * 2 - 1) * range;\n    add(x, y, z);\n  }\n\n  // 5. Every neuron links to its nearest few, plus a few longer reaches\n  const total = xs.length;\n  const d2 = (a: number, b: number) => (xs[a] - xs[b]) ** 2 + (ys[a] - ys[b]) ** 2 + (zs[a] - zs[b]) ** 2;\n  for (let i = 0; i < total; i++) {\n    const near: [number, number][] = [];\n    for (let j = 0; j < total; j++) if (j !== i) near.push([d2(i, j), j]);\n    near.sort((p, q) => p[0] - q[0]);\n    const k = 6 + (rand() < 0.4 ? 1 : 0);\n    for (let m = 0; m < k; m++) link(i, near[m][1]);\n    if (rand() < 0.14) link(i, near[10 + Math.floor(rand() * 30)][1]);\n  }\n\n  const pos = new Float32Array(total * 3);\n  for (let i = 0; i < total; i++) {\n    pos[i * 3] = xs[i];\n    pos[i * 3 + 1] = ys[i];\n    pos[i * 3 + 2] = zs[i];\n  }\n  const edges = Uint16Array.from(list);\n  const adj: [number, number][][] = Array.from({ length: total }, () => []);\n  for (let e = 0; e < edges.length / 2; e++) {\n    adj[edges[e * 2]].push([edges[e * 2 + 1], e]);\n    adj[edges[e * 2 + 1]].push([edges[e * 2], e]);\n  }\n  return { pos, size: Float32Array.from(sizes), edges, adj };\n}\n\n/** Pre-rendered soft glow, drawn additively for firing neurons and signals */\nfunction glowSprite(color: string) {\n  const c = document.createElement(\"canvas\");\n  c.width = c.height = 64;\n  const g = c.getContext(\"2d\");\n  if (!g) return c;\n  const grad = g.createRadialGradient(32, 32, 0, 32, 32, 32);\n  grad.addColorStop(0, color);\n  grad.addColorStop(0.25, color);\n  grad.addColorStop(1, \"transparent\");\n  g.globalAlpha = 1;\n  g.fillStyle = grad;\n  g.fillRect(0, 0, 64, 64);\n  // Fade the edge of the gradient through the colour's own transparency\n  g.globalCompositeOperation = \"destination-in\";\n  const fade = g.createRadialGradient(32, 32, 0, 32, 32, 32);\n  fade.addColorStop(0, \"rgba(0,0,0,1)\");\n  fade.addColorStop(0.35, \"rgba(0,0,0,0.35)\");\n  fade.addColorStop(1, \"rgba(0,0,0,0)\");\n  g.fillStyle = fade;\n  g.fillRect(0, 0, 64, 64);\n  return c;\n}\n\ninterface Pulse {\n  from: number;\n  to: number;\n  t: number;\n  dur: number;\n  gen: number;\n}\n\n/**\n * A brain drawn as a network of neurons on canvas. Neurons blink softly at random; now and then\n * one fires, and signals race along its connections to the next neurons, which fire in turn, so\n * chains of activity ripple through the brain. Hover to fire neurons, click for a burst. It sways\n * gently to show its depth, pauses offscreen and holds still with reduced motion.\n */\nexport function NeuralBrain({\n  nodes = 1400,\n  activity = 3,\n  spread = 0,\n  speed = 1,\n  blink = true,\n  sway = true,\n  interactive = true,\n  color = \"#FFFFFF\",\n  pulseColor = \"#FFFFFF\",\n  lineOpacity = 0.1,\n  background = \"#000000\",\n  seed = 7,\n  label = \"A brain made of connected neurons, with signals firing through it\",\n  className,\n  style,\n}: NeuralBrainProps) {\n  const count = Math.max(300, Math.min(1400, Math.round(nodes)));\n  const brain = useMemo(() => buildBrain(count, seed), [count, seed]);\n  const canvasRef = useRef<HTMLCanvasElement | null>(null);\n  const settings = useRef({ activity, spread, speed, blink, sway, interactive, color, pulseColor, lineOpacity });\n  useEffect(() => {\n    settings.current = { activity, spread, speed, blink, sway, interactive, color, pulseColor, lineOpacity };\n  });\n\n  useEffect(() => {\n    const canvas = canvasRef.current;\n    const ctx = canvas?.getContext(\"2d\");\n    if (!canvas || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const n = brain.size.length;\n    const edgeCount = brain.edges.length / 2;\n    const act = new Float32Array(n);\n    const last = new Float32Array(n).fill(-10);\n    const phase = Float32Array.from({ length: n }, () => Math.random() * Math.PI * 2);\n    const rate = Float32Array.from({ length: n }, () => 0.4 + Math.random() * 1.4);\n    const px = new Float32Array(n);\n    const py = new Float32Array(n);\n    const pz = new Float32Array(n);\n    const ps = new Float32Array(n);\n    let pulses: Pulse[] = [];\n    let width = 0;\n    let height = 0;\n    let time = 0;\n    let prev = 0;\n    let raf = 0;\n    let visible = true;\n    let pointer: { x: number; y: number } | null = null;\n    let burst = false;\n    let sprite: HTMLCanvasElement | null = null;\n    let spriteColor = \"\";\n\n    const resize = () => {\n      const rect = canvas.getBoundingClientRect();\n      const dpr = Math.min(2, window.devicePixelRatio || 1);\n      width = rect.width;\n      height = rect.height;\n      canvas.width = Math.max(1, Math.round(width * dpr));\n      canvas.height = Math.max(1, Math.round(height * dpr));\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      if (reduce) draw();\n    };\n\n    const fire = (i: number, gen: number, from: number) => {\n      if (time - last[i] < 0.55) return;\n      last[i] = time;\n      act[i] = 1;\n      const { spread: sp, speed: sv } = settings.current;\n      if (gen >= 3 + Math.round(sp * 6)) return;\n      for (const [j] of brain.adj[i]) {\n        if (j === from || pulses.length > 160 || Math.random() > sp) continue;\n        const dx = brain.pos[i * 3] - brain.pos[j * 3];\n        const dy = brain.pos[i * 3 + 1] - brain.pos[j * 3 + 1];\n        const dz = brain.pos[i * 3 + 2] - brain.pos[j * 3 + 2];\n        const len = Math.sqrt(dx * dx + dy * dy + dz * dz);\n        pulses.push({ from: i, to: j, t: 0, dur: (0.12 + len * 3.2) / Math.max(0.2, sv), gen: gen + 1 });\n      }\n    };\n\n    const nearest = (x: number, y: number, max: number) => {\n      let best = -1;\n      let bd = max * max;\n      for (let i = 0; i < n; i++) {\n        const d = (px[i] - x) ** 2 + (py[i] - y) ** 2;\n        if (d < bd) {\n          bd = d;\n          best = i;\n        }\n      }\n      return best;\n    };\n\n    const project = () => {\n      const angle = settings.current.sway && !reduce ? Math.sin(time * 0.22) * 0.42 : 0;\n      const cos = Math.cos(angle);\n      const sin = Math.sin(angle);\n      const scale = Math.min(width / 1.04, height / 0.9) * 0.94;\n      const cx = width / 2;\n      const cy = height / 2;\n      const f = 1.9;\n      for (let i = 0; i < n; i++) {\n        const x = brain.pos[i * 3] - 0.5;\n        const y = brain.pos[i * 3 + 1] - 0.43;\n        const z = brain.pos[i * 3 + 2];\n        const rx = x * cos - z * sin;\n        const rz = x * sin + z * cos;\n        const k = f / (f + rz);\n        px[i] = cx + rx * k * scale;\n        py[i] = cy + y * k * scale;\n        pz[i] = Math.min(1, Math.max(0, 0.5 - rz / 0.6));\n        ps[i] = k;\n      }\n    };\n\n    function draw() {\n      const s = settings.current;\n      if (!sprite || spriteColor !== s.pulseColor) {\n        sprite = glowSprite(s.pulseColor);\n        spriteColor = s.pulseColor;\n      }\n      project();\n      ctx!.clearRect(0, 0, width, height);\n      const unit = Math.min(width, height) / 600;\n\n      // Resting connections in three depth layers: faint at the back, clearer in front\n      ctx!.globalCompositeOperation = \"source-over\";\n      ctx!.strokeStyle = s.color;\n      for (let layer = 0; layer < 3; layer++) {\n        ctx!.globalAlpha = Math.min(1, s.lineOpacity * [0.35, 0.8, 1.45][layer]);\n        ctx!.lineWidth = Math.max(0.4, [0.45, 0.6, 0.8][layer] * unit);\n        ctx!.beginPath();\n        for (let e = 0; e < edgeCount; e++) {\n          const a = brain.edges[e * 2];\n          const b = brain.edges[e * 2 + 1];\n          const d = (pz[a] + pz[b]) / 2;\n          if ((d < 0.38 ? 0 : d < 0.62 ? 1 : 2) !== layer) continue;\n          ctx!.moveTo(px[a], py[a]);\n          ctx!.lineTo(px[b], py[b]);\n        }\n        ctx!.stroke();\n      }\n\n      // Connections beside a firing neuron light up\n      ctx!.strokeStyle = s.pulseColor;\n      for (let e = 0; e < edgeCount; e++) {\n        const a = brain.edges[e * 2];\n        const b = brain.edges[e * 2 + 1];\n        const level = Math.max(act[a], act[b]);\n        if (level < 0.04) continue;\n        ctx!.globalAlpha = Math.min(1, level * (0.25 + pz[a] * 0.45));\n        ctx!.beginPath();\n        ctx!.moveTo(px[a], py[a]);\n        ctx!.lineTo(px[b], py[b]);\n        ctx!.stroke();\n      }\n\n      // Neurons: brighter and bigger in front; a soft random blink\n      ctx!.fillStyle = s.color;\n      for (let i = 0; i < n; i++) {\n        const tw = s.blink && !reduce ? Math.max(0, Math.sin(time * rate[i] + phase[i])) ** 30 : 0;\n        ctx!.globalAlpha = Math.min(1, 0.12 + pz[i] ** 1.4 * 0.78 + tw * 0.3);\n        const r = (0.28 + brain.size[i] * 0.85 + tw * 0.25) * (0.55 + pz[i] * 0.6) * ps[i] * Math.max(0.7, unit * 1.4);\n        ctx!.beginPath();\n        ctx!.arc(px[i], py[i], r, 0, Math.PI * 2);\n        ctx!.fill();\n      }\n\n      // Glow: firing neurons, blinks and travelling signals\n      ctx!.globalCompositeOperation = \"lighter\";\n      const glow = 12 * Math.max(0.7, unit * 1.3);\n      for (let i = 0; i < n; i++) {\n        const tw = s.blink && !reduce ? Math.max(0, Math.sin(time * rate[i] + phase[i])) ** 30 : 0;\n        const level = Math.max(act[i] * 0.6, tw * 0.22) * (0.45 + pz[i] * 0.55);\n        if (level < 0.03) continue;\n        const g = glow * (0.6 + level) * ps[i];\n        ctx!.globalAlpha = level;\n        ctx!.drawImage(sprite!, px[i] - g / 2, py[i] - g / 2, g, g);\n      }\n      ctx!.strokeStyle = s.pulseColor;\n      ctx!.lineCap = \"round\";\n      ctx!.lineWidth = Math.max(0.6, 0.9 * unit);\n      for (const p of pulses) {\n        const hx = px[p.from] + (px[p.to] - px[p.from]) * p.t;\n        const hy = py[p.from] + (py[p.to] - py[p.from]) * p.t;\n        const tt = Math.max(0, p.t - 0.35);\n        const tx = px[p.from] + (px[p.to] - px[p.from]) * tt;\n        const ty = py[p.from] + (py[p.to] - py[p.from]) * tt;\n        const near = 0.4 + ((pz[p.from] + pz[p.to]) / 2) * 0.5;\n        ctx!.globalAlpha = 0.7 * near;\n        ctx!.beginPath();\n        ctx!.moveTo(tx, ty);\n        ctx!.lineTo(hx, hy);\n        ctx!.stroke();\n        const g = glow * 0.6;\n        ctx!.globalAlpha = 0.7 * near;\n        ctx!.drawImage(sprite!, hx - g / 2, hy - g / 2, g, g);\n      }\n      ctx!.globalCompositeOperation = \"source-over\";\n      ctx!.globalAlpha = 1;\n    }\n\n    const tick = (now: number) => {\n      raf = requestAnimationFrame(tick);\n      if (!visible) {\n        prev = now;\n        return;\n      }\n      const dt = prev ? Math.min(0.05, (now - prev) / 1000) : 0;\n      prev = now;\n      time += dt;\n      const s = settings.current;\n\n      // Spontaneous firing\n      if (Math.random() < s.activity * dt) fire(Math.floor(Math.random() * n), 0, -1);\n      if (s.interactive && pointer) {\n        const i = nearest(pointer.x, pointer.y, 28);\n        if (i >= 0) fire(i, 0, -1);\n      }\n      if (burst && pointer) {\n        burst = false;\n        const picked = Array.from({ length: n }, (_, i) => i)\n          .filter((i) => (px[i] - pointer!.x) ** 2 + (py[i] - pointer!.y) ** 2 < 70 * 70)\n          .slice(0, 8);\n        for (const i of picked) {\n          last[i] = -10;\n          fire(i, 0, -1);\n        }\n      }\n\n      const decay = Math.exp(-dt * 3.2);\n      for (let i = 0; i < n; i++) act[i] *= decay;\n      const arrived: Pulse[] = [];\n      pulses = pulses.filter((p) => {\n        p.t += dt / p.dur;\n        if (p.t < 1) return true;\n        arrived.push(p);\n        return false;\n      });\n      for (const p of arrived) fire(p.to, p.gen, p.from);\n      draw();\n    };\n\n    const ro = new ResizeObserver(resize);\n    ro.observe(canvas);\n    resize();\n    const io = new IntersectionObserver(([entry]) => {\n      visible = entry.isIntersecting;\n    });\n    io.observe(canvas);\n\n    const local = (e: PointerEvent) => {\n      const rect = canvas.getBoundingClientRect();\n      return { x: e.clientX - rect.left, y: e.clientY - rect.top };\n    };\n    const onMove = (e: PointerEvent) => {\n      pointer = local(e);\n    };\n    const onLeave = () => {\n      pointer = null;\n    };\n    const onDown = (e: PointerEvent) => {\n      if (!settings.current.interactive) return;\n      pointer = local(e);\n      burst = true;\n      if (reduce) {\n        burst = false;\n      }\n    };\n    canvas.addEventListener(\"pointermove\", onMove);\n    canvas.addEventListener(\"pointerleave\", onLeave);\n    canvas.addEventListener(\"pointerdown\", onDown);\n\n    if (reduce) draw();\n    else raf = requestAnimationFrame(tick);\n\n    return () => {\n      cancelAnimationFrame(raf);\n      ro.disconnect();\n      io.disconnect();\n      canvas.removeEventListener(\"pointermove\", onMove);\n      canvas.removeEventListener(\"pointerleave\", onLeave);\n      canvas.removeEventListener(\"pointerdown\", onDown);\n    };\n  }, [brain]);\n\n  return (\n    <div className={className} style={{ position: \"relative\", width: \"100%\", height: \"100%\", background, ...style }}>\n      <canvas ref={canvasRef} role=\"img\" aria-label={label} style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\", display: \"block\", touchAction: \"pan-y\" }} />\n    </div>\n  );\n}\n"}],"docs":"Neural Brain is ready. Props and a live canvas: https://bydot.co/component/neural-brain","meta":{"tier":"free","category":"3D & Effects","version":"1.0.0"}}