Amelia Brain 3D (Three.js)
Interactive brain visualization built on Three.js r91, GSAP, postprocessing, and three-bas. This repo includes small compatibility fixes so it runs on modern Node/npm on Windows without modifying core features.
- Three synchronized brains (left, center, right) rendered as particle systems
- Always-on “thinking” glow with continuous sparkle (no looped fade in/out)
- Per-brain metrics (0–100) for six signals: Attention, Engagement, Excitement, Interest, Relaxation, Stress
- Real-time color from weighted additive mixing of the six colors with tone mapping to avoid white-out
- Glow is visible whenever any metric > 0 and hides only when all metrics are 0
- Camera movement does not influence glow intensity
- Brain 1/2/3 Metrics folders: adjust the six sliders (0–100) per brain; color updates live
- Other folders: lights, rotation, xRay toggles as needed for your scene
To make the project install and run smoothly today, the following non-invasive changes were applied:
- .npmrc: Force public registry and relax peer/engine checks
- registry=https://registry.npmjs.org/
- legacy-peer-deps=true
- engine-strict=false
- audit=false, fund=false
- package-lock.json: Deleted legacy lockfile that referenced a private Artifactory registry so install could fetch from npmjs
- ESLint during dev: Disabled in
config/index.js(useEslint: false) and added.eslintrc.jsonto turn off thelinebreak-stylerule (Windows CRLF) - index.html: Removed hard-coded bundle/script tags; let HtmlWebpackPlugin inject correct dev/prod bundles
- Three.js geometry API shim: Added a tiny shim in
src/app.jsmappingsetAttribute/deleteAttributeto legacyaddAttributeto keep three-bas happy with r91
These tweaks keep dependencies at their historical versions and avoid risky upgrades to webpack 5 / Babel 7.
- Node.js: Works with current Node (tested on v22), but if you run into environment quirks, Node 14 LTS is closest to the era of the toolchain.
- OS: Windows/macOS/Linux. On Windows, CRLF is handled via the ESLint change above.
- Install dependencies
- npm install
- Start the dev server
- npm run dev
- Open the URL printed in the console (defaults to http://localhost:8080)
Assets (OBJ model, textures, fonts) are served from static/ via webpack-dev-server and CopyWebpackPlugin.
- npm run build
- The output will be in
dist/.
After building, you can deploy the contents of dist/ to any static host (GitHub Pages, Netlify, Firebase Hosting, S3, etc.).
Option A: Use GitHub UI
- Click "Fork" on GitHub, then clone your fork and push any local changes.
Option B: From this local checkout
- Initialize git (if not already)
- git init
- Add your fork as origin (replace USERNAME and REPO as needed)
- git remote add origin https://github.com/USERNAME/REPO.git
- Commit and push
- git add .
- git commit -m "chore: working dev setup + Windows/Node fixes"
- git push -u origin master
- Build your production bundle:
npm run build - Option A (gh-pages branch): push
dist/to agh-pagesbranch and enable Pages for that branch - Option B (/docs): copy the contents of
dist/into a/docsfolder on the default branch and configure Pages to serve from/docs
Tip: If your repository is not at the domain root (e.g., /user/repo/), ensure asset paths are relative (the default in this setup) and update your project homepage setting in GitHub if needed.
- Consider upgrading to webpack 5 and three r12x+ if you plan active development; this will remove the shim and deprecated plugins (extract-text-webpack-plugin, eslint-loader).
- Re-enable ESLint once a consistent LF strategy is in place (e.g., .editorconfig and git autocrlf settings).
- Lock Node via
.nvmrc(e.g.,14) if you want stricter reproducibility.
- feat: third brain and camera framing for trio layout
- feat(gui): per-brain metrics sliders and real-time color mapping
- feat(thinking): continuous glow; additive color mixing with tone mapping; saturation boost
- fix(thinking): hide glow when all metrics are zero; remove camera influence
