Capítulo 25 de 859

Chapter 25: CircleGeometry

Core Idea

A simple shape of Euclidean geometry. It is constructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.

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

Reference Tables

Constructor

Signature
new CircleGeometry( radius : number, segments : 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. CircleGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To