fix default line width

This commit is contained in:
casperlamboo 2017-11-13 17:01:00 +01:00
parent ba486249a4
commit ae29fe9999
3 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"module": {
"presets": [
["env", {
"targets": { node: "6" },
"targets": { "node": "6" },
"modules": false
}],
"stage-0",

View File

@ -1 +1 @@
export const LINE_WIDTH = 1.0;
export const LINE_WIDTH = 2.0;

View File

@ -8,6 +8,7 @@ import ShapeMesh from '../d3/ShapeMesh.js';
import { applyMatrixOnShape, pathToVectorPath } from '../utils/vectorUtils.js';
import { shapeToPoints } from '../shape/shapeToPoints.js';
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
import { LINE_WIDTH } from '../constants/exportConstants.js';
import { bufferToBase64 } from '../utils/binaryUtils.js';
const THREE_BSP = ThreeBSP(THREE);
@ -31,7 +32,7 @@ function createExportGeometry(shapeData, offsetSingleWalls, lineWidth) {
shapes = shapes.map(shape => shape
.scaleUp(SCALE)
.round()
.offset(lineWidth * 2 * SCALE, { jointType: 'jtSquare', endType: 'etOpenButt' })
.offset(lineWidth / 2 * SCALE, { jointType: 'jtSquare', endType: 'etOpenButt' })
.simplify('pftNonZero')
.scaleDown(SCALE)
);
@ -66,7 +67,7 @@ function createExportGeometry(shapeData, offsetSingleWalls, lineWidth) {
export function generateExportMesh(state, options = {}) {
const {
experimentalColorUnionExport = false,
exportLineWidth = 2,
exportLineWidth = LINE_WIDTH,
offsetSingleWalls = true,
matrix = ROTATION_MATRIX
} = options;