Capítulo 47 de 859

Chapter 47: RoundedBoxGeometry

Core Idea

A special type of box geometry with rounded corners and edges.

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

Reference Tables

Constructor

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

Connects To