Aframe 移动鼠标时桌面版本获取错误(cursor.js)

Aframe 移动鼠标时桌面版本获取错误(cursor.js),aframe,Aframe,我正在使用一个版本的虚拟现实体验(repo here:),并制作一个纯粹的桌面版,用于演示 我已将cursor=“rayOrigin:mouse”添加到,并将一些mouseenter事件更改为click事件。一切都在正常工作,除了当我将鼠标移到场景上时,我反复遇到这个错误:“uncaughttypeerror:t is null”,这是指cursor.js中的以下代码 // Ignore events further away than active intersection. if (this

我正在使用一个版本的虚拟现实体验(repo here:),并制作一个纯粹的桌面版,用于演示

我已将cursor=“rayOrigin:mouse”添加到,并将一些mouseenter事件更改为click事件。一切都在正常工作,除了当我将鼠标移到场景上时,我反复遇到这个错误:“uncaughttypeerror:t is null”,这是指cursor.js中的以下代码

// Ignore events further away than active intersection.
if (this.intersectedEl) {
  currentIntersection = this.el.components.raycaster.getIntersection(this.intersectedEl);
  if (currentIntersection.distance <= intersection.distance) { return; }
}
//忽略活动交叉口以外的事件。
如果(本条交叉线){
currentIntersection=this.el.components.raycaster.getIntersection(this.intersectedEl);

如果(currentIntersection.distance查看此页面链接的鼠标单击示例是一个很好的起点:

不幸的是,该示例使用的是框架0.7.0,因此我必须通读1.0.4的动画文档,并进行相应调整:

我还必须更新我正在使用的aframe-event-set-component.js的版本


在这两个信息源和版本更新之间,我能够让事情正常进行。

如果没有简单代码的链接来复制,这将很难帮助。FWIW您共享的链接的html是旧的a-Frame版本。使用1.0.4。更具体的答案我建议在Hi Diego上共享简单代码,问题是,我不是ure在代码中生成错误的位置,因为控制台中只引用cursor.js,而不是我的js文件。我将尝试更新框架,看看这是否有帮助,谢谢!