Capítulo 40 de 859

Chapter 40: ParametricGeometry

Core Idea

This class can be used to generate a geometry based on a parametric surface.

Reference: Mesh Generation with Python

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 geometry = new THREE.ParametricGeometry( klein, 25, 25 );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const klein = new THREE.Mesh( geometry, material );
scene.add( klein );
  • What it demonstrates: Typical usage of ParametricGeometry.

Reference Tables

Constructor

Signature
new ParametricGeometry( func : ParametricGeometry~Func, slices : number, stacks : number )

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. ParametricGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To