Capítulo 43 de 859

Chapter 43: RingGeometry

Core Idea

A class for generating a two-dimensional ring geometry.

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.RingGeometry( 1, 5, 32 );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } );
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
  • What it demonstrates: Typical usage of RingGeometry.

Reference Tables

Constructor

Signature
new RingGeometry( innerRadius : number, outerRadius : number, thetaSegments : number, phiSegments : number, thetaStart : number, thetaLength : 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. RingGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To