Aframe 禁用鼠标的 raycaster

Aframe disable raycaster of the mouse

嘿社区/(Piotr Adam),

我的 raycaster 应该与 class "clickable" 的元素交互。这工作正常但我的鼠标仍然激活每个元素我怎么能让我的鼠标知道它应该只与 "clickable" 元素交互?

这里有一些代码,但我想它不是必需的:

<a-scene cursor="rayOrigin: mouse">

<a-entity rotation="0 90 0">
  <a-camera user-height="0" look-controls>
    <a-cursor fuse="true" fusetimeout="2000"
      position="0 0 -0.1"
      raycaster="objects: .clickable"
      geometry="primitive: ring;
      radiusInner: 0.002;
      radiusOuter: 0.003"
      material="color: red; shader: flat">
      <a-animation attribute="scale"
                      to="3 3 3"
                      dur="2000"
                      begin="cursor-fusing"
                      fill="backwards"
                      easing="linear">
      </a-animation>
   </a-cursor>
    <a-entity id="redcircle" position="0 0 -0.1" 
            geometry="primitive: ring;
            radiusInner: 0.007;
            radiusOuter: 0.0077"
            material="color: red; opacity: 0.25; shader: flat"></a-entity>
 </a-camera>  
</a-entity>  

只需将白名单部分扔到场景中,鼠标光标所在的位置:

<a-scene cursor="rayOrigin: mouse" raycaster="objects: .clickable">

fiddle here.

但理想情况下,如果您有一段代码可以根据您的需要设置一个或另一个光标。