A modular 3D voxel modeling tool built with Three.js, featuring a clean separation of concerns with HTML, CSS, and JavaScript files. The editor defaults to English language interface and dark mode theme.
voxel-editor/
├── index.html # Main application structure (modular version)
├── style.css # All styling including theme definitions
├── script.js # Core application logic (ES6 modules)
└── voxel-editor.html # All-in-one standalone version (contains inline CSS/JS)
git clone [https://github.com/AlirezaNoorizadeh/3D-web-voxel-editor.git]
- Install the Live Server extension
- Right-click on
index.html
in VS Code - Select "Open with Live Server"
- The editor will automatically open at
http://localhost:5500
# Python 3.x
python -m http.server 8000
Then open: http://localhost:8000
npx http-server
Access at: http://localhost:8080
- Double-click the file in your file explorer
- Opens directly in browser (file:// protocol)
Use any of the above server methods - the file works the same way as index.html
but has no external dependencies
- No need for a server for basic functionality
- All assets are self-contained
- Perfect for offline use or quick sharing
- 🧊 Intuitive voxel placement/removal
↔️ Adjustable grid size (10-50 units)- ⏮️ Robust undo/redo system (20 levels)
- 🎨 Custom color palette management
- 🌓 Dual theme support (dark/light modes)
- 🌐 Bilingual interface (English/Persian)
- 🖥️ Responsive control panels
- 💾 Export to OBJ + JSON formats
- 📤 Import JSON voxel layouts
- Clean separation of markup (HTML), presentation (CSS), and logic (JS)
- ES6 modules for maintainable JavaScript
- Three.js for 3D rendering (loaded via CDN)
- English language interface
- Dark mode visual theme
- Standard color palette pre-loaded
File | Contents | Usage Notes |
---|---|---|
index.html |
DOM structure + Three.js dependencies | Modular version (requires server) |
style.css |
All visual styling including themes | Shared by both versions |
script.js |
Application logic (ES6 modules) | Modular version only |
voxel-editor.html |
All-in-one standalone version | Contains: |
• Inlined DOM structure | • Double-click to run | |
• Embedded CSS styles | • No server required | |
• Bundled JS logic | • Portable/offline-friendly |
-
Modular Version (
index.html
+script.js
+style.css
):- Better for development
- Requires local server
- Supports hot-reloading
-
Standalone Version (
voxel-editor.html
):- Single executable file
- Zero dependencies
- Ideal for sharing/distribution
💡 Tip: Use the modular version for development and generate the standalone version for releases/deployment.
- Dark mode (default)
- Light mode option
- Theme-aware UI components
- English (default)
- Persian/Farsi
- Three.js (v0.160.0)
- Vanilla JavaScript (ES6 modules)
- Modern CSS (Flexbox, Grid)
- HTML5 (Semantic structure)
This project is licensed under the MIT License.
Thanks to:
- Three.js team for the powerful 3D engine
- Open source contributors for OrbitControls
- Web standards communities for ES6/CSS3
The editor provides professional-grade voxel modeling capabilities in a clean, modular web implementation with sensible defaults for immediate productivity.