mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 02:53:50 +01:00
simplify imports
This commit is contained in:
parent
87b6e9851b
commit
f613c2b68d
36
package-lock.json
generated
36
package-lock.json
generated
@ -10,8 +10,7 @@
|
|||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@doodle3d/cal": "0.0.8",
|
"@doodle3d/cal": "0.0.8",
|
||||||
"@doodle3d/clipper-js": "^1.0.7",
|
"@doodle3d/clipper-js": "^1.0.11",
|
||||||
"@doodle3d/fill-path": "^1.0.7",
|
|
||||||
"@doodle3d/potrace-js": "0.0.6",
|
"@doodle3d/potrace-js": "0.0.6",
|
||||||
"@doodle3d/threejs-export-obj": "0.0.8",
|
"@doodle3d/threejs-export-obj": "0.0.8",
|
||||||
"@doodle3d/threejs-export-stl": "0.0.5",
|
"@doodle3d/threejs-export-stl": "0.0.5",
|
||||||
@ -21,6 +20,7 @@
|
|||||||
"blueimp-canvas-to-blob": "^3.14.0",
|
"blueimp-canvas-to-blob": "^3.14.0",
|
||||||
"bowser": "^1.8.1",
|
"bowser": "^1.8.1",
|
||||||
"file-loader": "^0.11.2",
|
"file-loader": "^0.11.2",
|
||||||
|
"fill-path": "^1.0.9",
|
||||||
"fit-curve": "^0.1.6",
|
"fit-curve": "^0.1.6",
|
||||||
"font-loaded": "^1.0.0",
|
"font-loaded": "^1.0.0",
|
||||||
"imports-loader": "^0.7.1",
|
"imports-loader": "^0.7.1",
|
||||||
@ -148,14 +148,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@doodle3d/clipper-lib/-/clipper-lib-6.4.2-b.tgz",
|
"resolved": "https://registry.npmjs.org/@doodle3d/clipper-lib/-/clipper-lib-6.4.2-b.tgz",
|
||||||
"integrity": "sha512-glELSijsD9b+/0d9iOdasBwqH3s+xPxD59tJ7aXkBx7klugygGOMXn7PB05AdhVyA1OYMj7GUCegaQa7nvLtmQ=="
|
"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": {
|
"node_modules/@doodle3d/potrace-js": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
|
||||||
@ -4986,6 +4978,14 @@
|
|||||||
"node": ">= 0.4.0"
|
"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": {
|
"node_modules/fill-range": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
|
"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",
|
"resolved": "https://registry.npmjs.org/@doodle3d/clipper-lib/-/clipper-lib-6.4.2-b.tgz",
|
||||||
"integrity": "sha512-glELSijsD9b+/0d9iOdasBwqH3s+xPxD59tJ7aXkBx7klugygGOMXn7PB05AdhVyA1OYMj7GUCegaQa7nvLtmQ=="
|
"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": {
|
"@doodle3d/potrace-js": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@doodle3d/potrace-js/-/potrace-js-0.0.6.tgz",
|
||||||
@ -22335,6 +22327,14 @@
|
|||||||
"integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==",
|
"integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==",
|
||||||
"dev": true
|
"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": {
|
"fill-range": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@doodle3d/cal": "0.0.8",
|
"@doodle3d/cal": "0.0.8",
|
||||||
"@doodle3d/clipper-js": "^1.0.7",
|
"@doodle3d/clipper-js": "^1.0.11",
|
||||||
"@doodle3d/fill-path": "^1.0.7",
|
|
||||||
"@doodle3d/potrace-js": "0.0.6",
|
"@doodle3d/potrace-js": "0.0.6",
|
||||||
"@doodle3d/threejs-export-obj": "0.0.8",
|
"@doodle3d/threejs-export-obj": "0.0.8",
|
||||||
"@doodle3d/threejs-export-stl": "0.0.5",
|
"@doodle3d/threejs-export-stl": "0.0.5",
|
||||||
@ -29,6 +28,7 @@
|
|||||||
"blueimp-canvas-to-blob": "^3.14.0",
|
"blueimp-canvas-to-blob": "^3.14.0",
|
||||||
"bowser": "^1.8.1",
|
"bowser": "^1.8.1",
|
||||||
"file-loader": "^0.11.2",
|
"file-loader": "^0.11.2",
|
||||||
|
"fill-path": "^1.0.9",
|
||||||
"fit-curve": "^0.1.6",
|
"fit-curve": "^0.1.6",
|
||||||
"font-loaded": "^1.0.0",
|
"font-loaded": "^1.0.0",
|
||||||
"imports-loader": "^0.7.1",
|
"imports-loader": "^0.7.1",
|
||||||
|
@ -8,7 +8,7 @@ import { createThrottle } from '../utils/async.js';
|
|||||||
import { tween } from '../utils/tweenUtils.js';
|
import { tween } from '../utils/tweenUtils.js';
|
||||||
import { DEFAULT_TRACE_TOLERANCE, MAX_TRACE_TOLERANCE } from '../constants/d2Constants.js';
|
import { DEFAULT_TRACE_TOLERANCE, MAX_TRACE_TOLERANCE } from '../constants/d2Constants.js';
|
||||||
import * as d2Tools from '../constants/d2Tools.js';
|
import * as d2Tools from '../constants/d2Tools.js';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
// const debug = createDebug('d3d:actions');
|
// const debug = createDebug('d3d:actions');
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import keycode from 'keycode';
|
|||||||
import bowser from 'bowser';
|
import bowser from 'bowser';
|
||||||
import * as d2Tools from '../constants/d2Tools.js';
|
import * as d2Tools from '../constants/d2Tools.js';
|
||||||
import { isLoaded, load } from '../utils/loaded.js';
|
import { isLoaded, load } from '../utils/loaded.js';
|
||||||
import { setConfig } from 'touch-events';
|
import { setConfig } from '@doodle3d/touch-events';
|
||||||
|
|
||||||
setConfig({ DRAG_THRESHOLD: 0 });
|
setConfig({ DRAG_THRESHOLD: 0 });
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import injectSheet from 'react-jss';
|
import injectSheet from 'react-jss';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as CAL from 'cal';
|
import * as CAL from '@doodle3d/cal';
|
||||||
import * as toolNames from '../constants/d2Tools';
|
import * as toolNames from '../constants/d2Tools';
|
||||||
import { PIPETTE } from '../constants/contextTools.js';
|
import { PIPETTE } from '../constants/contextTools.js';
|
||||||
import { CANVAS_SIZE } from '../constants/d2Constants';
|
import { CANVAS_SIZE } from '../constants/d2Constants';
|
||||||
|
@ -3,7 +3,7 @@ import injectSheet from 'react-jss';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as actions from '../actions/index.js';
|
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';
|
import { TEXT_TOOL_FONT_SIZE } from '../constants/d2Constants.js';
|
||||||
|
|
||||||
const CONTEXT = document.createElement('canvas').getContext('2d');
|
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 transposeEvents from '../utils/transposeEvents.js';
|
||||||
import { PIXEL_RATIO } from '../constants/general.js';
|
import { PIXEL_RATIO } from '../constants/general.js';
|
||||||
import { convertEvent } from '../utils/pointerUtils.js';
|
import { convertEvent } from '../utils/pointerUtils.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Group, Utils } from 'cal';
|
import { Group, Utils } from '@doodle3d/cal';
|
||||||
import createListener from 'touch-events';
|
import createListener from '@doodle3d/touch-events';
|
||||||
import bowser from 'bowser';
|
import bowser from 'bowser';
|
||||||
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
|
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
|
||||||
import normalizeWheel from 'normalize-wheel';
|
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 { CANVAS_SIZE, GRID_SIZE } from '../constants/d2Constants';
|
||||||
import { PIXEL_RATIO } from '../constants/general.js';
|
import { PIXEL_RATIO } from '../constants/general.js';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IMAGE_GUIDE_TRANSPARENCY, DESELECT_TRANSPARENCY } from '../constants/d2Constants.js';
|
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 {
|
export default class ImageShape extends Surface {
|
||||||
constructor(shapeData) {
|
constructor(shapeData) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
||||||
import { shapeChanged } from '../shape/shapeDataUtils.js';
|
import { shapeChanged } from '../shape/shapeDataUtils.js';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import { LINE_WIDTH } from '../constants/d2Constants.js';
|
import { LINE_WIDTH } from '../constants/d2Constants.js';
|
||||||
import { hexToStyle } from '../utils/colorUtils.js';
|
import { hexToStyle } from '../utils/colorUtils.js';
|
||||||
import { DESELECT_TRANSPARENCY, FILL_TRANSPARENCY, LINE_TRANSPARENCY } from '../constants/d2Constants.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';
|
import { PIXEL_RATIO } from '../constants/general.js';
|
||||||
|
|
||||||
export default class TolerancePointer {
|
export default class TolerancePointer {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Text, Color } from 'cal';
|
import { Text, Color } from '@doodle3d/cal';
|
||||||
|
|
||||||
export const dimensionsText = new Text({
|
export const dimensionsText = new Text({
|
||||||
size: 16,
|
size: 16,
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import EventGroup from '../EventGroup.js';
|
import EventGroup from '../EventGroup.js';
|
||||||
import * as actions from '../../actions/index.js';
|
import * as actions from '../../actions/index.js';
|
||||||
import transposeEvents from '../../utils/transposeEvents.js';
|
import transposeEvents from '../../utils/transposeEvents.js';
|
||||||
import ClipperShape from 'clipper-js';
|
import ClipperShape from '@doodle3d/clipper-js';
|
||||||
import { applyMatrixOnShape } from '../../utils/vectorUtils';
|
import { applyMatrixOnShape } from '../../utils/vectorUtils';
|
||||||
import { getPointsBounds } from '../../shape/shapeDataUtils';
|
import { getPointsBounds } from '../../shape/shapeDataUtils';
|
||||||
import { shapeToPoints } from '../../shape/shapeToPoints';
|
import { shapeToPoints } from '../../shape/shapeToPoints';
|
||||||
import { LINE_COLLISION_MARGIN } from '../../constants/d2Constants';
|
import { LINE_COLLISION_MARGIN } from '../../constants/d2Constants';
|
||||||
import { LINE_WIDTH } from '../../constants/d2Constants';
|
import { LINE_WIDTH } from '../../constants/d2Constants';
|
||||||
import { PIXEL_RATIO } from '../../constants/general';
|
import { PIXEL_RATIO } from '../../constants/general';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
|
|
||||||
const HIT_ORDER = {
|
const HIT_ORDER = {
|
||||||
RECT: 0,
|
RECT: 0,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BaseTool from './BaseTool.js';
|
import BaseTool from './BaseTool.js';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import { PIXEL_RATIO } from '../../constants/general.js';
|
import { PIXEL_RATIO } from '../../constants/general.js';
|
||||||
import { convertEvent } from '../../utils/pointerUtils.js';
|
import { convertEvent } from '../../utils/pointerUtils.js';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import BaseTool from './BaseTool.js';
|
import BaseTool from './BaseTool.js';
|
||||||
import * as humanReadable from '../../utils/humanReadable.js';
|
import * as humanReadable from '../../utils/humanReadable.js';
|
||||||
import { dimensionsText } from '../texts.js';
|
import { dimensionsText } from '../texts.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BaseTool from './BaseTool.js';
|
import BaseTool from './BaseTool.js';
|
||||||
import * as CAL from 'cal';
|
import * as CAL from '@doodle3d/cal';
|
||||||
import TolerancePointer from '../TolerancePointer.js';
|
import TolerancePointer from '../TolerancePointer.js';
|
||||||
import * as actions from '../../actions/index.js';
|
import * as actions from '../../actions/index.js';
|
||||||
import { calculateTolerance } from '../../utils/traceUtils';
|
import { calculateTolerance } from '../../utils/traceUtils';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BaseTool from './BaseTool.js';
|
import BaseTool from './BaseTool.js';
|
||||||
import { Vector, Utils } from 'cal';
|
import { Vector, Utils } from '@doodle3d/cal';
|
||||||
import * as humanReadable from '../../utils/humanReadable.js';
|
import * as humanReadable from '../../utils/humanReadable.js';
|
||||||
import { dimensionsText } from '../texts.js';
|
import { dimensionsText } from '../texts.js';
|
||||||
// import createDebug from 'debug';
|
// 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 { SELECTION_VIEW_MIN_AXIS_SCALE, SELECTION_VIEW_MIN_SCALE } from '../../constants/d2Constants';
|
||||||
import dottedLineUrl from '../../../img/2d/dotLine01.png';
|
import dottedLineUrl from '../../../img/2d/dotLine01.png';
|
||||||
import rotateHandleUrl from '../../../img/2d/rotateHandle.png';
|
import rotateHandleUrl from '../../../img/2d/rotateHandle.png';
|
||||||
|
4
src/d3/EventScene.js
vendored
4
src/d3/EventScene.js
vendored
@ -1,6 +1,6 @@
|
|||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { Utils } from 'cal';
|
import { Utils } from '@doodle3d/cal';
|
||||||
import createListener from 'touch-events';
|
import createListener from '@doodle3d/touch-events';
|
||||||
import bowser from 'bowser';
|
import bowser from 'bowser';
|
||||||
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
|
import { convertEvent, isMouseEvent } from '../utils/pointerUtils.js';
|
||||||
import normalizeWheel from 'normalize-wheel';
|
import normalizeWheel from 'normalize-wheel';
|
||||||
|
2
src/d3/SelectionBox.js
vendored
2
src/d3/SelectionBox.js
vendored
@ -1,5 +1,5 @@
|
|||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
// const debug = createDebug('d3d:preview:selectionBox');
|
// const debug = createDebug('d3d:preview:selectionBox');
|
||||||
|
|
||||||
|
2
src/d3/transformers/HeightTransformer.js
vendored
2
src/d3/transformers/HeightTransformer.js
vendored
@ -1,4 +1,4 @@
|
|||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import heightHandleURL from '../../../img/3d/heightHandle.png';
|
import heightHandleURL from '../../../img/3d/heightHandle.png';
|
||||||
import pivitHandleURL from '../../../img/3d/sculptHandle.png';
|
import pivitHandleURL from '../../../img/3d/sculptHandle.png';
|
||||||
|
2
src/d3/transformers/SculptTransformer.js
vendored
2
src/d3/transformers/SculptTransformer.js
vendored
@ -1,5 +1,5 @@
|
|||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../../constants/shapeTypeProperties.js';
|
||||||
import * as d3Tools from '../../constants/d3Tools';
|
import * as d3Tools from '../../constants/d3Tools';
|
||||||
import handleURL from '../../../img/3d/sculptHandle.png';
|
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 * as actions from '../actions/index.js';
|
||||||
import { select } from './menusReducer.js';
|
import { select } from './menusReducer.js';
|
||||||
import { getSelectedObjectsSelector, getBoundingBox } from '../utils/selectionUtils.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 { updateTool as updateTool2d } from './d2/toolReducer.js';
|
||||||
import { updateColor } from './selectionReducer.js';
|
import { updateColor } from './selectionReducer.js';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CANVAS_SIZE, INITIAL_IMAGE_SCALE } from '../../constants/d2Constants.js';
|
import { CANVAS_SIZE, INITIAL_IMAGE_SCALE } from '../../constants/d2Constants.js';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import { addObject } from '../objectReducers.js';
|
import { addObject } from '../objectReducers.js';
|
||||||
|
|
||||||
const IMAGE_SIZE = CANVAS_SIZE * 2 * INITIAL_IMAGE_SCALE;
|
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';
|
import { MIN_ZOOM, MAX_ZOOM, CANVAS_SIZE } from '../../constants/d2Constants.js';
|
||||||
|
|
||||||
export default function constrainMatrix(matrix) {
|
export default function constrainMatrix(matrix) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import fillPath from 'fill-path';
|
import fillPath from 'fill-path';
|
||||||
import ClipperShape from 'clipper-js';
|
import ClipperShape from '@doodle3d/clipper-js';
|
||||||
import * as actions from '../../../actions/index.js';
|
import * as actions from '../../../actions/index.js';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
||||||
import { LINE_WIDTH, CLIPPER_PRECISION } from '../../../constants/d2Constants.js';
|
import { LINE_WIDTH, CLIPPER_PRECISION } from '../../../constants/d2Constants.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as actions from '../../../actions/index';
|
import * as actions from '../../../actions/index';
|
||||||
import ClipperShape from 'clipper-js';
|
import ClipperShape from '@doodle3d/clipper-js';
|
||||||
import * as d2Tools from '../../../constants/d2Tools';
|
import * as d2Tools from '../../../constants/d2Tools';
|
||||||
import subtractShapeFromState from '../../../utils/subtractShapeFromState';
|
import subtractShapeFromState from '../../../utils/subtractShapeFromState';
|
||||||
import { CLIPPER_PRECISION } from '../../../constants/d2Constants.js';
|
import { CLIPPER_PRECISION } from '../../../constants/d2Constants.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import update from 'react-addons-update';
|
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 * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
// const debug = createDebug('d3d:reducer:star');
|
// const debug = createDebug('d3d:reducer:star');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
// const debug = createDebug('d3d:reducer:star');
|
// const debug = createDebug('d3d:reducer:star');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
const debug = createDebug('d3d:reducer:rect');
|
const debug = createDebug('d3d:reducer:rect');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { removeObject, addObjectActive2D, setActive2D } from '../../../objectReducers.js';
|
import { removeObject, addObjectActive2D, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Vector, Matrix } from 'cal';
|
import { Vector, Matrix } from '@doodle3d/cal';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
const debug = createDebug('d3d:reducer:skewRect');
|
const debug = createDebug('d3d:reducer:skewRect');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
// const debug = createDebug('d3d:reducer:star');
|
// const debug = createDebug('d3d:reducer:star');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../../../../actions/index.js';
|
import * as actions from '../../../../actions/index.js';
|
||||||
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js';
|
||||||
import { Matrix, Vector } from 'cal';
|
import { Matrix, Vector } from '@doodle3d/cal';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
const debug = createDebug('d3d:reducer:triangle');
|
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 update from 'react-addons-update';
|
||||||
import * as actions from '../../../actions/index.js';
|
import * as actions from '../../../actions/index.js';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import update from 'react-addons-update';
|
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 { CANVAS_SIZE } from '../../../constants/d2Constants.js';
|
||||||
import * as actions from '../../../actions/index.js';
|
import * as actions from '../../../actions/index.js';
|
||||||
import { calculateGestureMatrix } from '../../../utils/matrixUtils.js';
|
import { calculateGestureMatrix } from '../../../utils/matrixUtils.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import constrainMatrix from './constrainMatrix.js';
|
import constrainMatrix from './constrainMatrix.js';
|
||||||
import { MAX_ZOOM } from '../../constants/d2Constants.js';
|
import { MAX_ZOOM } from '../../constants/d2Constants.js';
|
||||||
|
|
||||||
|
2
src/reducer/d3/tools/heightReducer.js
vendored
2
src/reducer/d3/tools/heightReducer.js
vendored
@ -1,5 +1,5 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import { Utils } from 'cal';
|
import { Utils } from '@doodle3d/cal';
|
||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
||||||
import * as d3Tools from '../../../constants/d3Tools.js';
|
import * as d3Tools from '../../../constants/d3Tools.js';
|
||||||
|
2
src/reducer/d3/tools/twistReducer.js
vendored
2
src/reducer/d3/tools/twistReducer.js
vendored
@ -1,5 +1,5 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import { Utils } from 'cal';
|
import { Utils } from '@doodle3d/cal';
|
||||||
import * as actions from '../../../actions/index.js';
|
import * as actions from '../../../actions/index.js';
|
||||||
import * as d3Tools from '../../../constants/d3Tools';
|
import * as d3Tools from '../../../constants/d3Tools';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js';
|
||||||
|
@ -18,7 +18,7 @@ import d2PanZoomReducer from './d2/panReducer.js';
|
|||||||
import selectionReducer from './selectionReducer.js';
|
import selectionReducer from './selectionReducer.js';
|
||||||
import selectionOperationReducer from './selectionOperationReducer.js';
|
import selectionOperationReducer from './selectionOperationReducer.js';
|
||||||
import contextReducer from './contextReducer.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 { setActiveSpace, addSpaceActive, setActive2D, getActive2D, addObject } from './objectReducers.js';
|
||||||
import menusReducer from './menusReducer.js';
|
import menusReducer from './menusReducer.js';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import ClipperShape from 'clipper-js';
|
import ClipperShape from '@doodle3d/clipper-js';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import { addObject, removeObject } from './objectReducers.js';
|
import { addObject, removeObject } from './objectReducers.js';
|
||||||
import { recursiveClone } from '../utils/clone.js';
|
import { recursiveClone } from '../utils/clone.js';
|
||||||
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import * as actions from '../actions/index.js';
|
import * as actions from '../actions/index.js';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
||||||
import createDebug from 'debug';
|
import createDebug from 'debug';
|
||||||
const debug = createDebug('d3d:reducer:selection');
|
const debug = createDebug('d3d:reducer:selection');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import fitCurve from 'fit-curve';
|
import fitCurve from 'fit-curve';
|
||||||
import Bezier from 'bezier-js';
|
import Bezier from 'bezier-js';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
|
|
||||||
const DEFAULT_CURVE_ERROR = 3.0;
|
const DEFAULT_CURVE_ERROR = 3.0;
|
||||||
const DEFAULT_DISTANCE_THRESHOLD = 1.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 }) {
|
export function calculateGestureMatrix(positions, previousPositions, screenMatrix, { rotate, scale, pan }) {
|
||||||
const matrix = screenMatrix.inverseMatrix();
|
const matrix = screenMatrix.inverseMatrix();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
|
|
||||||
export function convertEvent(DOMNode, event) {
|
export function convertEvent(DOMNode, event) {
|
||||||
const { left, top } = DOMNode.getBoundingClientRect();
|
const { left, top } = DOMNode.getBoundingClientRect();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
import { shapeToPoints } from '../shape/shapeToPoints.js';
|
||||||
import { getPointsBounds } from '../shape/shapeDataUtils.js';
|
import { getPointsBounds } from '../shape/shapeDataUtils.js';
|
||||||
import { Vector } from 'cal';
|
import { Vector } from '@doodle3d/cal';
|
||||||
import arrayMemoizer from './arrayMemoizer.js';
|
import arrayMemoizer from './arrayMemoizer.js';
|
||||||
import memoize from 'memoizee';
|
import memoize from 'memoizee';
|
||||||
// import createDebug from 'debug';
|
// import createDebug from 'debug';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import ClipperShape from 'clipper-js';
|
import ClipperShape from '@doodle3d/clipper-js';
|
||||||
import { recursiveClone } from './clone.js';
|
import { recursiveClone } from './clone.js';
|
||||||
import { addObject, removeObject } from '../reducer/objectReducers.js';
|
import { addObject, removeObject } from '../reducer/objectReducers.js';
|
||||||
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
|
import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { applyMatrixOnPath, pathToVectorPath } from './vectorUtils.js';
|
import { applyMatrixOnPath, pathToVectorPath } from './vectorUtils.js';
|
||||||
import { Matrix } from 'cal';
|
import { Matrix } from '@doodle3d/cal';
|
||||||
import TraceWorker from '../../workers/trace.worker.js';
|
import TraceWorker from '../../workers/trace.worker.js';
|
||||||
import { getPixel } from './colorUtils.js';
|
import { getPixel } from './colorUtils.js';
|
||||||
import memoize from 'memoizee';
|
import memoize from 'memoizee';
|
||||||
|
@ -29,19 +29,6 @@ module.exports = {
|
|||||||
filename: 'bundle.js',
|
filename: 'bundle.js',
|
||||||
path: path.resolve(__dirname, 'dist')
|
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: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
@ -69,7 +56,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
test: /\.(woff)$/,
|
test: /\.(woff)$/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'file-loader'
|
loader: 'file-loader'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import 'babel-polyfill';
|
import 'babel-polyfill';
|
||||||
import * as POTRACE from 'potrace-js';
|
import * as POTRACE from '@doodle3d/potrace-js';
|
||||||
import { POTRACE_OPTIONS } from 'doodle3d-core/constants/d2Constants.js';
|
import { POTRACE_OPTIONS } from '../src/constants/d2Constants.js';
|
||||||
|
|
||||||
self.addEventListener('message', (event) => {
|
self.addEventListener('message', (event) => {
|
||||||
switch (event.data.msg) {
|
switch (event.data.msg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user