Capítulo 50 de 859

Chapter 50: SphereGeometry

Core Idea

A class for generating a sphere 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.SphereGeometry( 15, 32, 16 );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
const sphere = new THREE.Mesh( geometry, material );
scene.add( sphere );
  • What it demonstrates: Typical usage of SphereGeometry.

Reference Tables

Constructor

Signature
new SphereGeometry( radius : number, widthSegments : number, heightSegments : number, phiStart : number, phiLength : 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. SphereGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To