Browse Source

options (ie. lineWidth) in window.downloadStl

pull/6/head
Rick Companje 4 years ago committed by Casper Lamboo
parent
commit
d98b90bb2e
  1. 5
      index.js

5
index.js

@ -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');
});
};

Loading…
Cancel
Save