File: ConvexGeometry.md | Updated: 11/15/2025
This class can be used to generate a convex hull for a given array of 3D points. The average time complexity for this task is considered to be O(nlog(n)).
const geometry = new ConvexGeometry( points );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
ConvexGeometry is an addon, and must be imported explicitly, see Installation#Addons.
import { ConvexGeometry } from 'three/addons/geometries/ConvexGeometry.js';
Constructs a new convex geometry.
points | An array of points in 3D space which should be enclosed by the convex hull.
---|---