Skip to content

Too Old Three.js version #368

@Shashwat325

Description

@Shashwat325

Problem Summary

the version of Three.js that is used in brainbrowser is too old. This old version is embedded directly in the codebase at src/brainbrowser/surface-viewer/lib/three.js and blocks all modernization efforts.

Critical Issues

  1. Transparency Rendering Bug - When shapes are removed from the viewer, transparency effects break unexpectedly, affecting scientific visualization accuracy
  2. Missing Performance Features - No support for:
    • Level of Detail (LOD) for handling large datasets
    • Frustum culling for GPU optimization
    • Instanced rendering for multiple brain structures
    • Worker pools for parallel data processing
  3. API Incompatibility - 30+ deprecated API calls throughout the codebase:
    • matrix.getInverse() → removed in modern Three.js
    • object.applyMatrix() → renamed to applyMatrix4()
    • THREE.Geometry → replaced with THREE.BufferGeometry
  4. Security & Stability - Missing 15 years of bug fixes, security patches, and performance improvements

Why this Matters

BrainBrowser is a tool used by neuroscientists for 3D visualization and the current transparency and performance limitation act as hindrance to their work and research.

I'm willing to work on this issue and change the dependencies of the current BrainBrowser to new version of Three.js in a manner that it won't break any functionality I will submit this as separate, reviewable PRs to make the review process easier. Before I begin, could maintainers confirm if this is a priority and whether there are any specific files or areas I should be careful about?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions