Capítulo 32 de 859
Creates extruded geometry from a path shape.
const length = 12, width = 8;
const shape = new THREE.Shape();
shape.moveTo( 0,0 );
shape.lineTo( 0, width );
shape.lineTo( length, width );
shape.lineTo( length, 0 );
shape.lineTo( 0, 0 );
const geometry = new THREE.ExtrudeGeometry( shape );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const mesh = new THREE.Mesh( geometry, material ) ;
scene.add( mesh );
Constructor
| Signature |
|---|
| `new ExtrudeGeometry( shapes : Shape |
Properties
| Property | Description |
|---|---|
.parameters : Object | Holds the constructor parameters that have been used to generate the geometry. Any modification after instantiation does not change the geometry. |