You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binary Serialization Pipeline: Replaced the Float32Array → number[] → JSON pipeline with PackedStreamlines using flat Float32Array buffers and zero-copy subarray() unpacking on the WebView side. Streamline lengths and bounding box are now computed once at parse time.
3D Orientation Cube: Added a synchronized orientation cube with RAS anatomical labels (R, L, A, P, S, I) rendered via a separate orthographic camera, overlaid on the bottom-right corner of the viewport and synced with the main camera on every frame.
Rotation Fix: Fixed OrbitControls pivot so rotation centers on the bounding-box centroid of the loaded streamlines instead of the camera origin, matching the behavior of standard medical viewers like TrackVis.
Per-Segment DEC Coloring: Replaced global start-to-end chord coloring with per-segment local tangent DEC in both line and tube modes, producing accurate orientation colors along each streamline.
Render-on-Demand: Added a needsRender dirty flag gating renderer.render() in the animation loop, eliminating unnecessary draws when the scene is idle. Lights are now stored as class fields with direct property assignment instead of scene traversals.
Adaptive Tube Segments: Replaced the fixed 32-segment tube geometry with adaptive segment counts based on streamline complexity, and added a tractview.maxTubes user setting (default 2000, range 100–20000) with merged geometries for better GPU batching.
Fast Color Switching: Extracted color computation so switching coloring mode in line mode updates only the color buffer attribute, skipping full geometry disposal and rebuild.
Hardened Parsing & Error Handling: Added safe dispose() cleanup, webview error boundaries, async screenshot failure handling, cumulative TRK/TCK point budgets, TRX decompressed-size validation, color-cache clearing, invalid bounding-box guards, and request sequencing to prevent stale slider updates.
Code Quality & Accessibility: Replaced duplicated webview types with shared protocol types, extracted magic numbers to constants, added ARIA labels and visible focus styles, optimized TCK point buffering, expanded JSDoc coverage, and fixed the brightness slider default to 100 for neutral initial rendering.