OBJExporter.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 exporter for the [link:https://en.wikipedia.org/wiki/Wavefront_.obj_file OBJ] file format.
  13. <br/><br/>
  14. [name] is not able to export material data into MTL files so only geometry data are supported.
  15. </p>
  16. <h2>Import</h2>
  17. <p>
  18. [name] is an add-on, and must be imported explicitly.
  19. See [link:#manual/introduction/Installation Installation / Addons].
  20. </p>
  21. <code>
  22. import { OBJExporter } from 'three/addons/exporters/OBJExporter.js';
  23. </code>
  24. <h2>Code Example</h2>
  25. <code>
  26. // Instantiate an exporter
  27. const exporter = new OBJExporter();
  28. // Parse the input and generate the OBJ output
  29. const data = exporter.parse( scene );
  30. downloadFile( data );
  31. </code>
  32. <h2>Constructor</h2>
  33. <h3>[name]()</h3>
  34. <p>
  35. </p>
  36. <p>
  37. Creates a new [name].
  38. </p>
  39. <h2>Methods</h2>
  40. <h3>[method:String parse]( [param:Object3D object] )</h3>
  41. <p>
  42. [page:Object object] — Object3D to be exported.
  43. </p>
  44. <p>
  45. Generates a string holding the OBJ data.
  46. </p>
  47. <h2>Source</h2>
  48. <p>
  49. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/OBJExporter.js examples/jsm/exporters/OBJExporter.js]
  50. </p>
  51. </body>
  52. </html>