aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
654 stars 201 forks source link

Fixes #443 setting active:true to scene camera #485

Closed fernandojsg closed 7 years ago

fernandojsg commented 7 years ago

/cc @Utopiah

Utopiah commented 7 years ago

As is I get <a-entity id="camera"> but not <a-entity id="camera" camera> so a camera still get injected

fernandojsg commented 7 years ago

It was driving me nuts but now it seems it's a bug from the clipboardRepresentation of these entities: https://github.com/aframevr/aframe-inspector/issues/486

Utopiah commented 7 years ago

Not surprised there were quite a few discussion on that "cleaning" up part, it's not trivial :/

fernandojsg commented 7 years ago

Yep, 100% cleaning it won't be possible unless we'll start a scene from scratch and we control everything that is injected there, as the user could have plenty of dynamic code around and we can't just handle all of that, but at least we should delete everything that we inject (both the inspector and aframe itself)

fernandojsg commented 7 years ago

@Utopiah do you mind giving it a try again? It should work with the latest changes from @delapuente

Utopiah commented 7 years ago

No entities are visible anymore. I believe it comes from saving position to position="x:0;y:8;z:0" instead of position="0 8 0".

fernandojsg commented 7 years ago

Ouch I didn't notice that -_- /cc @delapuente I guess that's because of the last PR https://github.com/aframevr/aframe-inspector/pull/488

fernandojsg commented 7 years ago

@Utopiah hopefully one last try? :)

We've a known issue because of how the serialization is done by aframe that will need some extra postprocessing but I'll leave that for another PR. Basically if you reference a asset for example, it will just export it using the url but not the ID:

 <a-entity geometry="" material="src:https://aframe.io/sample-assets/assets/images/wood/crate.gif" position="3 4 0"></a-entity>

<a-entity geometry="" material="src: #crateImg" position="3 4 0"></a-entity>
Utopiah commented 7 years ago

Works!

fernandojsg commented 7 years ago

Finally! thank you so much for the help @Utopiah and of course @delapuente 💋