返回介绍

手册

参考

示例

开发者参考

ColladaExporter

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

An exporter for Collada.

Collada is a file format for robust representation of scenes, materials, animations, and other 3D content in an xml format. This exporter only supports exporting geometry, materials, textures, and scene hierarchy.

代码示例

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

Constructor

ColladaExporter()

Creates a new ColladaExporter.

Methods

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

input — Object3D to be exported
onCompleted — Will be called when the export completes. Optional. The same data is immediately returned from the function.
options — Export options

  • version - string. Which version of Collada to export. The options are "1.4.1" or "1.5.0". Defaults to "1.4.1".
  • author - string. The name to include in the author field. Author field is excluded by default.
  • textureDirectory - string. The directory relative to the Collada file to save the textures to.

Generates an object with Collada file and texture data. This object is returned from the function and passed into the "onCompleted" callback.

{
  // Collada file content
  data: "",
  // List of referenced texures
  textures: [{
    // File directory, name, and extension of the texture data
    directory: "",
    name: "",
    ext: "",
    // The texture data and original texture object
    data: [],
    original: <THREE.Texture>
  }, ...]
}

Source

examples/jsm/exporters/ColladaExporter.js

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

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

发布评论

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