This repository contains a web application that visualizes and calculates the volume and surface area of 3D models stored in STL files. The application uses Three.js for rendering and supports various shading options.
- Visualize STL files in 3D.
- Calculate the volume and surface area of STL files.
- Toggle display of axes.
- Switch between different shading options.
- Node.js
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/kandarpgautam/ThreeJSVolumeDemo.git cd ThreeJSVolumeDemo
-
Install the required packages:
npm install
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
. -
Pass the STL file path as a query parameter in the URL:
http://localhost:3000/?filePath=path/to/your/file.stl
Live Examples:
- Show Axes: Toggle the display of the axes helper.
- Shading: Switch between different shading options (wireframe, normal).
- Three.js: Used for rendering the 3D scene.
- STLLoader: Loads STL files.
- OrbitControls: Allows orbiting around the 3D model.
- GUI: Provides a graphical user interface for toggling options.
- Stats: Displays performance statistics.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or contact me at [email protected].
Happy visualizing and calculating!