Real brain geometry
The visualization is built from an actual GLB brain mesh — every particle sits on real cortical geometry, not a blob approximation.
brain.three.js renders an interactive 3D brain with Three.js — real GLB geometry exploded into GPU-instanced particles that ripple under your cursor.
hover to ripple · arrow keys to orbit · space to pause · h for head
One GLB in, one ShaderMaterial out — the whole effect is a vertex shader and a per-instance attribute buffer.
The visualization is built from an actual GLB brain mesh — every particle sits on real cortical geometry, not a blob approximation.
One hundred thousand particles render as a single InstancedMesh draw call with a custom vertex shader — still just one GPU submission per frame.
Hover the brain and nearby particles swell, spin, and shift color in a ripple that tracks your cursor. Arrow keys orbit it, and Space pauses the animation.
Particle colors come from a small palette you can swap — violet, cyan, pink, amber — without touching the shader.
No gsap, no stats.js, no extra loaders. One component, one GLB, one ShaderMaterial — easy to lift into any React or plain-TS project.
MIT licensed TypeScript end to end. The shader is ~40 lines of GLSL — read it, break it, make it yours.
Adapted from the bytezpro threejs-brain-animation approach, rebuilt for modern three.js — no glslify, no instanced-uniforms-mesh dependency.
Copy BrainCanvas into your React app — it is a single client component with no props beyond an optional className.
import BrainCanvas from "@/components/BrainCanvas"Point BRAIN_MODEL_URL at your brain.glb (69 KB) — any GLTFLoader-compatible mesh works, the code reads vertex positions only.
const BRAIN_MODEL_URL = "/brain.glb";Vertex shader uniforms control pointer ripple (uPointer, uHover) and idle motion (uTime). Colors and sizes are per-instance attributes.
uPointer · uHover · uTime → GLSL vertex shaderThe original technique comes from bytezpro/threejs-brain-animation (MIT). Similar approaches live in Digital-Brain, hive-mind, and ai-brain-3d — links in the repo README.
Browse the source