simplify imports

pull/6/head
casper 2 years ago
parent 87b6e9851b
commit f613c2b68d
  1. 36
      package-lock.json
  2. 4
      package.json
  3. 2
      src/actions/index.js
  4. 2
      src/components/App.js
  5. 2
      src/components/D2Panel.js
  6. 2
      src/components/InputText.js
  7. 2
      src/d2/EraserPointer.js
  8. 4
      src/d2/EventGroup.js
  9. 2
      src/d2/Grid.js
  10. 2
      src/d2/ImageShape.js
  11. 2
      src/d2/Shape.js
  12. 2
      src/d2/TolerancePointer.js
  13. 2
      src/d2/texts.js
  14. 4
      src/d2/tools/BaseTool.js
  15. 2
      src/d2/tools/BrushTool.js
  16. 2
      src/d2/tools/CircleTool.js
  17. 2
      src/d2/tools/PhotoGuideTool.js
  18. 2
      src/d2/tools/PolygonTool.js
  19. 2
      src/d2/tools/TransformTool.js
  20. 4
      src/d3/EventScene.js
  21. 2
      src/d3/SelectionBox.js
  22. 2
      src/d3/transformers/HeightTransformer.js
  23. 2
      src/d3/transformers/SculptTransformer.js
  24. 2
      src/reducer/contextReducer.js
  25. 2
      src/reducer/d2/addImageReducer.js
  26. 2
      src/reducer/d2/constrainMatrix.js
  27. 2
      src/reducer/d2/tools/bucketReducer.js
  28. 2
      src/reducer/d2/tools/eraserReducer.js
  29. 2
      src/reducer/d2/tools/shapes/circleReducer.js
  30. 2
      src/reducer/d2/tools/shapes/heartReducer.js
  31. 2
      src/reducer/d2/tools/shapes/polyPointReducer.js
  32. 2
      src/reducer/d2/tools/shapes/rectReducer.js
  33. 2
      src/reducer/d2/tools/shapes/skewRectReducer.js
  34. 2
      src/reducer/d2/tools/shapes/starReducer.js
  35. 2
      src/reducer/d2/tools/shapes/triangleReducer.js
  36. 2
      src/reducer/d2/tools/textReducer.js
  37. 2
      src/reducer/d2/tools/transformReducer.js
  38. 2
      src/reducer/d2/wheelZoomReducer.js
  39. 2
      src/reducer/d3/tools/heightReducer.js
  40. 2
      src/reducer/d3/tools/twistReducer.js
  41. 2
      src/reducer/index.js
  42. 4
      src/reducer/selectionOperationReducer.js
  43. 2
      src/reducer/selectionReducer.js
  44. 2
      src/utils/curveUtils.js
  45. 2
      src/utils/matrixUtils.js
  46. 2
      src/utils/pointerUtils.js
  47. 2
      src/utils/selectionUtils.js
  48. 4
      src/utils/subtractShapeFromState.js
  49. 2
      src/utils/traceUtils.js
  50. 15
      webpack.config.js
  51. 4
      workers/trace.worker.js

36
package-lock.json generated

