move potrace options

pull/6/head
casper 2 years ago
parent bb1b2b73c0
commit 80c08d7b2c
  1. 7
      src/constants/d2Constants.js
  2. 9
      workers/trace.worker.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,

@ -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) {

Loading…
Cancel
Save