mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
options (ie. lineWidth) in window.downloadStl
This commit is contained in:
parent
3d63e349fe
commit
d98b90bb2e
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 sketchDataToJSON from './src/shape/sketchDataToJSON.js';
|
||||||
import { JSONToBlob } from './src/utils/binaryUtils.js';
|
import { JSONToBlob } from './src/utils/binaryUtils.js';
|
||||||
|
|
||||||
window.downloadStl = () => {
|
//usage: downloadStl({lineWidth:20})
|
||||||
|
window.downloadStl = (options) => {
|
||||||
store.dispatch(async (dispatch, getState) => {
|
store.dispatch(async (dispatch, getState) => {
|
||||||
const state = 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');
|
saveAsLib(blob, 'doodle.stl');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user