File: Wireframe.md | Updated: 11/15/2025
A class for creating wireframes based on wide lines.
This module can only be used with WebGLRenderer. When using WebGPURenderer, import the class from lines/webgpu/Wireframe.js.
const geometry = new THREE.IcosahedronGeometry();
const wireframeGeometry = new WireframeGeometry2( geo );
const wireframe = new Wireframe( wireframeGeometry, material );
scene.add( wireframe );
Wireframe is an addon, and must be imported explicitly, see Installation#Addons.
import { Wireframe } from 'three/addons/lines/Wireframe.js';
Constructs a new wireframe.
geometry | The line geometry.
---|---
material | The line material.
This flag can be used for type testing.
Default is true.
Computes an array of distance values which are necessary for rendering dashed lines. For each vertex in the geometry, the method calculates the cumulative length from the current point to the very beginning of the line.
Returns: A reference to this instance.