mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 11:03:48 +01:00
fix default line width
This commit is contained in:
parent
ba486249a4
commit
ae29fe9999
2
.babelrc
2
.babelrc
@ -3,7 +3,7 @@
|
|||||||
"module": {
|
"module": {
|
||||||
"presets": [
|
"presets": [
|
||||||
["env", {
|
["env", {
|
||||||
"targets": { node: "6" },
|
"targets": { "node": "6" },
|
||||||
"modules": false
|
"modules": false
|
||||||
}],
|
}],
|
||||||
"stage-0",
|
"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 { applyMatrixOnShape, pathToVectorPath } from '../utils/vectorUtils.js';
|
||||||
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
|
||||||
|
import { LINE_WIDTH } from '../constants/exportConstants.js';
|
||||||
import { bufferToBase64 } from '../utils/binaryUtils.js';
|
import { bufferToBase64 } from '../utils/binaryUtils.js';
|
||||||
|
|
||||||
const THREE_BSP = ThreeBSP(THREE);
|
const THREE_BSP = ThreeBSP(THREE);
|
||||||
@ -31,7 +32,7 @@ function createExportGeometry(shapeData, offsetSingleWalls, lineWidth) {
|
|||||||
shapes = shapes.map(shape => shape
|
shapes = shapes.map(shape => shape
|
||||||
.scaleUp(SCALE)
|
.scaleUp(SCALE)
|
||||||
.round()
|
.round()
|
||||||
.offset(lineWidth * 2 * SCALE, { jointType: 'jtSquare', endType: 'etOpenButt' })
|
.offset(lineWidth / 2 * SCALE, { jointType: 'jtSquare', endType: 'etOpenButt' })
|
||||||
.simplify('pftNonZero')
|
.simplify('pftNonZero')
|
||||||
.scaleDown(SCALE)
|
.scaleDown(SCALE)
|
||||||
);
|
);
|
||||||
@ -66,7 +67,7 @@ function createExportGeometry(shapeData, offsetSingleWalls, lineWidth) {
|
|||||||
export function generateExportMesh(state, options = {}) {
|
export function generateExportMesh(state, options = {}) {
|
||||||
const {
|
const {
|
||||||
experimentalColorUnionExport = false,
|
experimentalColorUnionExport = false,
|
||||||
exportLineWidth = 2,
|
exportLineWidth = LINE_WIDTH,
|
||||||
offsetSingleWalls = true,
|
offsetSingleWalls = true,
|
||||||
matrix = ROTATION_MATRIX
|
matrix = ROTATION_MATRIX
|
||||||
} = options;
|
} = options;
|
||||||
|
Loading…
Reference in New Issue
Block a user