Skip to content

Commit

Permalink
docs: Add EdgeSplitModifier docs (#28516)
Browse files Browse the repository at this point in the history
* docs: Add EdgeSplitModifier docs

* Update list.json

---------

Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
  • Loading branch information
JaimeTorrealba and Mugen87 committed May 29, 2024
1 parent 70d0eb1 commit f06b256
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
67 changes: 67 additions & 0 deletions docs/examples/en/modifiers/EdgeSplitModifier.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>

<h1>[name]</h1>

<p class="desc">
[name] is intended to modify the geometry "dissolving" the edges to give a smoother look.
</p>

<h2>Import</h2>

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

<code>
import { EdgeSplitModifier } from 'three/addons/modifiers/EdgeSplitModifier.js';
</code>

<h2>Code Example</h2>

<code>
const geometry = new THREE.IcosahedronGeometry( 10, 3 );<br />
const modifier = new EdgeSplitModifier();<br />
const cutOffAngle = 0.5;<br />
const tryKeepNormals = false;<br />
<br />
modifier.modify( geometry, cutOffAngle, tryKeepNormals );
</code>

<h2>Examples</h2>

<p>[example:webgl_modifier_edgesplit misc / modifiers / EdgeSplit ]</p>

<h2>Constructor</h2>

<h3>[name]()</h3>
<p>
Create a new [name] object.
</p>

<h2>Methods</h2>

<h3>[method:undefined modify]( [param:geometry], [param:cutOffAngle], [param:tryKeepNormals] )</h3>
<p>
Using interpolated vertex normals, the mesh faces will blur at the edges and appear smooth.<br />

You can control the smoothness by setting the `cutOffAngle`.<br />

To try to keep the original normals, set `tryKeepNormals` to `true`.
</p>

<h2>Source</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/EdgeSplitModifier.js examples/jsm/modifiers/EdgeSplitModifier.js]
</p>
</body>
</html>
4 changes: 4 additions & 0 deletions docs/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@
"Timer": "examples/en/misc/Timer"
},

"Modifiers": {
"EdgeSplit": "examples/en/modifiers/EdgeSplitModifier"
},

"ConvexHull": {
"Face": "examples/en/math/convexhull/Face",
"HalfEdge": "examples/en/math/convexhull/HalfEdge",
Expand Down

0 comments on commit f06b256

Please sign in to comment.