Skip to content

MaxSC4/digirocks

Repository files navigation

🪨 RockViewer

Interactive rock and thin section visualization in 2D and 3D, directly in the browser.


📚 Overview

RockViewer is an educational web application developed at the GEOPS laboratory (Géosciences Paris-Saclay) for the Earth Sciences curriculum of Université Paris-Saclay.
Its goal is to provide geology students with a lightweight, interactive tool to:

  • Explore rock samples and thin sections virtually
  • Measure, annotate, and analyze features
  • Practice petrography and 3D spatial reasoning skills
  • Generate visuals for lab reports or presentations

The app runs entirely in the browser and requires no installation.

🚀 Designed to support learning and teaching Earth Sciences in digital environments.


✨ Features

🔍 2D Viewer for Thin Sections

  • Load JPEG/PNG images of thin-sections
  • Pan, zoom, and switch between dark/light modes
  • Magnifying glass (loupe) for high-resolution inspection
  • Add labels and markers directly on the image
  • Export annotated views as images (via html2canvas)

📷 Example screenshot:
Screenshot 2D Viewer


🧱 3D Model Viewer

  • Load 3D rock models in .obj/.mtl format
  • Use OrbitControls to rotate and zoom
  • Accurate 1:1 scale
  • Visualize axes, scale bars, bounding boxes

📷 Example screenshot:
Screenshot 3D Viewer


🧰 Interaction & Tools

  • 📏 Distance and area measurement tools (2D and 3D)
  • 🏷️ Annotation system with editable labels
  • 🌓 Theme toggle: Dark/Light mode
  • 📸 Export high-resolution screenshots (with overlays)

🛠️ Tech Stack

  • JavaScript - A high-level, dynamic programming language
  • CSS - A stylesheet language used to define the style of a web page
  • HTML - A markup language used for structure and presentation

🧠 Implementation Highlights

  • Custom orbit and orthographic camera controls
  • Dynamic scale bars and coordinate axes with real-time updates
  • Magnifier component built with canvas overlays and clipping paths
  • Measurement tools using DOM and 3D space projections
  • Annotation system supporting drag, edit, and delete

📁 Project Structure

.
├── public/               # Static assets (models, images, icons)
├── scripts/              # Core logic: tools, controls, utilities
├── src/
│   ├── components/       # UI components (viewers, panels, toolbars)
│   ├── styles/           # Custom styles
│   ├── main.js           # Entry point
│   └── config.js         # Default parameters
├── tests/                # Unit & UI tests
├── index.html            # HTML entry point
├── vite.config.js        # Build tool configuration
└── vitest.config.js      # Testing setup

🖼️ Institutional Credits

Developed with the support of:

GEOPS Logo Université Paris-Saclay Logo

👤 Author & Maintainer

Maxime SC.
🌍 Earth Sciences student at Université Paris-Saclay
🔗 LinkedIn
📧 maxime.soares-correia@université-paris-saclay.fr


✅ TODO

  • Add multilingual support (EN/FR)
  • Expand to mobile/tablet touch controls
  • Add file format support for .ply and .stl
  • Improve annotation export formats (e.g., GeoJSON)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published