Clipper-js dependency

This commit is contained in:
peteruithoven 2017-07-20 11:51:48 +02:00
parent a0747d6db2
commit f330aad040
11 changed files with 25 additions and 10 deletions

13
package-lock.json generated
View File

@ -817,6 +817,19 @@
"readdirp": "2.1.0"
}
},
"clipper-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/clipper-js/-/clipper-js-1.0.2.tgz",
"integrity": "sha1-5EiR3eZULMfQvMbvloTUWQVxSJM=",
"requires": {
"clipper-lib": "6.2.1"
}
},
"clipper-lib": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/clipper-lib/-/clipper-lib-6.2.1.tgz",
"integrity": "sha1-Jm2Ox1dcWJ8F8j6c0APeUOIxF7Y="
},
"commander": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",

View File

@ -12,7 +12,9 @@
"build:main:settings": "cp -r src/settings lib",
"build:module:settings": "cp -r src/settings module"
},
"dependencies": {},
"dependencies": {
"clipper-js": "^1.0.2"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",

View File

@ -1,4 +1,4 @@
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
import { PRECISION } from '../constants.js';
const offsetOptions = {

View File

@ -1,6 +1,6 @@
import { PRECISION } from '../constants.js'
import getFillTemplate from './getFillTemplate.js';
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default function generateInfills(slices, settings) {
let {

View File

@ -1,4 +1,4 @@
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default function calculateOutlines(slices, settings) {
for (let layer = 0; layer < slices.length; layer ++) {

View File

@ -1,5 +1,5 @@
import getFillTemplate from './getFillTemplate.js';
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
import { PRECISION } from '../constants.js';
export default function generateSupport(slices, settings) {

View File

@ -1,4 +1,4 @@
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default function getFillTemplate(bounds, size, even, uneven) {
const paths = [];

View File

@ -1,4 +1,4 @@
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default class {
constructor() {

View File

@ -1,5 +1,5 @@
import * as THREE from 'three';
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default function intersectionsToShapes(layerIntersectionIndexes, layerIntersectionPoints, lines, settings) {
const layers = [];

View File

@ -1,5 +1,5 @@
import * as THREE from 'three';
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
export default function optimizePaths(slices, settings) {
const start = new THREE.Vector2(0, 0);

View File

@ -1,4 +1,4 @@
import Shape from 'Doodle3D/clipper-js';
import Shape from 'clipper-js';
import Slice from './helpers/Slice.js';
import { CLEAN_DELTA, PRECISION } from '../constants.js';