options (ie. lineWidth) in window.downloadStl

This commit is contained in:
Rick Companje 2018-03-09 15:59:43 +01:00 committed by Casper Lamboo
parent 3d63e349fe
commit d98b90bb2e
1 changed files with 3 additions and 2 deletions

View File

@ -27,10 +27,11 @@ import { createFile } from './src/utils/exportUtils.js';
import sketchDataToJSON from './src/shape/sketchDataToJSON.js';
import { JSONToBlob } from './src/utils/binaryUtils.js';
window.downloadStl = () => {
//usage: downloadStl({lineWidth:20})
window.downloadStl = (options) => {
store.dispatch(async (dispatch, getState) => {
const state = getState();
const blob = await createFile(state.sketcher.present, 'stl-blob');
const blob = await createFile(state.sketcher.present, 'stl-blob', options);
saveAsLib(blob, 'doodle.stl');
});
};