PLYExporter.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. An exporter for *PLY*.
  14. <br /><br />
  15. <a href="https://en.wikipedia.org/wiki/PLY_(file_format)">PLY</a> (Polygon or Stanford Triangle Format) is a
  16. file format for efficient delivery and loading of simple, static 3D content in a dense format.
  17. Both binary and ascii formats are supported. PLY can store vertex positions, colors, normals and
  18. uv coordinates. No textures or texture references are saved.
  19. </p>
  20. <h2>Example</h2>
  21. <code>
  22. // Instantiate an exporter
  23. var exporter = new THREE.PLYExporter();
  24. // Parse the input and generate the ply output
  25. var data = exporter.parse( scene, options );
  26. downloadFile(data);
  27. </code>
  28. <h2>Constructor</h2>
  29. <h3>[name]()</h3>
  30. <p>
  31. </p>
  32. <p>
  33. Creates a new [name].
  34. </p>
  35. <h2>Methods</h2>
  36. <h3>[method:null parse]( [param:Object3D input], [param:Function onDone], [param:Object options] )</h3>
  37. <p>
  38. [page:Object input] — Object3D<br />
  39. [page:Function onCompleted] — Will be called when the export completes. The argument will be the generated ply ascii or binary ArrayBuffer.<br />
  40. [page:Options options] — Export options<br />
  41. <ul>
  42. <li>excludeAttributes - array. Which properties to explicitly exclude from the exported PLY file. Valid values are 'color', 'normal', 'uv', and 'index'. If triangle indices are excluded, then a point cloud is exported. Default is an empty array.</li>
  43. <li>binary - bool. Export in binary format, returning an ArrayBuffer. Default is false.</li>
  44. </ul>
  45. </p>
  46. <p>
  47. Generates ply file data as string or ArrayBuffer (ascii or binary) output from the input object. The data that is returned is the same
  48. that is passed into the "onCompleted" function.
  49. If the object is composed of multiple children and geometry, they are merged into a single mesh in the file.
  50. </p>
  51. <h2>Source</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/PLYExporter.js examples/js/exporters/PLYExporter.js]
  54. </p>
  55. </body>
  56. </html>