[英]How do I move an individual vertex in AFrame?
In Three.js I could use:在 Three.js 我可以使用:
myObject.geometry.vertices[i].y += 12;
but in A-Frame nothing is even visible in console.log.但是在 A-Frame 中,console.log 中甚至都看不到任何内容。 I had seen where between 0.2.0 and 0.3.0 everything defaults to to buffer geometry and vertices were hidden.
我已经看到在 0.2.0 和 0.3.0 之间,一切都默认为缓冲几何体和顶点被隐藏。 Overriding this was possible, but now in 0.5.0 not even the geometry array is listed in console.log.
覆盖它是可能的,但现在在 0.5.0 中,console.log 中甚至没有列出几何数组。
console.log(myObject.geoetry); //now returns 'undefined'.
console.log(myObject); //returns the markup only, no array!?
Is there currently a way to address individual vertices to change their positions?目前有没有办法解决单个顶点来改变它们的位置?
Set geometry="buffer: false"
.设置
geometry="buffer: false"
。
https://aframe.io/docs/0.5.0/components/geometry.html#base_properties_buffer https://aframe.io/docs/0.5.0/components/geometry.html#base_properties_buffer
Then get the geometry:然后得到几何:
el.getObject3D('mesh').geometry
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.