时间:2016-10-18 16:59:47

标签: three.js aframe

我已将Collada .dae模型加载到我的A-Frame场景中,并围绕它动画相机移动,然后使用鼠标光标使用来自aframe-extras组件的通用控件定向相机。大约50%的时间它没问题,但有时它会抛出错误:

aframe.js:30870 Uncaught TypeError: Cannot read property '0' of undefined
  raycast           @   aframe.js:30870
  intersectObject   @   aframe.js:16216
  intersectObject   @   aframe.js:16224

从这一行:

if ( uvs ) {
    var uvs_f = uvs[ f ];
    uvA.copy( uvs_f[ 0 ] );// <- that's where this error came from
    uvB.copy( uvs_f[ 1 ] );
    uvC.copy( uvs_f[ 2 ] );
    intersection.uvIntersection( intersectionPoint, fvA, fvB, fvC, uvA, uvB, uvC );
}

它看起来与此处的问题非常相似:Three.js drag the object(但遗憾的是没有答案)

1 个答案:

答案 0 :(得分:0)

无论它在哪里交叉,看起来都是个问题。我想我们可能需要PR到A-Frame的光标来捕捉这些错误。