{"id":29897115,"url":"https://github.com/umurotti/3d-visualizer","last_synced_at":"2025-08-01T09:33:53.739Z","repository":{"id":288069058,"uuid":"966722464","full_name":"umurotti/3d-visualizer","owner":"umurotti","description":"A lightweight 3D visualizer built with Flask and Three.js. It lets you render meshes, point clouds, frustums, and coordinate axes in the browser — all controlled live via a Python API.","archived":false,"fork":false,"pushed_at":"2025-05-05T09:29:15.000Z","size":7931,"stargazers_count":7,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-13T14:23:35.543Z","etag":null,"topics":["3d-visualization","flask","interactive","open-source","threejs","trimesh","visualizer","webgl"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umurotti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T11:03:34.000Z","updated_at":"2025-05-05T09:29:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fb6329c-2845-421a-b556-a39f7f9e1fed","html_url":"https://github.com/umurotti/3d-visualizer","commit_stats":null,"previous_names":["umurotti/3d-visualizer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/umurotti/3d-visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umurotti%2F3d-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umurotti%2F3d-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umurotti%2F3d-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umurotti%2F3d-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umurotti","download_url":"https://codeload.github.com/umurotti/3d-visualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umurotti%2F3d-visualizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268199497,"owners_count":24211823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-visualization","flask","interactive","open-source","threejs","trimesh","visualizer","webgl"],"created_at":"2025-08-01T09:32:34.447Z","updated_at":"2025-08-01T09:33:53.731Z","avatar_url":"https://github.com/umurotti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔭 3D Visualizer\n\nA lightweight 3D visualizer built with **Flask** and **Three.js**.  \nIt lets you render meshes (Trimesh), point clouds, frustums, and coordinate axes in the browser — all controlled live via a Python API.\n\n---\n\n## 📦 Features\n\n- ✅ Render point clouds and triangle meshes  \n- ✅ Add camera frustums (green = random, red = known view)  \n- ✅ Show object and global coordinate systems  \n- ✅ Toggle visibility of individual elements (e.g. frustums, mesh)  \n- ✅ OrbitControls to rotate, pan, and zoom the view  \n- ✅ Light automatically follows the camera  \n\n---\n\n## 🚀 Quick Start\n\n### 1. Install dependencies\n\n```bash\npip install flask flask-cors\n```\n\n---\n\n### 2. Run the server\n\n```bash\npython app.py\n```\n\n🌐 Open the browser at: [http://localahost:{YOUR-PORT-HERE}](http://localhost:{your-port-here})\n\n---\n\n### 3. Example usage from Python\n\n```python\nfrom viewer_client import Online3DViewer\nimport trimesh\nimport numpy as np\n\n# Start viewer client\nviewer = Online3DViewer()\n\n# Create dummy point cloud and mesh\npoints = np.random.rand(100, 3)\nmesh = trimesh.creation.icosphere()\n\n# Load mesh and point cloud\nviewer.load_scene(mesh=mesh, pointcloud=points)\n\n# Add camera frustums\npose_matrix = np.eye(4)\nviewer.add_frustum(pose_matrix)  # Default green\n\n# Red frustum for known views\nviewer.add_frustum(pose_matrix, color='red')\n\n# Add coordinate axis\nviewer.add_object_axis(pose_matrix, label=\"Object Frame\")\n\n# Show global XYZ\nviewer.add_global_axes()\n\n# Update mesh\nviewer.update_mesh(mesh, label=\"epoch_1\")\n\n# Update pointcloud\nviewer.update_point_cloud(points+2, label=\"epoch_1\")\n```\n![Demo](assets/output.gif)\n\n---\n\n## 🧪 Demo\n\nYou can run a full demonstration using real mesh data (Stanford Bunny) to showcase all interactive features: mesh updates, frustum visualization, global/object axes, and orbiting motion.\n\nThis demo:\n- Loads the Stanford Bunny mesh\n- Centers it at the origin\n- Iteratively updates the mesh position and orientation along a circular orbit\n- Visualizes each iteration with a new green frustum and labeled object axis\n- Adds a red frustum for a known view\n\n### 🔁 Iterative Mesh Update Demo\n\nTo run it:\n\n```bash\npython run_demo.py\n```\n\n### 🐇 Demo Preview\n\n![Demo](assets/demo-preview.gif)\n\n### 🗂️ Demo Folder Structure\n\n```\ndemo/\n└── bunny/\n    └── reconstruction/\n        └── bun_zipper_res3.ply\n```\n\nEnsure that the `bun_zipper_res3.ply` file is present in the path above.\n\nYou can download the Stanford Bunny `.ply` file from the [Stanford 3D Scanning Repository](http://graphics.stanford.edu/data/3Dscanrep/) if needed.\n\n---\n\n## 💡 Notes\n\n- Works best with recent versions of Chrome or Firefox  \n- Designed for local visual debugging — not production  \n- Easily embeddable in larger training/experiment loops\n\n\nInspired by the needs of fast real-time mesh and pose inspection during model training.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=umurotti/3d-visualizer\u0026type=Date)](https://www.star-history.com/#umurotti/3d-visualizer\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumurotti%2F3d-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumurotti%2F3d-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumurotti%2F3d-visualizer/lists"}