From 61722a698512c296c3d158b8d0ba4e2a54ecd70a Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Thu, 29 Mar 2018 15:37:29 +0200 Subject: [PATCH] change order of multiplying matrix --- src/interface/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/utils.js b/src/interface/utils.js index bedfaa8..31fc3dc 100644 --- a/src/interface/utils.js +++ b/src/interface/utils.js @@ -177,8 +177,8 @@ export async function slice(action, name, mesh, settings, updateProgress) { const centerX = dimensions.x / 2; const centerY = dimensions.y / 2; - const matrix = new THREE.Matrix4().makeRotationY(-Math.PI / 2.0) - .multiply(new THREE.Matrix4().makeTranslation(centerY, 0, centerX)) + const matrix = new THREE.Matrix4().makeTranslation(centerY, 0, centerX) + .multiply(new THREE.Matrix4().makeRotationY(-Math.PI / 2.0)) .multiply(mesh.matrix); const { gcode } = await sliceGeometry(settings, mesh.geometry, mesh.material, matrix, false, false, ({ progress }) => {