Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/write-ply
Serializes a PLY file to a stream
https://github.com/mikolalysenko/write-ply
Last synced: 7 days ago
JSON representation
Serializes a PLY file to a stream
- Host: GitHub
- URL: https://github.com/mikolalysenko/write-ply
- Owner: mikolalysenko
- License: mit
- Created: 2013-09-20T00:31:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-20T02:50:57.000Z (over 11 years ago)
- Last Synced: 2024-12-16T22:35:53.960Z (10 days ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
write-ply
=========
Writes a PLY file to a stream## Example
```javascript
var writePLY = require("../write-ply.js")writePLY({ vertex: { x: [0, 0, 0], y: [1, 1, 0], z: [0, 1, 1] },
face: { vertex_index: [ [0, 1, 2] ] } }).pipe(process.stdout)
```## API
### `require("write-ply")(data[, options])`
Writes a JSON representation of a PLY file to disk.* `data` is a JSON encoded PLY file. It must have two fields:
+ `vertex` an object containing the properties of the vertices
+ `face` an object containing the properties of the faces
+ `comments` an optional array of comments to add to the header
* `options` is an optional object containg separate flags. In addition to the usual options you can set on a Readable stream, you can also set the flag `binary` which tells whether to use a binary format or ascii.**Returns** A readable stream that you can pipe to wherever you want encoding the contents of the PLY file
## Credits
(c) 2013 Mikola Lysenko. MIT License