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

Telling inherited components apart form entity-owned components. #487

Closed delapuente closed 7 years ago

delapuente commented 7 years ago

Fix #486

The optimizeComponents() routine had a path in which the component was removed if the optimal update was null, pointing that there were no difference between the implicit value and the current value. But this assumption made components with only default attributes (as in ) to be removed.

The modification makes getImpliciValue() to indicate if the component is inherited from injected components or mixins, or if it is genuinely owned by the entity. Just in the case the component is inherited and it does not need an update, the component can be safely omitted.

fernandojsg commented 7 years ago

Cool, thanks! ;)