Earcut.html 989 B

123456789101112131415161718192021222324252627282930313233343536
  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. An implementation of the earcut polygon triangulation algorithm. The code
  13. is a port of [link:https://github.com/mapbox/earcut mapbox/earcut].
  14. </p>
  15. <h2>Methods</h2>
  16. <h3>[method:Array triangulate]( data, holeIndices, dim )</h3>
  17. <p>
  18. data -- A flat array of vertex coordinates.<br />
  19. holeIndices -- An array of hole indices if any.<br />
  20. dim -- The number of coordinates per vertex in the input array.<br /><br />
  21. Triangulates the given shape definition by returning an array of
  22. triangles. A triangle is defined by three consecutive integers
  23. representing vertex indices.
  24. </p>
  25. <h2>Source</h2>
  26. <p>
  27. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  28. </p>
  29. </body>
  30. </html>