How nishasirdesai09/3d-mineral-prospectivity-viewer works
Prospectivity Viewer is a browser-based 3D inspector for a synthetic mineral prospectivity block. A geologist adjusts model resolution and display controls; the app generates probability and confidence data, then the scene renders and filters the cells. The user can slice the block, change the probability threshold, inspect cells by hover, and compare confidence through opacity. Supporting layers provide coordinate/settings transforms, worker-based transparency sorting, shared colour mapping, and high-frequency hover/performance state. Several UI and rendering details are documented in the README; unsampled implementation links are included only where that documentation supports them.
Main entry points: App.tsx App controller · VoxelField.tsx Voxel renderer · Scene.tsx Scene and camera · generate.ts Synthetic volume
Components 17
Application
- App controller
src/App.tsx - Hover and perf state
src/store.ts
Model and settings
- Synthetic volume
src/data/generate.ts - Grid and settings
src/data/settings.ts - Viridis mapping
src/data/colormap.ts
3D inspection
- Scene and camera
src/scene/Scene.tsx - Pointer picker
src/scene/Scene.tsx - Grid ray traversal
src/scene/picking.ts - Voxel renderer
src/scene/VoxelField.tsx - Depth sort worker
src/scene/sortWorker.ts - Sort messages
src/scene/sortTypes.ts - Scene overlays
src/scene/Overlays.tsx
Viewer interface
- Panel controls
src/ui/controls.tsx - Geology primer
src/ui/InfoPanel.tsx - Tooltip and FPS
src/ui/overlays.tsx
Other components
- Geologist
- Browser runtime
Connections 31
- Geologist → Panel controls: adjusts
README.md - Geologist → Scene and camera: inspects
README.md - Browser runtime → App controller: starts
- App controller → Synthetic volume: generates
src/App.tsx - App controller → Scene and camera: supplies volume
src/App.tsx - App controller → Panel controls: renders
src/App.tsx - App controller → Tooltip and FPS: renders
src/App.tsx - App controller → Geology primer: renders
src/App.tsx - Panel controls → App controller: changes settings
src/App.tsx - Synthetic volume → Scene and camera: provides cell data
src/scene/Scene.tsx - Scene and camera → Voxel renderer: renders
src/scene/Scene.tsx - Scene and camera → Scene overlays: renders
src/scene/Scene.tsx - Scene and camera → Pointer picker: hosts
src/scene/Scene.tsx - Pointer picker → Grid ray traversal: picks cells
src/scene/Scene.tsx - Pointer picker → Hover and perf state: updates hover
src/scene/Scene.tsx - Voxel renderer → Depth sort worker: requests sorting
src/scene/VoxelField.tsx - Voxel renderer → Sort messages: uses messages
src/scene/VoxelField.tsx - Depth sort worker → Sort messages: uses messages
src/scene/sortWorker.ts - Depth sort worker → Voxel renderer: returns cell order
README.md - Voxel renderer → Synthetic volume: reads probability
src/scene/VoxelField.tsx - Voxel renderer → Grid and settings: maps grid and clips
src/scene/VoxelField.tsx - Voxel renderer → Viridis mapping: uses shader colours
src/scene/VoxelField.tsx - Scene overlays → Grid and settings: maps coordinates
src/scene/Overlays.tsx - Scene overlays → Synthetic volume: renders drill holes
src/scene/Overlays.tsx - Scene overlays → Hover and perf state: reads hover
src/scene/Overlays.tsx - Tooltip and FPS → Hover and perf state: reads hover and perf
src/ui/overlays.tsx - Tooltip and FPS → Synthetic volume: classifies cells
src/ui/overlays.tsx - Tooltip and FPS → Viridis mapping: colours tooltip
src/ui/overlays.tsx - Scene and camera → Hover and perf state: publishes performance
src/scene/Scene.tsx - Panel controls → Viridis mapping: colours histogram
src/ui/controls.tsx - Geology primer → Viridis mapping: shows probability scale
src/ui/InfoPanel.tsx