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

Added this.emit = Events.emit to add possibility to emit custom events from outside the Inspector class. #719

Closed gregogalante closed 3 months ago

gregogalante commented 3 months ago

Added this.emit = Events.emit to add possibility to emit custom events from outside the Inspector class.

vincentfretin commented 3 months ago

It would make sense to also expose this.off = Events.off; so you can remove a listener you added previously with AFRAME.INSPECTOR.on. (Ok just saw you added it)

vincentfretin commented 3 months ago

I would be interested of knowing your use case with this, creating entity with the entitycreate event maybe? You can DM me on discord (handle vincentfretin) for a quick chat. I myself have the whole aframe-inspector code in my own repo under src/editor. This is also what 3dstreet is doing now, so we're just importing Events. We're also working on a new json import/export of the scene, see https://github.com/3DStreet/3dstreet/pull/537

dmarcos commented 3 months ago

Thanks so much. Congrats on your first contribution @gregogalante

vincentfretin commented 3 months ago

Did you forgot to push the Merge button @dmarcos?

dmarcos commented 3 months ago

thanks

vincentfretin commented 1 month ago

This was not working. It will be reverted in #755