This project is a web-based 3D shape editor that allows users to create, extrude, and manipulate 3D shapes. It provides features such as vertex editing, object translation, and rotation in a 3D space.
- 2D shape drawing
- 3D shape extrusion
- Vertex editing
- Object translation and rotation
- Grid-based movement restrictions
- HTML5
- CSS3
- JavaScript
- Three.js for 3D rendering
- A modern web browser (Chrome, Firefox, Safari, or Edge)
- A local web server (e.g., Python's
http.server
, Node.jshttp-server
, or any other of your choice)
- Clone this repository or download the project files.
- Navigate to the project root directory in your terminal.
- Start a local web server. For example, if you have Python installed:
- For Python 3.x:
python -m http.server 8000
- For Python 2.x:
python -m SimpleHTTPServer 8000
- For Python 3.x:
- Open your web browser and go to
http://localhost:8000
- Use the drawing tools to create a 2D shape.
- Click the "Extrude" button to create a 3D shape.
- Use the toolbar buttons to switch between different modes:
- Home View: Reset the camera to the initial position
- Move: Toggle translation and rotation mode
- Edit Vertices: Enter vertex editing mode
- In Move mode:
- Press 'T' for translation
- Press 'R' for rotation
- In Edit Vertices mode, click and drag vertices to modify the shape.
- Use mouse controls for camera navigation:
- Left click + drag: Rotate view
- Right click + drag: Pan view
- Scroll wheel: Zoom in/out
Raj Gandhi
MIT License
Copyright (c) 2023 Raj Gandhi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.