three.js - 画一个挤压圆的一半

[英]three.js - draw half of an extruded circle


This will draw a cube, but how can I make it draw half of an extruded circle?

这将绘制一个立方体,但是如何使它绘制一半的挤压圆?

// half a circle
var rightfootgeo = new THREE.CubeGeometry(2, 2, 2);
for(var i = 0; i < 8; i += 1) {
    rightfootgeo.vertices[i].y -= 5;
}

1 个解决方案

#1


2  

You can use THREE.ExtrudeGeometry to extrude a shape defined by an array of points.

您可以使用THREE.ExtrudeGeometry来拉伸由点阵列定义的形状。

Here is a Fiddle that shows you how to extrude a half-circle: http://jsfiddle.net/CjZSZ/.

这是一个小提琴,向您展示如何挤出一个半圆:http://jsfiddle.net/CjZSZ/。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2012/09/24/33c0c41fba27c2ced71b89aa2c085a81.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告