一个用于 STL 文件格式的导出器。
[link:https://en.wikipedia.org/wiki/STL_(file_format) STL] 文件仅描述三维对象的表面几何,不包含颜色、纹理或其他常见的模型属性。STL 格式指定了 ASCII
和二进制两种表示方式,其中二进制表示更加紧凑。STL 文件不包含比例信息或索引,单位是任意的。
[name] 是一个附加组件,必须显式导入。请参阅 [link:#manual/introduction/Installation Installation / Addons]。
import { STLExporter } from 'three/addons/exporters/STLExporter.js';
// Instantiate an exporter
const exporter = new STLExporter();
// Configure export options
const options = { binary: true }
// Parse the input and generate the STL encoded output
const result = exporter.parse( mesh, options );
[example:misc_exporter_stl]
创建一个新的 [name] 实例。
[page:Object3D scene] — 场景、网格或其他包含要编码的网格的基于 Object3D 的类。
[page:Options options] — 可选的导出选项
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/STLExporter.js examples/jsm/exporters/STLExporter.js]