mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 05:37:55 +01:00
slice in worker
This commit is contained in:
parent
e087fadd80
commit
8313982342
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user