@ -10,8 +10,7 @@
"license": "UNLICENSED",
"dependencies": {
"@doodle3d/cal": "0.0.8",
"@doodle3d/clipper-js": "^1.0.7",
"@doodle3d/fill-path": "^1.0.7",
"@doodle3d/clipper-js": "^1.0.11",
"@doodle3d/potrace-js": "0.0.6",
"@doodle3d/threejs-export-obj": "0.0.8",
"@doodle3d/threejs-export-stl": "0.0.5",
@ -21,6 +20,7 @@
"blueimp-canvas-to-blob": "^3.14.0",
"bowser": "^1.8.1",
"file-loader": "^0.11.2",
"fill-path": "^1.0.9",
"fit-curve": "^0.1.6",
"font-loaded": "^1.0.0",
"imports-loader": "^0.7.1",
@ -148,14 +148,6 @@
"resolved": "https://registry.npmjs.org/@doodle3d/clipper-lib/-/clipper-lib-6.4.2-b.tgz",
"integrity": "sha512-glELSijsD9b+/0d9iOdasBwqH3s+xPxD59tJ7aXkBx7klugygGOMXn7PB05AdhVyA1OYMj7GUCegaQa7nvLtmQ=="
},
"node_modules/@doodle3d/fill-path": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@doodle3d/fill-path/-/fill-path-1.0.7.tgz",
"integrity": "sha512-4sdgWQ28JgRsmnyy1OnuKHE+DZ8kDGpluGqFmMASh2/6dlyjp2/oXnNEgNefG4/xiEitV8AtzEij9Bijh6yNRw==",
"dependencies": {
"@doodle3d/clipper-js": "^1.0.3"
}
},
"node_modules/@doodle3d/potrace-js": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
@ -4986,6 +4978,14 @@
"node": ">= 0.4.0"
}
},
"node_modules/fill-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/fill-path/-/fill-path-1.0.9.tgz",
"integrity": "sha512-DfVMI9QySK8JrEp9FWE+E+YYCg6W2xkxDpH1kcHTu7ixz1pXQUr9j0eTTvfKS/ziy23dV6KR/FwKwvmANWRBVA==",
"dependencies": {
"@doodle3d/clipper-js": "^1.0.11"
}
},
"node_modules/fill-range": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
@ -18092,14 +18092,6 @@
"resolved": "https://registry.npmjs.org/@doodle3d/clipper-lib/-/clipper-lib-6.4.2-b.tgz",
"integrity": "sha512-glELSijsD9b+/0d9iOdasBwqH3s+xPxD59tJ7aXkBx7klugygGOMXn7PB05AdhVyA1OYMj7GUCegaQa7nvLtmQ=="
},
"@doodle3d/fill-path": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@doodle3d/fill-path/-/fill-path-1.0.7.tgz",
"integrity": "sha512-4sdgWQ28JgRsmnyy1OnuKHE+DZ8kDGpluGqFmMASh2/6dlyjp2/oXnNEgNefG4/xiEitV8AtzEij9Bijh6yNRw==",
"requires": {
"@doodle3d/clipper-js": "^1.0.3"
}
},
"@doodle3d/potrace-js": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
@ -22335,6 +22327,14 @@
"integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==",
"dev": true
},
"fill-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/fill-path/-/fill-path-1.0.9.tgz",
"integrity": "sha512-DfVMI9QySK8JrEp9FWE+E+YYCg6W2xkxDpH1kcHTu7ixz1pXQUr9j0eTTvfKS/ziy23dV6KR/FwKwvmANWRBVA==",
"requires": {
"@doodle3d/clipper-js": "^1.0.11"
}
},
"fill-range": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",

