Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add EdgeSplitModifier docs #28516

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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