This project provides a web-based 3D model viewer and authoring tool using Babylon.js and Node.js/Express. Users can upload 3D models, adjust camera settings, and view models interactively.
- 3D Model Authoring Tool: Upload
.glb/.gltfmodels, adjust camera (alpha, beta, radius, target), and save settings. - 3D Model Viewer: View the uploaded model with the saved camera settings.
- Modern UI: Clean, responsive, and user-friendly interface.
- Example Model Included: An example 3D model (
tree1.glb) is provided in theexample_3D_modelfolder so you can test the app immediately.
Babylon_Simple/
├── backend/
│ ├── models/ # Uploaded 3D models (auto-created)
│ ├── model-info/ # Saved camera/model settings (auto-created)
│ ├── server.js # Express backend server
│ ├── package.json # Backend dependencies
│ └── ...
├── frontend/
│ ├── author.html # Authoring tool UI
│ ├── viewer.html # Viewer UI
│ ├── styles/ # CSS files for UI
│ └── ...
└── README.md # This file
cd backend
npm installnpm start- The server runs on http://localhost:3000
- The server will auto-create
modelsandmodel-infofolders if they do not exist.
- Open
http://localhost:3000/author.htmlto upload models and set camera views. - Open
http://localhost:3000/viewer.htmlto view the model with the saved camera settings.
- Open the authoring tool in your browser.
- Upload a
.glbor.gltfmodel file. - Adjust the camera using the UI controls or by interacting with the 3D view.
- Click Save Camera Settings to store the current camera view.
- Open the viewer in your browser.
- The most recently uploaded model and camera settings will be loaded automatically.
- All uploaded models and settings are shared (not per-user).
- The backend must have write permissions to the
backend/modelsandbackend/model-infofolders. - The project is designed for local or single-server deployment. For multi-user or production use, consider adding authentication and user-specific storage.
- CORS is not enabled by default; both frontend and backend are served from the same server.
- An example model (
example_3D_model/tree1.glb) is included for testing.
- Model not loading in viewer?
- Make sure you have uploaded a model and saved camera settings in the authoring tool.
- Check that the model file exists in
backend/modelsandmodel-info.jsonexists inbackend/model-info.
- Permission errors?
- Ensure the backend process has write access to the
modelsandmodel-infofolders.
- Ensure the backend process has write access to the
MIT