change order of multiplying matrix

This commit is contained in:
Casper Lamboo 2018-03-29 15:37:29 +02:00
parent ef7ceb7849
commit 61722a6985

View File

@ -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 }) => {