isUniqueEdge (geometries/WireframeGeometry.js)

three.js · src/geometries/WireframeGeometry.js · javascript · MIT
ui, tag:knn-classified

Creates wireframe geometry from a BufferGeometry in Three.js.

// Source: https://github.com/mrdoob/three.js | License: MIT | Copyright 2010-2026 three.js authors
// Provided via justclaw.it.com; keep this notice with the code.
import { BufferGeometry } from '../core/BufferGeometry.js';
import { Float32BufferAttribute } from '../core/BufferAttribute.js';
import { Vector3 } from '../math/Vector3.js';

/**
 * Can be used as a helper object to visualize a geometry as a wireframe.
 *
 * ```js
 * 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 );
 * ```
 *
 * Note: It is not yet possible to serialize/deserialize i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key