返回介绍

手册

参考

示例

开发者参考

PLYExporter

发布于 2021-07-10 14:14:20 字数 2070 浏览 1133 评论 0 收藏 0

An exporter for PLY.

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.

代码示例

// Instantiate an exporter
const exporter = new PLYExporter();
// Parse the input and generate the ply output
const data = exporter.parse( scene, options );
downloadFile( data );

Constructor

PLYExporter()

Creates a new PLYExporter.

Methods

.parse ( input : Object3D, onDone : Function, options : Object ) : null

input — Object3D
onCompleted — Will be called when the export completes. The argument will be the generated ply ascii or binary ArrayBuffer.
options — Export options

  • 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.
  • binary - bool. Export in binary format, returning an ArrayBuffer. Default is false.

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.

Source

examples/jsm/exporters/PLYExporter.js

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文