Ghost raycaster 移除后仍然发送事件?

Ghost raycaster still sending events after removal?

在下面的场景中,我试图理解为什么点击球体切换相机和光标(via.removeAttribute/.setAttribute)后似乎仍然切换回来even if I click outside the sphere--even though the scene inspector shows no cursor or raycaster on firstCursorEl to cause the ghost click event. The test scene's at http://codepen.io/anon/pen/GWJrXe,请告诉我如果我遗漏了一些重要的东西! (jhsu 提到需要绑定 render-target-loaded 以等待加载的 canvas 元素,如果 .removeAttribute('cursor') 在初始化时被调用,但我假设这不需要发生单击。)这是检查员给出的实体 HTML 在交换后的样子,如果有帮助的话:

<a-entity print-onenter="" id="firstCursorEl" mixin="avatarCursor"></a-entity>
<a-entity print-onenter="" mixin="avatarCursor" id="secondCursorEl" raycaster="" cursor=""></a-entity>

其中 firstCursorEl 是初始相机的子项,secondCursorEl 是我们交换到的相机的子项。由于 secondCursorEl 的 cursor/raycaster 的目标是远离交换按钮球体(除非它们以某种方式与相机注视的方向不同步?),而 firstCursorEl 似乎没有这样的组件,它如何仍然交换回来?

此问题已由 Don McCurdy 修复:https://github.com/aframevr/aframe/pull/2397 以实现游标删除处理程序。

您可以使用此构建:<script src="https://rawgit.com/aframevr/aframe/84c6431/dist/aframe-master.min.js"></script> 将其引入,直到 0.5.1 或 0.6.0 结束。