[page:BufferGeometry] →

[name]

[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 );

Examples

[example:webgl_geometry_convex geometry / convex ]

Constructor

[name]( [param:Array points] )

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

Source

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