Update helpers.ts

This commit is contained in:
Davor Hrg
2021-08-02 13:39:18 +02:00
parent 5e14ad0829
commit 7178313c2e

View File

@@ -36,7 +36,7 @@ export const makeStlDownloadHandler =
}: makeStlDownloadHandlerArgs) =>
() => {
const makeStlBlobFromMesh = flow(
(mesh) => new Scene().add(mesh),
(...meshes) => new Scene().add(...meshes),
(scene) => new STLExporter().parse(scene),
(stl) =>
new Blob([stl], {
@@ -60,7 +60,7 @@ export const makeStlDownloadHandler =
) {
saveFile(makeStlBlobFromGeo(geometry))
} else if (ideType == 'jscad') {
saveFile(makeStlBlobFromMesh(geometry))
saveFile(makeStlBlobFromMesh(...geometry))
} else {
thunkDispatch((dispatch, getState) => {
const state = getState()