From a8999d7db72ddfc1283f1d957d54fa7ec661407e Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 6 Aug 2014 11:23:48 -0700 Subject: [PATCH] fix voxel bug --- examples/editVoxels.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/editVoxels.js b/examples/editVoxels.js index 77cec87b15..1ed3dcc0c3 100644 --- a/examples/editVoxels.js +++ b/examples/editVoxels.js @@ -752,7 +752,7 @@ function calculateVoxelFromIntersection(intersection, operation) { highlightAt.z = z + zFightingSizeAdjust; voxelSize -= 2 * zFightingSizeAdjust; if (wantAddAdjust) { - resultVoxel.y += voxelSize; + resultVoxel.y += resultVoxel.s; } resultVoxel.bottomRight = {x: highlightAt.x, y: highlightAt.y, z: highlightAt.z }; @@ -782,7 +782,7 @@ function calculateVoxelFromIntersection(intersection, operation) { highlightAt.z = z + voxelSize + zFightingSizeAdjust; voxelSize -= 2 * zFightingSizeAdjust; if (wantAddAdjust) { - resultVoxel.z += voxelSize; + resultVoxel.z += resultVoxel.s; } resultVoxel.bottomLeft = {x: highlightAt.x, y: highlightAt.y, z: highlightAt.z };