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
655 stars 203 forks source link

Fix #354 implement vec2 widget #356

Closed fernandojsg closed 8 years ago

fernandojsg commented 8 years ago

While implementing it I found a bug that prevents the compound widgets like vec3 to work properly outside of a single property component (Like position, rotation, ...).

I simplified the updateEntity function (Probably it will be a good idea to open an issue/PR on aframe to use it or modify AFRAME.utils.entity.setComponentProperty to accept null/undefined value.

I simplified the onChange callback on each widget as is not necessary anything else than the value and actually the attribute name (x,y,z,...) for compounds widgets.

I was thinking about leaving the tests for another PR as I'm not that familiar with this test system and as this is broken right now so we could get it working and then focus on testing side?

ngokevin commented 8 years ago

r+