@ -18,8 +18,7 @@
},
"dependencies": {
"@doodle3d/cal": "0.0.8",
"@doodle3d/clipper-js": "^1.0.7",
"@doodle3d/fill-path": "^1.0.7",
"@doodle3d/clipper-js": "^1.0.11",
"@doodle3d/potrace-js": "0.0.6",
"@doodle3d/threejs-export-obj": "0.0.8",
"@doodle3d/threejs-export-stl": "0.0.5",
@ -29,6 +28,7 @@
"blueimp-canvas-to-blob": "^3.14.0",
"bowser": "^1.8.1",
"file-loader": "^0.11.2",
"fill-path": "^1.0.9",
"fit-curve": "^0.1.6",
"font-loaded": "^1.0.0",
"imports-loader": "^0.7.1",

@ -8,7 +8,7 @@ import { createThrottle } from '../utils/async.js';
import { tween } from '../utils/tweenUtils.js';
import { DEFAULT_TRACE_TOLERANCE, MAX_TRACE_TOLERANCE } from '../constants/d2Constants.js';
import * as d2Tools from '../constants/d2Tools.js';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
// import createDebug from 'debug';
// const debug = createDebug('d3d:actions');

@ -17,7 +17,7 @@ import keycode from 'keycode';
import bowser from 'bowser';
import * as d2Tools from '../constants/d2Tools.js';
import { isLoaded, load } from '../utils/loaded.js';
import { setConfig } from 'touch-events';
import { setConfig } from '@doodle3d/touch-events';
setConfig({ DRAG_THRESHOLD: 0 });

@ -2,7 +2,7 @@ import React from 'react';
import injectSheet from 'react-jss';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as CAL from 'cal';
import * as CAL from '@doodle3d/cal';
import * as toolNames from '../constants/d2Tools';
import { PIPETTE } from '../constants/contextTools.js';
import { CANVAS_SIZE } from '../constants/d2Constants';

@ -3,7 +3,7 @@ import injectSheet from 'react-jss';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as actions from '../actions/index.js';
import * as CAL from 'cal';
import * as CAL from '@doodle3d/cal';
import { TEXT_TOOL_FONT_SIZE } from '../constants/d2Constants.js';
const CONTEXT = document.createElement('canvas').getContext('2d');

@ -1,4 +1,4 @@
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import transposeEvents from '../utils/transposeEvents.js';
import { PIXEL_RATIO } from '../constants/general.js';
import { convertEvent } from '../utils/pointerUtils.js';

@ -1,5 +1,5 @@
import { Group, Utils } from 'cal';
import createListener from 'touch-events';
import { Group, Utils } from '@doodle3d/cal';
import createListener from '@doodle3d/touch-events';
import bowser from 'bowser';
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
import normalizeWheel from 'normalize-wheel';

@ -1,4 +1,4 @@
import { Color, Vector } from 'cal';
import { Color, Vector } from '@doodle3d/cal';
import { CANVAS_SIZE, GRID_SIZE } from '../constants/d2Constants';
import { PIXEL_RATIO } from '../constants/general.js';

@ -1,5 +1,5 @@
import { IMAGE_GUIDE_TRANSPARENCY, DESELECT_TRANSPARENCY } from '../constants/d2Constants.js';
import { Surface } from 'cal';
import { Surface } from '@doodle3d/cal';
export default class ImageShape extends Surface {
constructor(shapeData) {

@ -1,6 +1,6 @@
import { shapeToPoints } from '../shape/shapeToPoints.js';
import { shapeChanged } from '../shape/shapeDataUtils.js';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
import { LINE_WIDTH } from '../constants/d2Constants.js';
import { hexToStyle } from '../utils/colorUtils.js';
import { DESELECT_TRANSPARENCY, FILL_TRANSPARENCY, LINE_TRANSPARENCY } from '../constants/d2Constants.js';

@ -1,4 +1,4 @@
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import { PIXEL_RATIO } from '../constants/general.js';
export default class TolerancePointer {

@ -1,4 +1,4 @@
import { Text, Color } from 'cal';
import { Text, Color } from '@doodle3d/cal';
export const dimensionsText = new Text({
size: 16,

@ -1,14 +1,14 @@
import EventGroup from '../EventGroup.js';
import * as actions from '../../actions/index.js';
import transposeEvents from '../../utils/transposeEvents.js';
import ClipperShape from 'clipper-js';
import ClipperShape from '@doodle3d/clipper-js';
import { applyMatrixOnShape } from '../../utils/vectorUtils';
import { getPointsBounds } from '../../shape/shapeDataUtils';
import { shapeToPoints } from '../../shape/shapeToPoints';
import { LINE_COLLISION_MARGIN } from '../../constants/d2Constants';
import { LINE_WIDTH } from '../../constants/d2Constants';
import { PIXEL_RATIO } from '../../constants/general';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
const HIT_ORDER = {
RECT: 0,

@ -1,5 +1,5 @@
import BaseTool from './BaseTool.js';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import { PIXEL_RATIO } from '../../constants/general.js';
import { convertEvent } from '../../utils/pointerUtils.js';
// import createDebug from 'debug';

@ -1,4 +1,4 @@
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import BaseTool from './BaseTool.js';
import * as humanReadable from '../../utils/humanReadable.js';
import { dimensionsText } from '../texts.js';

@ -1,5 +1,5 @@
import BaseTool from './BaseTool.js';
import * as CAL from 'cal';
import * as CAL from '@doodle3d/cal';
import TolerancePointer from '../TolerancePointer.js';
import * as actions from '../../actions/index.js';
import { calculateTolerance } from '../../utils/traceUtils';

@ -1,5 +1,5 @@
import BaseTool from './BaseTool.js';
import { Vector, Utils } from 'cal';
import { Vector, Utils } from '@doodle3d/cal';
import * as humanReadable from '../../utils/humanReadable.js';
import { dimensionsText } from '../texts.js';
// import createDebug from 'debug';

@ -1,4 +1,4 @@
import { Vector, Matrix, Image } from 'cal';
import { Vector, Matrix, Image } from '@doodle3d/cal';
import { SELECTION_VIEW_MIN_AXIS_SCALE, SELECTION_VIEW_MIN_SCALE } from '../../constants/d2Constants';
import dottedLineUrl from '../../../img/2d/dotLine01.png';
import rotateHandleUrl from '../../../img/2d/rotateHandle.png';

@ -1,6 +1,6 @@
import * as THREE from 'three';
import { Utils } from 'cal';
import createListener from 'touch-events';
import { Utils } from '@doodle3d/cal';
import createListener from '@doodle3d/touch-events';
import bowser from 'bowser';
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
import normalizeWheel from 'normalize-wheel';

@ -1,5 +1,5 @@
import * as THREE from 'three';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
// import createDebug from 'debug';
// const debug = createDebug('d3d:preview:selectionBox');

@ -1,4 +1,4 @@
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import * as THREE from 'three';
import heightHandleURL from '../../../img/3d/heightHandle.png';
import pivitHandleURL from '../../../img/3d/sculptHandle.png';

@ -1,5 +1,5 @@
import * as THREE from 'three';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import { SHAPE_TYPE_PROPERTIES } from '../../constants/shapeTypeProperties.js';
import * as d3Tools from '../../constants/d3Tools';
import handleURL from '../../../img/3d/sculptHandle.png';

@ -6,7 +6,7 @@ import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
import * as actions from '../actions/index.js';
import { select } from './menusReducer.js';
import { getSelectedObjectsSelector, getBoundingBox } from '../utils/selectionUtils.js';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
import { updateTool as updateTool2d } from './d2/toolReducer.js';
import { updateColor } from './selectionReducer.js';

@ -1,5 +1,5 @@
import { CANVAS_SIZE, INITIAL_IMAGE_SCALE } from '../../constants/d2Constants.js';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
import { addObject } from '../objectReducers.js';
const IMAGE_SIZE = CANVAS_SIZE * 2 * INITIAL_IMAGE_SCALE;

@ -1,4 +1,4 @@
import { Vector, Utils as CALUtils } from 'cal';
import { Vector, Utils as CALUtils } from '@doodle3d/cal';
import { MIN_ZOOM, MAX_ZOOM, CANVAS_SIZE } from '../../constants/d2Constants.js';
export default function constrainMatrix(matrix) {

@ -1,6 +1,6 @@
import update from 'react-addons-update';
import fillPath from 'fill-path';
import ClipperShape from 'clipper-js';
import ClipperShape from '@doodle3d/clipper-js';
import * as actions from '../../../actions/index.js';
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
import { LINE_WIDTH, CLIPPER_PRECISION } from '../../../constants/d2Constants.js';

@ -1,5 +1,5 @@
import * as actions from '../../../actions/index';
import ClipperShape from 'clipper-js';
import ClipperShape from '@doodle3d/clipper-js';
import * as d2Tools from '../../../constants/d2Tools';
import subtractShapeFromState from '../../../utils/subtractShapeFromState';
import { CLIPPER_PRECISION } from '../../../constants/d2Constants.js';

@ -1,5 +1,5 @@
import update from 'react-addons-update';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import createDebug from 'debug';

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
// import createDebug from 'debug';
// const debug = createDebug('d3d:reducer:star');

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
// import createDebug from 'debug';
// const debug = createDebug('d3d:reducer:star');

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import createDebug from 'debug';
const debug = createDebug('d3d:reducer:rect');

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { removeObject, addObjectActive2D, setActive2D } from '../../../objectReducers.js';
import { Vector, Matrix } from 'cal';
import { Vector, Matrix } from '@doodle3d/cal';
import createDebug from 'debug';
const debug = createDebug('d3d:reducer:skewRect');

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
// import createDebug from 'debug';
// const debug = createDebug('d3d:reducer:star');

@ -1,7 +1,7 @@
import update from 'react-addons-update';
import * as actions from '../../../../actions/index.js';
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import createDebug from 'debug';
const debug = createDebug('d3d:reducer:triangle');

@ -1,4 +1,4 @@
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import update from 'react-addons-update';
import * as actions from '../../../actions/index.js';
import createDebug from 'debug';

@ -1,5 +1,5 @@
import update from 'react-addons-update';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import { CANVAS_SIZE } from '../../../constants/d2Constants.js';
import * as actions from '../../../actions/index.js';
import { calculateGestureMatrix } from '../../../utils/matrixUtils.js';

@ -1,5 +1,5 @@
import update from 'react-addons-update';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
import constrainMatrix from './constrainMatrix.js';
import { MAX_ZOOM } from '../../constants/d2Constants.js';

@ -1,5 +1,5 @@
import update from 'react-addons-update';
import { Utils } from 'cal';
import { Utils } from '@doodle3d/cal';
import * as THREE from 'three';
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
import * as d3Tools from '../../../constants/d3Tools.js';

@ -1,5 +1,5 @@
import update from 'react-addons-update';
import { Utils } from 'cal';
import { Utils } from '@doodle3d/cal';
import * as actions from '../../../actions/index.js';
import * as d3Tools from '../../../constants/d3Tools';
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';

@ -18,7 +18,7 @@ import d2PanZoomReducer from './d2/panReducer.js';
import selectionReducer from './selectionReducer.js';
import selectionOperationReducer from './selectionOperationReducer.js';
import contextReducer from './contextReducer.js';
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
import { setActiveSpace, addSpaceActive, setActive2D, getActive2D, addObject } from './objectReducers.js';
import menusReducer from './menusReducer.js';
// import createDebug from 'debug';

@ -1,6 +1,6 @@
import update from 'react-addons-update';
import ClipperShape from 'clipper-js';
import { Matrix } from 'cal';
import ClipperShape from '@doodle3d/clipper-js';
import { Matrix } from '@doodle3d/cal';
import { addObject, removeObject } from './objectReducers.js';
import { recursiveClone } from '../utils/clone.js';
import { shapeToPoints } from '../shape/shapeToPoints.js';

@ -1,6 +1,6 @@
import update from 'react-addons-update';
import * as actions from '../actions/index.js';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import { shapeToPoints } from '../shape/shapeToPoints.js';
import createDebug from 'debug';
const debug = createDebug('d3d:reducer:selection');

@ -1,6 +1,6 @@
import fitCurve from 'fit-curve';
import Bezier from 'bezier-js';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
const DEFAULT_CURVE_ERROR = 3.0;
const DEFAULT_DISTANCE_THRESHOLD = 1.0;

@ -1,4 +1,4 @@
import { Matrix, Vector } from 'cal';
import { Matrix, Vector } from '@doodle3d/cal';
export function calculateGestureMatrix(positions, previousPositions, screenMatrix, { rotate, scale, pan }) {
const matrix = screenMatrix.inverseMatrix();

@ -1,4 +1,4 @@
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
export function convertEvent(DOMNode, event) {
const { left, top } = DOMNode.getBoundingClientRect();

@ -1,7 +1,7 @@
import * as THREE from 'three';
import { shapeToPoints } from '../shape/shapeToPoints.js';
import { getPointsBounds } from '../shape/shapeDataUtils.js';
import { Vector } from 'cal';
import { Vector } from '@doodle3d/cal';
import arrayMemoizer from './arrayMemoizer.js';
import memoize from 'memoizee';
// import createDebug from 'debug';

@ -1,6 +1,6 @@
import update from 'react-addons-update';
import { Matrix } from 'cal';
import ClipperShape from 'clipper-js';
import { Matrix } from '@doodle3d/cal';
import ClipperShape from '@doodle3d/clipper-js';
import { recursiveClone } from './clone.js';
import { addObject, removeObject } from '../reducer/objectReducers.js';
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';

@ -1,5 +1,5 @@
import { applyMatrixOnPath, pathToVectorPath } from './vectorUtils.js';
import { Matrix } from 'cal';
import { Matrix } from '@doodle3d/cal';
import TraceWorker from '../../workers/trace.worker.js';
import { getPixel } from './colorUtils.js';
import memoize from 'memoizee';

@ -29,19 +29,6 @@ module.exports = {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
alias: {
'doodle3d-core': path.resolve(__dirname, devMode ? 'module' : 'lib'),
'clipper-lib': '@doodle3d/clipper-lib',
'clipper-js': '@doodle3d/clipper-js',
'cal': '@doodle3d/cal',
'touch-events': '@doodle3d/touch-events',
'potrace-js': '@doodle3d/potrace-js',
'fill-path': '@doodle3d/fill-path',
'threejs-export-stl': '@doodle3d/threejs-export-stl',
'threejs-export-obj': '@doodle3d/threejs-export-obj'
}
},
module: {
rules: [
{
@ -69,7 +56,7 @@ module.exports = {
}
}, {
test: /\.(woff)$/,
use: {
use: {
loader: 'file-loader'
}
}, {

@ -1,6 +1,6 @@
import 'babel-polyfill';
import * as POTRACE from 'potrace-js';
import { POTRACE_OPTIONS } from 'doodle3d-core/constants/d2Constants.js';
import * as POTRACE from '@doodle3d/potrace-js';
import { POTRACE_OPTIONS } from '../src/constants/d2Constants.js';
self.addEventListener('message', (event) => {
switch (event.data.msg) {

Loading…
Cancel
Save