Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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;
}
like image 259
kevin de groof Avatar asked Nov 17 '25 17:11

kevin de groof


1 Answers

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

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

like image 169
WestLangley Avatar answered Nov 19 '25 10:11

WestLangley