| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>PLYExporter - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">PLYExporter</h1>
- <section>
- <header>
- <div class="class-description"><p>An exporter for PLY.</p>
- <p>PLY (Polygon or Stanford Triangle Format) is a file format for efficient delivery and
- loading of simple, static 3D content in a dense format. Both binary and ascii formats are
- supported. PLY can store vertex positions, colors, normals and uv coordinates. No textures
- or texture references are saved.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const exporter = new PLYExporter();
- const data = exporter.parse( scene, options );
- </code></pre></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">PLYExporter</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { PLYExporter } from 'three/addons/exporters/PLYExporter.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="PLYExporter" translate="no">new <a href="#PLYExporter">PLYExporter</a><span class="signature">()</span> </h3>
- <div class="method">
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="parse" translate="no">.<a href="#parse">parse</a><span class="signature">( object : <span class="param-type">Object3D</span>, onDone : <span class="param-type">PLYExporter~OnDone</span>, options : <span class="param-type">PLYExporter~Options</span> )</span><span class="type-signature"> : string | ArrayBuffer</span> </h3>
- <div class="method">
- <div class="description">
- <p>Parses the given 3D object and generates the PLY output.</p>
- <p>If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>object</code></td>
- <td class="description last"><p>The 3D object to export.</p></td>
- </tr>
- <tr>
- <td class="name"><code>onDone</code></td>
- <td class="description last"><p>A callback function that is executed when the export has finished.</p></td>
- </tr>
- <tr>
- <td class="name"><code>options</code></td>
- <td class="description last"><p>The export options.</p></td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The exported PLY.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Type Definitions</h2>
- <h3 class="name name-method" id="~OnDone" translate="no">.<a href="#~OnDone">OnDone</a><span class="signature">( result : <span class="param-type">string | ArrayBuffer</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>onDone callback of <code>PLYExporter</code>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>result</code></td>
- <td class="description last"><p>The generated PLY ascii or binary.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="member">
- <h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
- <div class="description">
- <p>Export options of <code>PLYExporter</code>.</p>
- </div>
- <h5 class="subsection-title">Properties:</h5>
- <table class="props">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Attributes</th>
- <th>Default</th>
- <th class="last">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="name"><code>binary</code></td>
- <td class="type">
- <span class="param-type">boolean</span>
- </td>
- <td class="attributes">
- <optional><br>
- </td>
- <td class="default">
- false
- </td>
- <td class="description last"><p>Whether to export in binary format or ASCII.</p></td>
- </tr>
- <tr>
- <td class="name"><code>excludeAttributes</code></td>
- <td class="type">
- <span class="param-type">Array.<string></span>
- </td>
- <td class="attributes">
- <optional><br>
- </td>
- <td class="default">
- </td>
- <td class="description last"><p>Which properties to explicitly exclude from
- the exported PLY file. Valid values are <code>'color'</code>, <code>'normal'</code>, <code>'uv'</code>, and <code>'index'</code>. If triangle
- indices are excluded, then a point cloud is exported.</p></td>
- </tr>
- <tr>
- <td class="name"><code>littleEndian</code></td>
- <td class="type">
- <span class="param-type">boolean</span>
- </td>
- <td class="attributes">
- <optional><br>
- </td>
- <td class="default">
- false
- </td>
- <td class="description last"><p>Whether the binary export uses little or big endian.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/PLYExporter.js" target="_blank" rel="noopener" translate="no">examples/jsm/exporters/PLYExporter.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|