Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Customizable save endpoint #709

Open
alenaksu opened this issue Mar 25, 2024 · 1 comment
Open

[Feature Request] Customizable save endpoint #709

alenaksu opened this issue Mar 25, 2024 · 1 comment

Comments

@alenaksu
Copy link

alenaksu commented Mar 25, 2024

The save endpoint is currently hardcoded and not configurable, so it only works when used with aframe-watcher running on the default port.

In my case, I was looking to implement a Vite plugin to seamlessly integrate the save functionality with its dev server, but this is unfortunately not possible without hacks.
Having such endpoint configurable, would make it easier the integration with other tools, without having to rely only on the aframe-watcher tool.

It would be nice to pass the configuration to the inspector somehow, for example by defining a global variable like in the example below:

const inspectorOptions = {
  // Defaults
  saveEndpoint: 'http://localhost:51234/save',
  
  // User-defined
  ...window.__AFRAME_INSPECTOR__
};

xhr.open('POST', inspectorOptions.saveEndpoint);
@vincentfretin
Copy link
Contributor

See also #523 for an interesting discussion about plugins.
I'm also interested into saving and loading from my own json format. @kfarr did that with https://github.com/3DStreet/3dstreet-editor (the editor core is aframe-inspector) and saving/loading json with firebase.
See also https://github.com/c-frame/aframe-editor issues for some of discussions we had around more advanced features for an editor. I don't have the bandwidth to work on it currently though.

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

No branches or pull requests

2 participants