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 double spaces when copying component representation #671

Closed vincentfretin closed 1 year ago

vincentfretin commented 1 year ago

Copy entity to clipboard calls getEntityClipboardRepresentation and at the end uses https://github.com/aframevr/aframe-inspector/blob/e8798c73b6abd51566107e21a007f6fe90fbb5ad/src/lib/entity.js#L245 This is correct:

<a-entity position="0 0.1 0" material-values__glass="materialName: glass; metalness: 0.882; roughness: 0.055; opacity: 0.9" gltf-model="car.glb"></a-entity>

Copy component values to clipboard calls getComponentClipboardRepresentation and at the end uses https://github.com/aframevr/aframe-inspector/blob/e8798c73b6abd51566107e21a007f6fe90fbb5ad/src/lib/entity.js#L517-L519 producing double spaces.

material-values__glass="materialName:  glass;  metalness:  0.882;  roughness:  0.055;  opacity: 0.9"

For consistency, remove double spaces.

dmarcos commented 1 year ago

Thank you!