在 Three.js 中我可以使用:
myObject.geometry.vertices[i].y += 12;
但在 A-Frame 中,console.log 中甚至看不到任何内容。 我见过 0.2.0 和 0.3.0 之间的所有内容 默认为缓冲几何体并且顶点被隐藏。 覆盖这个是可能的,但现在在 0.5.0 中甚至不能 几何数组列在 console.log 中。
console.log(myObject.geoetry); //now returns 'undefined'.
console.log(myObject); //returns the markup only, no array!?
当前是否有办法处理各个顶点以更改其位置?
最佳答案
设置geometry="buffer: false"
。
https://aframe.io/docs/0.5.0/components/geometry.html#base_properties_buffer
然后获取几何图形:
el.getObject3D('mesh').geometry
关于javascript - 如何在 AFrame 中移动单个顶点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44268650/