A React + Vite + Three.js web application for exploring melanoma lymphatic pathway data through two interactive 3D tools:
- React
- Vite
- React Router
- MUI
- Three.js
- ArcballControls
- CSS2DRenderer
- GitHub Pages for deployment
Install the latest LTS version of Node.js from the official Node.js website.
Node.js usually includes npm automatically.
Check installation:
node -v
npm -vIf both commands return versions, Node.js and npm are installed correctly.
Install Git and check:
git --versiongit clone <your-repository-url>
cd WEBTOOLFrom the project root:
npm installThis installs all dependencies listed in package.json.
npm run devVite should print a local URL, usually something like:
http://localhost:5173/
Open that in your browser.
npm run devMost panel/UI changes happen in:
src/pages/Tool1.jsxsrc/pages/Tool2.jsxsrc/pages/ToolsLayout.jsxsrc/components/*
Most 3D logic changes happen in:
src/three/Base3DEngine.jssrc/three/SharedBodyEngine.jssrc/three/AnatomyShellLayer.jssrc/three/SkinSelectionLayer.jssrc/three/HeatmapLayer.js
Specifies files and folders Git should ignore, such as:
node_modules- build outputs
- temporary files
Defines:
- project metadata
- scripts
- dependencies
- dev dependencies
Locks exact package versions for consistent installs.
Contains GitHub Actions workflows.
Typical uses:
- automatic deploy to GitHub Pages
- build checks on push
- CI workflows
If this project is deployed automatically, the Pages deployment workflow will be here.
Contains static data files used directly by the 3D tools.
Files include:
scene.glbhuman_mesh.glblymphs_positions.jsondata_elements.jsonelement_patient_counts.jsonheat_maps_verts_colors.jsondiscrete_points_normalized.json
These are loaded at runtime using fetch or Three.js loaders.
Contains team member images
Application entry point.
Responsibilities:
- bootstraps React
- attaches the app to the DOM
- usually wraps the app with routing and theme providers
Main app layout and route definitions.
Responsibilities:
- renders the overall page shell
- renders the navbar
- defines routes for:
- Home
- Team
- Tool 1
- Tool 2
- ToolsLayout parent route
Defines the MUI theme used across the project.
Responsibilities:
- palette
- typography
- spacing/styling consistency
Global app level CSS styles.
Base global CSS styles applied to the full application.
Top navigation bar for the site.
Responsibilities:
- site title
- navigation links
- top-level navigation styling
Floating canvas control buttons.
Responsibilities:
- zoom in
- zoom out
- reset
These controls interact with the shared 3D viewer engine.
Floating view preset control.
Responsibilities:
- switch between view presets such as:
- All
- Anterior
- Posterior
- Left
- Right
Floating logo image component.
Responsibilities:
- places a logo in a fixed screen position
React wrapper around the shared Three.js engine.
Responsibilities:
- creates the shared 3D engine
- keeps the viewer mounted while switching tools
- passes Tool 1 / Tool 2 state into the engine
- exposes engine API back to React for zoom/reset actions
Homepage of the web tool.
Responsibilities:
- introduction
- links to Tool 1, Tool 2, and Team
- previous reserach
Team page.
Responsibilities:
- show team members
- project affiliations
- acknowledgements
Shared parent layout for Tool 1 and Tool 2.
Responsibilities:
- renders the shared viewer once
- stores shared UI state
- renders common controls
- provides panel state to nested pages
- keeps camera/view state when switching tools
UI panel for the Skin Selection Tool.
Responsibilities:
- shows Tool 1 title and instructions
- shows drainage statistics table
- shows display toggles
- supports desktop sidebar and mobile drawer modes
UI panel for the Heatmaps Tool.
Responsibilities:
- shows Tool 2 title and instructions
- shows region selection UI
- shows draining node field controls
- shows overlay toggles such as melanoma sites / normalised
- supports desktop sidebar and mobile drawer modes
Base engine shared by the 3D system.
Responsibilities:
- Create the scene
- Create the camera
- Create the renderer
- Create
ArcballControls - Handle resize logic
- Handle the animation loop
- Provide common zoom and view preset mechanics
Main shared 3D engine for both tools.
Responsibilities:
- Extend
Base3DEngine - Initialise the shared anatomy shell
- Initialise Tool 1 and Tool 2 layers
- Handle active tool switching
- Manage shared element selection state across both tools
- Coordinate common camera behaviour across both tools
Shared anatomy shell layer.
Responsibilities:
- Load the shared body model from
scene.glb - Build selectable body meshes
- Rebuild and render the boundary line overlay
- Store shared selected mesh state
- Provide selected-mesh focus information
- Control selection visuals differently for Tool 1 and Tool 2
Tool 1-specific layer.
Responsibilities:
- Load lymph node data
- Load body element statistics
- Show Tool 1 node spheres and labels
- Update table rows
- Manage Tool 1-specific overlays and label visibility
- React to shared body selection state to update Tool 1 UI
Tool 2-specific layer.
Responsibilities:
- Load heatmap mesh
- Load vertex colour data
- Load melanoma site / normalised point datasets
- Render heatmaps
- Render point overlays
- Expose region metadata back to the UI
CSS used for the CSS2D labels in Tool 1.
Responsibilities:
- Style lymph labels
- Style tooltip labels
- Control label visibility classes
This file supports the label rendering used by SkinSelectionLayer.
Please follow the latest guidelines based on these links