Project layout
.
├── index.html # modern app entry
├── vanilla.html # legacy three.js r70 reference entry
├── v1.html # legacy renderer in the modern UI shell
├── css/app.css # app styles + brand tokens
├── src/ # TypeScript front end
│ ├── main.ts # boot
│ ├── renderer.ts # WebGLRenderer factory
│ ├── scene.ts # scene, camera, controls, helpers, status bar
│ ├── brain.ts # Brain wrapper + ParticlePoolBridge
│ ├── run.ts # RAF render loop
│ ├── events.ts # keyboard + resize
│ ├── gui.ts # lil-gui settings panel
│ ├── brain-ui.ts # product dashboard
│ ├── loaders.ts # OBJ + texture loaders
│ ├── entry-server.ts # SSR stub
│ ├── globals.d.ts # ambient types
│ ├── materials/ # neuron.ts, axon.ts (GLSL ShaderMaterials)
│ ├── sim/types.ts # TelemetrySnapshot contract
│ ├── diag/logger.ts # in-app diagnostics logger
│ └── __tests__/ # Vitest contract test
├── rust/
│ ├── brain_sim/ # the WASM simulation crate (World)
│ └── brain_engine/ # standalone scoring crate (not in the browser app)
├── scripts/
│ └── build-vanilla-logger.mjs # bundles the logger to an IIFE
├── public/
│ ├── vanilla/ # legacy three.js r70 reference assets
│ └── v1/ # legacy-renderer-in-shell assets
├── Plans/ # historical design docs
└── docs-site/ # this documentation site
The two Rust crates
rust/brain_sim: the simulation that the browser runs. Compiled to WASM bywasm-pack. This is theWorlddocumented in Simulation Core. Crate type["cdylib", "rlib"];wasm-optis disabled.rust/brain_engine: a standalone scoring/heuristics crate with its own unit tests. It is not imported by the browser app; treat it as a separate companion library.
Both are members of the workspace Cargo.toml, which sets a size-optimized
release profile (opt-level = "s", lto = true, strip = true,
codegen-units = 1).
Generated, gitignored artifacts
These are produced by the build and not committed:
rust/brain_sim/pkg/: thewasm-packoutput.public/vanilla/diag-logger.jsandpublic/v1/diag-logger.js: the IIFE logger bundles.dist/: the Vite build output.
Out of scope
The repository also contains a bedtime-story/ folder of unrelated short
stories and a stale root README.md that describes an older architecture.
Neither reflects the current app; this documentation supersedes the README.