[page:Geometry] →

[name]

Creates extruded geometry from a path shape.

Example

var length = 12, width = 8; var shape = new v3d.Shape(); shape.moveTo(0,0); shape.lineTo(0, width); shape.lineTo(length, width); shape.lineTo(length, 0); shape.lineTo(0, 0); var extrudeSettings = { steps: 2, amount: 16, bevelEnabled: true, bevelThickness: 1, bevelSize: 1, bevelSegments: 1 }; var geometry = new v3d.ExtrudeGeometry(shape, extrudeSettings); var material = new v3d.MeshBasicMaterial({ color: 0x00ff00 }); var mesh = new v3d.Mesh(geometry, material) ; scene.add(mesh);

Constructor

[name]([page:Array shapes], [page:Object options])

shapes — Shape or an array of shapes.
options — Object that can contain the following parameters.
This object extrudes a 2D shape to a 3D geometry.
When creating a Mesh with this geometry, if you'd like to have a separate material used for its face and its extruded sides, you can use an array of materials. The first material will be applied to the face; the second material will be applied to the sides.

Properties

Methods

[method:null addShapeList]([page:Array shapes], [page:Object options])

shapes — An Array of shapes to add.
options — Object that can contain the following parameters.
Adds the shapes to the list to extrude.

[method:null addShape]([page:Shape shape], [page:Object options])

shape — A shape to add.
options — Object that can contain the following parameters.
Add the shape to the list to extrude.
[sourceHint]