slice in worker

This commit is contained in:
casperlamboo 2018-02-12 23:58:12 +01:00
parent e087fadd80
commit 8313982342

View File

@ -175,7 +175,7 @@ export async function slice(target, name, mesh, settings, updateProgress) {
const centerY = dimensions.y / 2; const centerY = dimensions.y / 2;
const matrix = new THREE.Matrix4().makeTranslation(centerY, 0, centerX).multiply(mesh.matrix); const matrix = new THREE.Matrix4().makeTranslation(centerY, 0, centerX).multiply(mesh.matrix);
const { gcode } = await sliceGeometry(settings, mesh.geometry, mesh.material, matrix, true, false, ({ progress }) => { const { gcode } = await sliceGeometry(settings, mesh.geometry, mesh.material, matrix, false, false, ({ progress }) => {
updateProgress({ updateProgress({
action: progress.action, action: progress.action,
percentage: (currentStep + progress.done / progress.total) / steps percentage: (currentStep + progress.done / progress.total) / steps