Capítulo 35 de 859

Chapter 35: LatheGeometry

Core Idea

Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis.

Key Concepts

  • parameters : Object: Holds the constructor parameters that have been used to generate the geometry. Any modification after instantiation does not change the geo…

Code Examples

const points = [];
for ( let i = 0; i < 10; i ++ ) {
	points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
}
const geometry = new THREE.LatheGeometry( points );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
const lathe = new THREE.Mesh( geometry, material );
scene.add( lathe );
  • What it demonstrates: Typical usage of LatheGeometry.

Reference Tables

Constructor

Signature
`new LatheGeometry( points : Array.<(Vector2

Properties

PropertyDescription
.parameters : ObjectHolds the constructor parameters that have been used to generate the geometry. Any modification after instantiation does not change the geometry.

Key Takeaways

  1. LatheGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To