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

Remove attributes that represent mixins and have not changed with res… #398

Closed dmarcos closed 7 years ago

dmarcos commented 7 years ago

…pect

to the mixed in value (fix #310)

fernandojsg commented 7 years ago

I've just tried to copy html the default cylinder from the example and I got the following result, please notice that position is generated even if it's the default values so it shouldn't be there:

<a-entity id="floor" geometry="primitive:cylinder;height:.2;radius:12" material="src:#floorImg;color:#fafafa;metalness:.2;repeat:50 20;roughness:.1" position="0 0 0">
</a-entity>

If I change the primitive to box that attribute shouldn't appear on the generated HTML as it's using the default value for that attribute:

<a-entity id="floor" geometry="primitive:box;height:.2;radius:12" material="src:#floorImg;color:#fafafa;metalness:.2;repeat:50 20;roughness:.1" position="0 0 0"></a-entity>

In the same way, if I change the geometry component to set the default values for primitive, height, depth and width, I would expect to copy just geometry="":

<a-entity id="floor" geometry="primitive:box;height:1;radius:12;depth:1;width:1" material="src:#floorImg;color:#fafafa;metalness:.2;repeat:50 20;roughness:.1" position="0 0 0"></a-entity>

Although radius attribute should be removed in another PR to fix the issue: https://github.com/aframevr/aframe-inspector/issues/2