mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-11-04 21:53:24 +01:00
fix default line width
This commit is contained in:
parent
ba486249a4
commit
ae29fe9999
2
.babelrc
2
.babelrc
@ -3,7 +3,7 @@
|
||||
"module": {
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": { node: "6" },
|
||||
"targets": { "node": "6" },
|
||||
"modules": false
|
||||
}],
|
||||
"stage-0",
|
||||
|
@ -1 +1 @@
|
||||
export const LINE_WIDTH = 1.0;
|
||||
export const LINE_WIDTH = 2.0;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user