[page:Geometry] →


[name] 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)).

Code Example

const geometry = new ConvexGeometry( points ); const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); const mesh = new THREE.Mesh( geometry, material ); scene.add( mesh );


[example:webgl_geometry_convex geometry / convex ]


[name]( [param:Array points] )

points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.


[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ConvexGeometry.js examples/jsm/geometries/ConvexGeometry.js]