PLYExporter.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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://www.khronos.org/gltf">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:Object options] )</h3>
  37. <p>
  38. [page:Object input] — Object3D<br />
  39. [page:Options options] — Export options<br />
  40. <ul>
  41. <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>
  42. <li>binary - bool. Export in binary format, returning an ArrayBuffer. Default is false.</li>
  43. </ul>
  44. </p>
  45. <p>
  46. Generates ply file data as string or ArrayBuffer (ascii or binary) output from the input object.
  47. If the object is composed of multiple children and geometry, they are merged into a single mesh in the file.
  48. </p>
  49. <h2>Source</h2>
  50. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/PLYExporter.js examples/js/exporters/PLYExporter.js]
  51. </body>
  52. </html>