serialize-stl
STL (ASCII and binary) file serialization
Produces a STL (STereoLithography) ASCII string or binary buffer from a mesh. Face normals are computed internally if not provided.
Install
$ npm install serialize-stl
Usage
var serializeSTL = ;var fs = ; var mesh = positions: -10 00 00 00 10 00 10 00 00 cells: 0 1 2 ; // if ascii === true, will output an ASCII STL file.// if faceNormals is falsy normals will be computed internally var buf = ;fs;