【发布时间】:2016-03-27 02:29:23
【问题描述】:
我想我会在这里问这个问题,因为我在任何地方都找不到任何信息(SO 或 three.js 文档) - 如何获得特定面部的平均 x、y、z 坐标?或者至少,有没有办法获得构成面的三个顶点的 x,y,z 坐标?然后用这些来计算平均值?
目前为止
var fLength = plane.geometry.faces.length;
for (var i = 0; i < fLength; i++) {
var f = plane.geometry.faces[i];
//How do I get the x,y,z of the current/i face?
//Is there a way to move this face?
//Is there a way to extrude this face? Or do -anything- with it for that matter?
}
此外,除了移动顶点之外,还有什么方法可以移动面吗?挤出面呢?我意识到这是很多问题,但是所有这些的过程对我来说似乎有点不清楚......
【问题讨论】:
标签: javascript three.js