Capítulo 39 de 859

Chapter 39: OctahedronGeometry

Core Idea

A geometry class for representing an octahedron.

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

Reference Tables

Constructor

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

Connects To