| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Note
If you want to see more features on an open source A-Frame editor, please consider sponsoring me! https://github.com/sponsors/vincentfretin
The A-Frame editor is based on the A-Frame inspector with additional features:
Use aframe 1.7.1 or later:
<script src="https://aframe.io/releases/1.7.1/aframe.min.js"></script>To load the A-Frame editor instead of the A-Frame inspector, specify the url like this:
<a-scene
inspector="url: https://cdn.jsdelivr.net/gh/c-frame/aframe-editor@1.7.x/dist/aframe-editor.min.js">Note
If you want to test a build of the dev branch, replace the version by the commit hash of the build. The master branch is kept in sync with aframe-inspector, and merged into the dev branch if there is any fixes in the original inspector repository.
A-Frame inspector component comes with a keyboard shortcut to inject the editor. Just open up your A-Frame scene where you customized the inspector url and press <ctrl> + <alt> + i to inject the editor.
git clone git@github.com:c-frame/aframe-editor.git
cd aframe-editor
npm install
npm startThen navigate to http://localhost:3333/examples/
The textures modal is using https://aframe.io/sample-assets/dist/images.json to get the available textures. The GitHub repository for those assets is https://github.com/aframevr/sample-assets
If you want to self-host this directory, do the following:
cd examples
git clone git@github.com:aframevr/sample-assets.gitedit index.html and define before any script tag this global variable:
<script>window.AFRAME_SAMPLE_ASSETS_ROOT = "./sample-assets/";</script>You have the undo and redo buttons in the top bar on the left. The shortcuts are the following (also described in the help modal).
On macOS:
on Windows and Ubuntu:
Note
If you want to use the editor api, see the available commands you can execute and undo.
Compared to the A-Frame inspector where you actually already have that feature by selecting a-scene and then "Copy entity HTML to clipboard", the A-Frame editor has additional changes:
Warning
Please note that the feature can give wrong results for networked-aframe projects, so be sure to not blindly copy and paste the HTML code. Known issues are that you lose the inside of the template tags and you will have the instantiated networked entities instead of the original html code you had in your html page.
The editor perspective camera position is kept in sync with the A-Frame active camera. This means you can move around the scene, toggle the inspector and you will be at the same position. If you want to disable that behavior, you can do that by defining a global variable like this:
<script>
window.AFRAME_INSPECTOR_CONFIG = { copyCameraPosition: false };
</script>If you run the A-Frame Watcher from a different host or port, you can set AFRAME_INSPECTOR_CONFIG to specify a custom endpoint like this:
<script>
window.AFRAME_INSPECTOR_CONFIG = {saveEndpoint: "http://my-custom-host.org:1234/save"};
</script>| Back | FazBrowse Home | New Git URL |