Skip to content

SurfView.jsBrain Surface Visualization

GPU-accelerated cortical meshes, multi-layer data overlays, scientific colormaps, and temporal playback — powered by Three.js, in the browser.

Loading cortical surface…

See it run

The surface below is a real surfview viewer rendering an actual fs_LR.32k inflated cortex with a functional overlay — no screenshots, no video. Drag to orbit, scroll to zoom.

Loading cortical surface…

MultiLayerNeuroSurface — fs_LR.32k inflated left hemisphere with a Spectral data overlay.
ts
import { NeuroSurfaceViewer, MultiLayerNeuroSurface, DataLayer, loadSurface } from 'surfview'

// Create the viewer
const viewer = new NeuroSurfaceViewer(document.getElementById('viewer'), 800, 600)
viewer.startRenderLoop()

// Load a GIFTI surface and drape a data overlay on it
const geometry = await loadSurface('/fs_LR.32k.L.inflated.surf.gii', 'gifti', 'left')
const surface = new MultiLayerNeuroSurface(geometry, { useGPUCompositing: true })
viewer.addSurface(surface, 'cortex')
viewer.centerCamera()

viewer.addLayer('cortex', new DataLayer('overlay', metric, null, 'Spectral'))

Three.js peer dependency

SurfView.js renders with Three.js. Install it alongside the library (npm install surfview three), plus the optional tweakpane peers if you want the built-in control panel. See Getting Started.

Released under the MIT License.