Back to work

Three.js Performance & Interaction Case Study

Progressive 3D Scientific Visualization

Recreated a glTF and meshoptimizer workflow with progressive LOD loading, explicit geometry caching, measurable rendering states, and unified Three.js controls.

Three.jsglTFmeshoptimizer
Professional patternIndependent public demo
Role
Contract Frontend Developer
Period
May 2023–January 2024
Evidence
Scoped technical contribution
Representative workflow diagram for public neuroscience data loading, visualization, and interface refinement

Overview

The original professional application used glTF and meshoptimizer. This independent demonstration recreates its performance and interaction patterns with non-proprietary assets. In the professional engagement, I refined an existing neurological visualization workflow so related structures could load efficiently, coexist in one inspectable scene, retain distinct visual states, and share predictable camera controls.

  • Researchersisolate one structure while keeping neighboring volumes available as context
  • Technical collaboratorsmaintain predictable rendering and camera behavior
  • Research collaboratorscompare dense spatial relationships without losing orientation

Problem

Large related glTF meshes needed to become useful quickly without forcing researchers to load and clear one structure at a time. Overlap also made color carry too much meaning, so loading policy, selection, visibility, material state, and camera behavior needed explicit models.

Ownership

Contract Frontend Developer responsible for the scoped interaction model, material and visibility behavior, camera controls, and dataset-load performance within an existing research tool.

Constraints

  • The work happened inside an existing research tool rather than a blank-slate redesign.
  • Proprietary data could not be shown publicly.
  • The portfolio recreation needed to distinguish unrelated public surface-mesh data from the original engagement.

Decisions

Decisions that shaped the work

Coarse geometry before full detail

Requesting every full-resolution structure before showing a usable scene increases time to first meaningful render.

Request LOD 0Render usable scenePromote on demand
Decision

Precompute four GLBs per structure and keep LOD selection in one hysteresis-aware distance function.

Outcome

The public viewer can become interactive on coarse geometry while higher levels load only when camera distance, selection, or quality requires them.

Cache parsed source geometry

Camera movement can revisit the same LOD repeatedly, and simultaneous requests can otherwise duplicate network and parse work.

Key by asset URLReuse in-flight PromiseSwap cached geometry
Decision

Separate the browser cache, explicit application cache, and active scene mesh so each behavior remains measurable and explainable.

Outcome

Zooming out reduces rendered triangles while higher detail remains ready for immediate reuse.

One logical dataset

Related structures should coexist without becoming one irreversible mesh or clearing prior scene content.

Load manifestRegister structuresControl each independently
Decision

Use stable structure IDs and shared coordinates, with one container retaining visibility, color, opacity, status, and current LOD.

Outcome

The viewer frames, compares, hides, focuses, and recolors structures without removing unrelated scene content.

Implementation

What I built

Core implementation

  • Progressive loading across four offline-generated meshoptimizer LODs per structure
  • A Promise-aware in-memory geometry cache that deduplicates requests and retains parsed LODs
  • One manifest and stable registry for three cortical-layer context surfaces and seven proofread-cell surfaces
  • Synchronized baseline and optimized Three.js viewers with live performance instrumentation
  • Global and per-structure visibility, opacity, color, focus, solo, quality, camera, and cache controls
Technical context
Three.jsglTF / GLBmeshoptimizerglTF-TransformTypeScriptWebGL

Evidence

Work in context

Portfolio evidence note

The original professional application used glTF and meshoptimizer. This independent demonstration recreates its performance and interaction patterns with non-proprietary assets. Original source code, institutional assets, neurological datasets, research results, and patient information are not shown.

Representative workflow diagram for research dataset loading, visualization, and interface refinement
Representative workflow diagram. The independent recreation below uses an unrelated public H01 subset to demonstrate progressive LOD, caching, structure controls, and navigation without exposing original research data.

Three.js research demo

Progressive 3D scientific visualization

Compare two original full-resolution public source GLBs with a packed meshopt LOD 0 bootstrap across a mixed H01 scene—three cortical-layer context surfaces and seven proofread cells—then inspect demand-driven LOD, cache, material, and camera behavior. The public data is unrelated to the professional engagement.

Preparing 3D viewer…

Outcomes

What changed

Results

  • Provides a repeatable cold-start comparison without artificial network delays
  • Reports time to first geometry, time to first meaningful render, transfer, requests, cache behavior, and triangle counts
  • Keeps ten public context and cell surfaces aligned and independently controllable in one Three.js scene

Reflection

What I learned

Lessons

  • Demand-driven LOD promotion protects startup transfer while retaining requested levels makes repeat navigation immediate.
  • Transparent overlapping surfaces always involve sorting tradeoffs; depth writing and opacity need deliberate, inspectable rules.