1
我试图重新从版本游戏教程使用0.2.0文件0.3.0: https://aframe.io/docs/0.2.0/guide/building-an-advanced-scene.htmlAFRAME没有mesh.geometry.vertices在版本0.3.0属性
对撞机组件使用如下语句:如果打印
vertices undefined
:
var vertices = mesh.geometry.vertices;
在0.3.0返回错误
console.log(mesh.geometry);
在版本0.2.0中,返回顶点作为几何的属性,但在0.3.0中没有这样的属性。
我该如何解决这个问题?
如果您只需要顶点,您也可以通过'geometry.attributes.position.array'从BufferGeometry获取它们。它将是一个平面数组,如'[x1,y1,z1,x2,y2,z2,...]'。 [实施例](https://github.com/donmccurdy/three-to-cannon/blob/master/index.js#L315-L324)。 –