{"id":39406921,"url":"https://github.com/andywar65/djaframe","last_synced_at":"2026-01-18T03:32:39.024Z","repository":{"id":246650043,"uuid":"821738564","full_name":"andywar65/djaframe","owner":"andywar65","description":"Django app that shows 3D objects with A-Frame","archived":false,"fork":false,"pushed_at":"2024-08-24T20:59:53.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-25T15:38:42.506Z","etag":null,"topics":["a-frame","django","htmx"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andywar65.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-29T09:46:39.000Z","updated_at":"2024-08-24T20:59:56.000Z","dependencies_parsed_at":"2024-06-29T11:50:34.437Z","dependency_job_id":"915aac99-a27e-442e-b5fa-0d92945056bb","html_url":"https://github.com/andywar65/djaframe","commit_stats":null,"previous_names":["andywar65/djaframe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andywar65/djaframe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andywar65%2Fdjaframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andywar65%2Fdjaframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andywar65%2Fdjaframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andywar65%2Fdjaframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andywar65","download_url":"https://codeload.github.com/andywar65/djaframe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andywar65%2Fdjaframe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["a-frame","django","htmx"],"created_at":"2026-01-18T03:32:38.533Z","updated_at":"2026-01-18T03:32:39.004Z","avatar_url":"https://github.com/andywar65.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-a-frame\nA [Django](https://djangoproject.com) app that shows 3D objects with [A-Frame](https://aframe.io/docs/1.6.0/introduction/)\n## Requirements\nThis project is tested on Django 5.1 and Python 3.12. it uses [HTMX](https://htmx.org) and [django-htmx](https://django-htmx.readthedocs.io/en/latest/) to manage interactions. I use [Bootstrap 5](https://getbootstrap.com/) for styling and [Django Crispy Forms](https://django-crispy-forms.readthedocs.io/en/latest/) to help with forms. A `SQLite` database is enough.\n## Installation\nIn your Django project root, clone this repository (`git clone https://github.com/andywar65/djaframe`) and be sure to install required packages (`python -m pip install -r requirements.txt`). Add `djaframe.apps.DjaframeConfig` to `INSTALLED_APPS` and `path(\"3D/\", include(\"djaframe.urls\", namespace=\"djaframe\"))` to your project `urls.py`, then migrate. Reference to the included `base.html` template to see which libraries are required to be uploaded.\n## Usage\nNavigate to `http://127.0.0.1:8000/3D/` and you will be presented with a `Scene list`. Of course there still are no scenes, so navigate to the `Entity list`: we first have to create some entities, and then stage them on the scene.\n### Entities\nClick on the `Add entity` button, enter a `Title` and create the entity, then enter an `*.obj file`. If provided, enter the `*.mtl file` and eventual images. If no material is provided, you can add a color. Check the `Switch` field if your object was created in CAD: A-Frame coordinate system is rotated with respect to CAD coordinate system. As you update the entity, you will be redirected to an A-Frame window to check if everything is ok.\nAlternatively you can upload a `*.gltf file`, which is the recommended format in A-Frame. If uploaded, all other formats will be neglected.\n### Scenes\nNow that you have some entities, go back to the `Scene list` and create a scene. Enter a `Title` and eventually an `Equirectangular image` to simulate the environment (skip the `DXF` field), create the scene then `Add staged entities`. Select one of the `Entities` you created previously, adjust `color`, `position`, `rotation` and `scale`. Stage as many entities you want (even multiple specimens of the same entity), then update the Scene. You will be redirected to an A-Frame window to check if everything is ok.\n### Scenes from a DXF\nIt's possible to create `*.obj files` directly from `CAD`. Generate a `DXF` file with some `meshes` (if you have `3DSolids` you have to convert them to `Meshes`). Navigate to `http://127.0.0.1:8000/3D/` and click on the `Add scene` button. Enter title, description and upload a DXF file. Thanks to the outstanding library [ezdxf](https://ezdxf.mozman.at/) meshes are converted to `*.obj files`, and you will be redirected to the Scene Update panel to check if everything is ok. `CAD Layer` colors will be associated to stagings. Switch to the A-Frame window, and move the cursor on imported entities: a popup will notify its Layer name.\nWARNING: updating the `DXF file` will remove all entities staged on the Scene, but not the entities. If you want to remove orphan entities navigate to `http://127.0.0.1:8000/3D/entities/unstaged/` and click the `Delete All` button.\nAlso `Blocks` with `meshes` will be imported, each `Block` will be transformed into an `Entity`, while `Insertions` will be transformed into `Stagings`. Switch to the A-Frame window, and move the cursor on imported blocks: a popup will notify its Block name, Layer name and a list of block attributes (if any).\nWARNING, some restrictions occour for insertions when pitch rotation is 90 or -90 degrees.\n### A-Frame Visual Inspector\nOnce in the A-Frame window, if you press `Ctrl + Alt + i` you will open the [A-Frame Visual Inspector](https://aframe.io/docs/1.6.0/introduction/visual-inspector-and-dev-tools.html). It's possible to modify objects in the Inspector, save a `*.gltf file` from the whole scene, and then add it to an `Entity`.\n## Next steps\nCreate entities with basic geometries, add lights to scenes.\n## Tests\nTesting is underway using [pytest-django](https://pytest-django.readthedocs.io/en/latest/) for the very first time instead of `unittests` and [Kolo](https://docs.kolo.app/en/latest/howto/generate-tests.html) to generate tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandywar65%2Fdjaframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandywar65%2Fdjaframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandywar65%2Fdjaframe/lists"}