From c85371f31590c32f1cffc1b5e3a8c0e8f4e7e346 Mon Sep 17 00:00:00 2001 From: Jaime Torrealba Date: Tue, 28 May 2024 16:22:28 +0100 Subject: [PATCH 1/2] docs: Add EdgeSplitModifier docs --- .../en/modifiers/EdgeSplitModifier.html | 67 +++++++++++++++++++ docs/list.json | 3 + 2 files changed, 70 insertions(+) create mode 100644 docs/examples/en/modifiers/EdgeSplitModifier.html diff --git a/docs/examples/en/modifiers/EdgeSplitModifier.html b/docs/examples/en/modifiers/EdgeSplitModifier.html new file mode 100644 index 00000000000000..9584f2e5716e6e --- /dev/null +++ b/docs/examples/en/modifiers/EdgeSplitModifier.html @@ -0,0 +1,67 @@ + + + + + + + + + + +

[name]

+ +

+ [name] is intended to modify the geometry "dissolving" the edges to give a smoother look. +

+ +

Import

+ +

+ [name] is an add-on, and therefore must be imported explicitly. + See [link:#manual/introduction/Installation Installation / Addons]. +

+ + + import { EdgeSplitModifier } from 'three/addons/modifiers/EdgeSplitModifier.js'; + + +

Code Example

+ + + const geometry = new THREE.IcosahedronGeometry( 10, 3 );
+ const modifier = new EdgeSplitModifier();
+ const cutOffAngle = 0.5;
+ const tryKeepNormals = false;
+
+ modifier.modify( geometry, cutOffAngle, tryKeepNormals ); +
+ +

Examples

+ +

[example:webgl_modifier_edgesplit misc / modifiers / EdgeSplit ]

+ +

Constructor

+ +

[name]()

+

+ Create a new [name] object. +

+ +

Methods

+ +

[method:undefined modify]( [param:geometry], [param:cutOffAngle], [param:tryKeepNormals] )

+

+ Using interpolated vertex normals, the mesh faces will blur at the edges and appear smooth.
+ + You can control the smoothness by setting the `cutOffAngle`.
+ + To try to keep the original normals, set `tryKeepNormals` to `true`. +

+ +

Source

+ +

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/EdgeSplitModifier.js examples/jsm/modifiers/EdgeSplitModifier.js] +

+ + diff --git a/docs/list.json b/docs/list.json index 807ff542572637..c3d5cdd4b28e84 100644 --- a/docs/list.json +++ b/docs/list.json @@ -403,6 +403,9 @@ "Misc": { "Timer": "examples/en/misc/Timer" }, + "Modifier": { + "EdgeSplit": "examples/en/modifiers/EdgeSplitModifier" + }, "ConvexHull": { "Face": "examples/en/math/convexhull/Face", From fe3507c1e8f701c9e7aa3d43c166badba7ad519e Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 28 May 2024 19:42:48 +0200 Subject: [PATCH 2/2] Update list.json --- docs/list.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/list.json b/docs/list.json index c3d5cdd4b28e84..1791907b01ee60 100644 --- a/docs/list.json +++ b/docs/list.json @@ -403,7 +403,8 @@ "Misc": { "Timer": "examples/en/misc/Timer" }, - "Modifier": { + + "Modifiers": { "EdgeSplit": "examples/en/modifiers/EdgeSplitModifier" },