BufferGeometry

LatheBufferGeometry

This is the BufferGeometry port of LatheGeometry.

Code Example

const points = []; for (let i = 0; i < 10; i++) { points.push(new v3d.Vector2(Math.sin(i * 0.2) * 10 + 5, (i - 5) * 2)); } const geometry = new v3d.LatheBufferGeometry(points); const material = new v3d.MeshBasicMaterial({ color: 0xffff00 }); const lathe = new v3d.Mesh(geometry, material); scene.add(lathe);

Constructor

LatheBufferGeometry(points : Array, segments : Integer, phiStart : Float, phiLength : Float)

points — Array of Vector2s. The x-coordinate of each point must be greater than zero.
segments — the number of circumference segments to generate. Default is 12.
phiStart — the starting angle in radians. Default is 0.
phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a closed lathe, less than 2PI is a portion. Default is 2PI.

This creates a LatheBufferGeometry based on the parameters.

Properties

See the base BufferGeometry class for common properties.

.parameters : Object

An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

Methods

See the base BufferGeometry class for common methods.

Source

For more info on how to obtain the source code of this module see this page.