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

Should "Copy HTML" for an entity include unaltered/empty components? #310

Closed cvan closed 7 years ago

cvan commented 8 years ago

For example, see material="" geometry="":

<a-entity id="shortOrangeBox" mixin="short orange box" position="-5 2 0" material="" geometry=""></a-entity>
fernandojsg commented 8 years ago

Right now "copy html" is removing default values and default components that has default values too (position="0 0 0" for example). The problem with this one is that it has a material and a geometry defined on the mixins, so it will need some logic to know that they're already defined in the mixins, so we could delete the empty values. The problem is what to do if we have something like:

<a-entity id="shortOrangeBox" mixin="short orange box" position="-5 2 0" geometry="primitive:box; width:2; height:3"></a-entity>

And the geometry is also defined in the mixins. Should we just delete the empty components defined in the mixins and leave the ones that has some value? /cc @ngokevin