Skip to content

[bugfix] Properly bind the exposed on/off/emit functions#754

Closed
vincentfretin wants to merge 1 commit intoaframevr:masterfrom
vincentfretin:fix-Events-binding
Closed

[bugfix] Properly bind the exposed on/off/emit functions#754
vincentfretin wants to merge 1 commit intoaframevr:masterfrom
vincentfretin:fix-Events-binding

Conversation

@vincentfretin
Copy link
Contributor

Be sure the exposed on/off/emit on Inspector are bound to Events so an event emitted with AFRAME.INSPECTOR.emit is correctly catched in an Events.on listener, otherwise it's using two different registries and doesn't work.

And example of usage of emit externally for a component to trigger the update of the scene graph.
3DStreet/3dstreet@6990401

…n event emitted with AFRAME.INSPECTOR.emit is correctly catched in an Events.on listener
@vincentfretin
Copy link
Contributor Author

Closed in favor of #755
I changed my mind, the usage of AFRAME.INSPECTOR.emit('entitycreated', el) externally is wrong. The SceneGraph should be fixed to listen on child-attached/child-detached to update.

@vincentfretin vincentfretin deleted the fix-Events-binding branch August 28, 2024 17:54
@vincentfretin
Copy link
Contributor Author

I reverted the above mentioned change in 3dstreet and did this instead 3DStreet/3dstreet@5ac90b7
I'll do a similar change for aframe-inspector. This fixes showing in scene graph entities created by a component you add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant