12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <p class="desc">
- An exporter for `PLY`.
- <br /><br />
- [link:https://en.wikipedia.org/wiki/PLY_(file_format) 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>
- <h2>Import</h2>
- <p>
- [name] is an add-on, and must be imported explicitly.
- See [link:#manual/introduction/Installation Installation / Addons].
- </p>
- <code>
- import { PLYExporter } from 'three/addons/exporters/PLYExporter.js';
- </code>
- <h2>Code Example</h2>
- <code>
- // Instantiate an exporter
- const exporter = new PLYExporter();
- // Parse the input and generate the ply output
- const data = exporter.parse( scene, options );
- downloadFile( data );
- </code>
- <h2>Constructor</h2>
- <h3>[name]()</h3>
- <p>
- </p>
- <p>
- Creates a new [name].
- </p>
- <h2>Methods</h2>
- <h3>[method:Object parse]( [param:Object3D input], [param:Function onDone], [param:Object options] )</h3>
- <p>
- [page:Object input] — Object3D<br />
- [page:Function onCompleted] — Will be called when the export completes. The argument will be the generated ply ascii or binary ArrayBuffer.<br />
- [page:Options options] — Export options<br />
- <ul>
- <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>
- <li>binary - bool. Export in binary format, returning an ArrayBuffer. Default is false.</li>
- </ul>
- </p>
- <p>
- Generates ply file data as string or ArrayBuffer (ascii or binary) output from the input object. The data that is returned is the same
- that is passed into the "onCompleted" function.
- If the object is composed of multiple children and geometry, they are merged into a single mesh in the file.
- </p>
- <h2>Source</h2>
- <p>
- [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/PLYExporter.js examples/jsm/exporters/PLYExporter.js]
- </p>
- </body>
- </html>
|