AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
GPU-accelerated cortical surfaces, multi-layer data overlays, scientific colormaps, and temporal playback in the browser, powered by Three.js.
Developer toolsTypeScript · HTMLGitHub @bbuchsbaumOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
SurfView.js is a TypeScript library for rendering interactive cortical surfaces
in the browser. It keeps mesh geometry, ordered data overlays, scientific color
mappings, picking, and temporal playback in one typed viewer model built on
Three.js.
Use it when a neuroimaging application needs to own its page and data flow while
SurfView owns the canvas, scene, and GPU resources. Rendering is on demand by
default, and optional controls mount into a container supplied by the host
application.Read the full README ↗Guide · API reference · Demo · npm
SurfView.js is a TypeScript library for rendering interactive cortical surfaces in the browser. It keeps mesh geometry, ordered data overlays, scientific color mappings, picking, and temporal playback in one typed viewer model built on Three.js.
Use it when a neuroimaging application needs to own its page and data flow while SurfView owns the canvas, scene, and GPU resources. Rendering is on demand by default, and optional controls mount into a container supplied by the host application.
Runtime boundary: construct a viewer only in a browser with WebGL. The package declares Node.js 22 or newer for build tooling and server-side imports; GPU rendering remains a browser responsibility.
npm install surfview three
three is a required peer dependency. React is optional and is needed only for
the surfview/react or surfview/controls/react entry points.
Add <div id="viewer"></div> to the page, then run the following as a browser
module. The small triangle makes the example self-contained; replace its typed
arrays with a loaded cortical mesh for real data.
import {
DataLayer,
MultiLayerNeuroSurface,
NeuroSurfaceViewer,
SurfaceGeometry
} from 'surfview';
const container = document.querySelector<HTMLElement>('#viewer');
if (!container) throw new Error('Expected a #viewer element.');
const geometry = new SurfaceGeometry(
new Float32Array([-1, -1, 0, 1, -1, 0, 0, 1, 0]),
new Uint32Array([0, 1, 2]),
'left'
);
const surface = new MultiLayerNeuroSurface(geometry, { baseColor: 0xb8bec8 });
surface.addLayer(new DataLayer(
'activation',
new Float32Array([-2, 0, 2]),
null,
'coolwarm',
{ range: [-2, 2] }
));
const viewer = new NeuroSurfaceViewer(container, 800, 600, { preset: 'paper-light' });
viewer.addSurface(surface, 'left-cortex');
window.addEventListener('pagehide', () => viewer.dispose(), { once: true });
Adding the surface schedules one coalesced frame; a permanent animation loop is
not required. viewer.dispose() releases listeners, surfaces, controls,
post-processing objects, renderer resources, and the WebGL context.
This exact example is compiled in strict mode from a clean packed-package consumer. Continue with loading a real surface or the guided first workflow.
| Import | Use | Published format |
|---|---|---|
surfview | Core viewer, surfaces, layers, loaders, and utilities | ESM plus the 2.x CommonJS/UMD compatibility build |
surfview/react | React viewer and hook | ESM |
surfview/controls | Host-mounted scientific controls | ESM |
surfview/controls/react | React controls adapter | ESM |
surfview/report | Portable report-scene mounting | ESM |
The package exports declarations for every entry point. Optional React and controls code is kept out of the core entry and has independent bundle budgets. See Reliability and contracts for exact runtime, loader, numerical, lifecycle, and performance boundaries.
SurfView is a good fit for browser applications that already have cortical
geometry and vertex-aligned data. It does not perform registration, statistical
model fitting, or scientific calibration. Its statistical helpers have narrow,
documented estimands; for example, tToZ(t, df) preserves the signed Student-t
cumulative probability and is not a large-sample substitution of z = t.
WebGL is required. Features that need WebGL2 or particular texture capabilities report unsupported hardware or use a documented CPU path. Loader limits and validation protect the application boundary, but applications still decide which URLs and data are trusted.
Performance numbers are workload- and runner-specific. The repository publishes the exact meshes, layer counts, synchronization method, memory accounting, and checked ceilings in its benchmark report instead of claiming a universal frame rate.
npm ci
npm run type-check
npm run type-check:demo
npm test
npm run docs:build
The full release candidate also runs strict public type contracts, clean packed-package consumers on Node 22 and 24, coverage thresholds, bundle and performance budgets, Chromium WebGL tests, and macOS visual regression. See the CI policy for the distinction between local evidence and hosted release proof.