Skip to content

Add support for custom A-Frame Watcher save endpoint location (#709)#851

Open
bcopy wants to merge 3 commits intoaframevr:masterfrom
CMCRobotics:master
Open

Add support for custom A-Frame Watcher save endpoint location (#709)#851
bcopy wants to merge 3 commits intoaframevr:masterfrom
CMCRobotics:master

Conversation

@bcopy
Copy link
Copy Markdown

@bcopy bcopy commented Apr 1, 2026

  • Allow users to register a custom A-Frame Watcher save endpoint URL, e.g. :
    <script>
      window.AFRAME_WATCHER_URL = "http://my-custom-host.org:1234/save";
    </script>
  • Patch the scenegraph toolbar SAVE button to use the custom endpoint URL.

Copy link
Copy Markdown
Contributor

@vincentfretin vincentfretin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a feature that was asked in #709 to also save to another endpoint, not necessary aframe-watcher endpoint.

Can you please remove from the PR the changes in dist and package.json.

We now have the AFRAME_INSPECTOR_CONFIG to set configuration, so you should use it instead of introducing a new variable.
I suggest:

window.AFRAME_INSPECTOR_CONFIG = { saveEndpoint: "http://my-custom-host.org:1234/save" };

You can put the default value in lib/config.js as well.
You then access the config with AFRAME.INSPECTOR.config.saveEndpoint

I would also make the tooltip text generic, instead of "Write changes with aframe-watcher." just say "Save changes".

I'd probably should put pack the save button on aframe-editor, I clearly see some of you are using the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants