Capítulo 58 de 859

Chapter 58: WireframeGeometry

Core Idea

Can be used as a helper object to visualize a geometry as a wireframe.

Note: It is not yet possible to serialize/deserialize instances of this class.

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();
const wireframe = new THREE.WireframeGeometry( geometry );
const line = new THREE.LineSegments( wireframe );
line.material.depthWrite = false;
line.material.opacity = 0.25;
line.material.transparent = true;
scene.add( line );
  • What it demonstrates: Typical usage of WireframeGeometry.

Reference Tables

Constructor

Signature
new WireframeGeometry( geometry : BufferGeometry )

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. WireframeGeometry extends: EventDispatcher → BufferGeometry
  2. Most relevant properties: parameters.

Connects To