EdgeSplitModifier.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. [name] is intended to modify the geometry "dissolving" the edges to give a smoother look.
  13. </p>
  14. <h2>Import</h2>
  15. <p>
  16. [name] is an add-on, and therefore must be imported explicitly.
  17. See [link:#manual/introduction/Installation Installation / Addons].
  18. </p>
  19. <code>
  20. import { EdgeSplitModifier } from 'three/addons/modifiers/EdgeSplitModifier.js';
  21. </code>
  22. <h2>Code Example</h2>
  23. <code>
  24. const geometry = new THREE.IcosahedronGeometry( 10, 3 );<br />
  25. const modifier = new EdgeSplitModifier();<br />
  26. const cutOffAngle = 0.5;<br />
  27. const tryKeepNormals = false;<br />
  28. <br />
  29. modifier.modify( geometry, cutOffAngle, tryKeepNormals );
  30. </code>
  31. <h2>Examples</h2>
  32. <p>[example:webgl_modifier_edgesplit misc / modifiers / EdgeSplit ]</p>
  33. <h2>Constructor</h2>
  34. <h3>[name]()</h3>
  35. <p>
  36. Create a new [name] object.
  37. </p>
  38. <h2>Methods</h2>
  39. <h3>[method:undefined modify]( [param:geometry], [param:cutOffAngle], [param:tryKeepNormals] )</h3>
  40. <p>
  41. Using interpolated vertex normals, the mesh faces will blur at the edges and appear smooth.<br />
  42. You can control the smoothness by setting the `cutOffAngle`.<br />
  43. To try to keep the original normals, set `tryKeepNormals` to `true`.
  44. </p>
  45. <h2>Source</h2>
  46. <p>
  47. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/EdgeSplitModifier.js examples/jsm/modifiers/EdgeSplitModifier.js]
  48. </p>
  49. </body>
  50. </html>