stl-exporter
Version:
Convert face-vertex, or polygon meshes to ascii and binary STLs
34 lines (27 loc) • 878 B
JavaScript
// Generated by CoffeeScript 1.12.7
(function() {
var AsciiSerializer, BinarySerializer, toAsciiStl, toBinaryStl;
toAsciiStl = require('./faceVertexMeshToAsciiStl');
toBinaryStl = require('./faceVertexMeshToBinaryStl');
AsciiSerializer = require('./AsciiSerializer');
BinarySerializer = require('./BinarySerializer');
module.exports = {
toAsciiStl: toAsciiStl,
toBinaryStl: toBinaryStl,
getTransformStream: function(options) {
if (options == null) {
options = {};
}
if (options.type == null) {
options.type = 'binary';
}
if (options.type === 'binary') {
return new BinarySerializer(options);
}
if (options.type === 'ascii') {
return new AsciiSerializer(options);
}
throw new Error("Options type " + options.type + " is not supported");
}
};
}).call(this);