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

History lib doesn't account for some types of changes #679

Open
klyap opened this issue Feb 14, 2023 · 2 comments
Open

History lib doesn't account for some types of changes #679

klyap opened this issue Feb 14, 2023 · 2 comments

Comments

@klyap
Copy link
Contributor

klyap commented Feb 14, 2023

Problem:
I'm trying to use inspector with aframe-watcher to update my local files with changes I make with AFrame inspector. However, I noticed that some types of changes don't get written:

  1. Component is added or removed
  2. Entity is added or removed

Potential cause:
From my best understanding, the way it works is when a change in inspector happens, it fires an "entityupdate" event. This is listened to in the history.js file and recorded. When the save button is pressed, it makes a request to aframe-watcher with the contents of what has been recorded in AFRAME.INSPECTOR.history.updates.

It seems like the "entityupdate" event is not fired when these additions / removals are done in inspector.

@vincentfretin
Copy link
Contributor

The scope of aframe-watcher is to update only existing entities because it's based on the entity id.
https://github.com/supermedium/aframe-watcher#scope
I'm not sure if adding or removing components on an existing entity is in the scope of the supported features.
aframe-watcher didn't get updates for years. I didn't even know it was still working.
I usually do my own build of aframe-inspector to remove the save button.

@vincentfretin
Copy link
Contributor

@klyap I just released a first version of the editor with undo/redo and copy a-scene HTML to clipboard, as a alternative to aframe-watcher, so it properly serializes all the changes. https://x.com/vincentfretin/status/1861726540196708776

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