Skip to content

Commit 7b6c4c1

Browse files
authored
docs: Add EdgeSplitModifier docs (#1002)
1 parent a0ebb95 commit 7b6c4c1

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed
Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
import { BufferGeometry } from "three";
22

3+
/**
4+
* {@link EdgeSplitModifier} is intended to modify the geometry "dissolving" the edges to give a smoother look.
5+
*
6+
* @example
7+
* const geometry = new THREE.IcosahedronGeometry( 10, 3 );
8+
* const modifier = new EdgeSplitModifier();
9+
* const cutOffAngle = 0.5;
10+
* const tryKeepNormals = false;
11+
*
12+
* modifier.modify( geometry, cutOffAngle, tryKeepNormals );
13+
*/
314
export class EdgeSplitModifier {
15+
/**
16+
* Create a new {@link EdgeSplitModifier} object.
17+
*/
418
constructor();
519

620
/**
7-
* @param geometry The geometry to modify by splitting edges.
8-
* This geometry can be any of any type: Geometry or BufferGeometry, indexed or
9-
* not...
10-
*
11-
* @param cutOffPoint The cutoff angle in radians. If the angle between two face normals is higher
12-
* than this value, a split will be made.
13-
*
14-
* @param [tryKeepNormals = true] Set to true to keep the normal values for vertices that won't be split.
15-
* To use this feature, you also need to pass an indexed geometry with a 'normal'
16-
* BufferAttribute.
21+
* Using interpolated vertex normals, the mesh faces will blur at the edges and appear smooth.
22+
* You can control the smoothness by setting the `cutOffAngle`.
23+
* To try to keep the original normals, set `tryKeepNormals` to `true`.
1724
*/
1825
modify(geometry: BufferGeometry, cutOffPoint: number, tryKeepNormals: boolean): BufferGeometry;
1926
}

0 commit comments

Comments
 (0)