aframe-inspector icon indicating copy to clipboard operation
aframe-inspector copied to clipboard

On Save event

Open LukeTOBrien opened this issue 5 years ago • 1 comments

Hello chaps,

I am just researching into an idea for a project I am working on.
Is it possible to attach a handler onto the save event?

AFRAME.INSPECTOR.on('save', function(event){  })

And then I would expect a JSON object with all the changes made during the inspection session, or just an HTML string of the whole scene (you currently have 'Copy to clipboard' which is great).
I am aware of the Inspector Watcher - By my project is kinda like a WYSIWYG an currently the scene is in a iFrame, so the watcher will not work in my case.

I have also seen this PR https://github.com/aframevr/aframe-inspector/pull/514 but I don't know what events that exposes.

Thanks.
Luke

LukeTOBrien avatar Dec 17 '20 09:12 LukeTOBrien

That change in #514 to expose Events.on was actually not working as expected because not properly bound and was reverted in #755 Better html or json export or saving to a backend will probably be handled in https://github.com/c-frame/aframe-editor Relevant issues to track:

  • https://github.com/c-frame/aframe-editor/issues/18
  • https://github.com/c-frame/aframe-editor/issues/4
  • https://github.com/c-frame/aframe-editor/issues/9

vincentfretin avatar Jan 13 '25 10:01 vincentfretin