From 80c08d7b2c7441aed5f63a2040b4960c582c00a8 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 24 May 2021 17:51:35 +0200 Subject: [PATCH] move potrace options --- src/constants/d2Constants.js | 7 ------- workers/trace.worker.js | 9 ++++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/constants/d2Constants.js b/src/constants/d2Constants.js index 71f9334..37adcba 100644 --- a/src/constants/d2Constants.js +++ b/src/constants/d2Constants.js @@ -21,13 +21,6 @@ export const SNAPPING_DISTANCE = 7.0; export const MAX_TRACE_TOLERANCE = 256; export const SELECTION_VIEW_MIN_SCALE = 50; export const SELECTION_VIEW_MIN_AXIS_SCALE = 80; -export const POTRACE_OPTIONS = { - turnpolicy: 'black', - turdsize: 5.0, - optcurve: false, - alphamax: 0.5, - opttolerance: 0.2 -}; export const ERASER_SIZES = { [contextTools.ERASER_SIZE_SMALL]: 10, [contextTools.ERASER_SIZE_MEDIUM]: 30, diff --git a/workers/trace.worker.js b/workers/trace.worker.js index 79f2e70..c0a027b 100644 --- a/workers/trace.worker.js +++ b/workers/trace.worker.js @@ -1,6 +1,13 @@ import 'babel-polyfill'; import * as POTRACE from '@doodle3d/potrace-js'; -import { POTRACE_OPTIONS } from '../src/constants/d2Constants.js'; + +const POTRACE_OPTIONS = { + turnpolicy: 'black', + turdsize: 5.0, + optcurve: false, + alphamax: 0.5, + opttolerance: 0.2 +}; self.addEventListener('message', (event) => { switch (event.data.msg) {