Skip to content

Instantly share code, notes, and snippets.

@eklimcz-zz
Created April 22, 2015 19:25
Show Gist options
  • Save eklimcz-zz/980d5cbc26923234e9c0 to your computer and use it in GitHub Desktop.
Save eklimcz-zz/980d5cbc26923234e9c0 to your computer and use it in GitHub Desktop.
Threejs extrude geometry
//use Extrude Geometry to give it depth, and add it to the scene.
var geometry = new THREE.ExtrudeGeometry( cube,
{
bevelEnabled: false, bevelSegments: 0, steps:20, amount: 80
});
//we're using a dark gray flat material
cubeMesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( {
color: 0x333333,
shading: THREE.FlatShading
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment