mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 15:34:57 +01:00
update three.js
This commit is contained in:
parent
b3300decb7
commit
a9ae3b220e
@ -18,7 +18,8 @@ SystemJS.config({
|
|||||||
"zlib": "github:jspm/nodelibs-zlib@0.2.0-alpha",
|
"zlib": "github:jspm/nodelibs-zlib@0.2.0-alpha",
|
||||||
"https": "github:jspm/nodelibs-https@0.2.0-alpha",
|
"https": "github:jspm/nodelibs-https@0.2.0-alpha",
|
||||||
"react-dom": "npm:react-dom@15.3.2",
|
"react-dom": "npm:react-dom@15.3.2",
|
||||||
"babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@6.8.0"
|
"babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@6.8.0",
|
||||||
|
"three.js/loaders/STLLoader": "github:mrdoob/three.js@r83/examples/js/loaders/STLLoader.js"
|
||||||
},
|
},
|
||||||
"packages": {
|
"packages": {
|
||||||
"npm:babel-runtime@5.8.38": {
|
"npm:babel-runtime@5.8.38": {
|
||||||
@ -146,7 +147,7 @@ SystemJS.config({
|
|||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
"babel": "npm:babel-core@5.8.38",
|
"babel": "npm:babel-core@5.8.38",
|
||||||
"three.js/loaders/STLLoader": "github:mrdoob/three.js@r75/examples/js/loaders/STLLoader.js",
|
"three.js/loaders/STLLoader": "github:mrdoob/three.js@r75/examples/js/loaders/STLLoader.js"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -157,6 +158,7 @@ SystemJS.config({
|
|||||||
"github:*/*.json"
|
"github:*/*.json"
|
||||||
],
|
],
|
||||||
map: {
|
map: {
|
||||||
|
"three.js": "github:mrdoob/three.js@r83",
|
||||||
"assert": "github:jspm/nodelibs-assert@0.2.0-alpha",
|
"assert": "github:jspm/nodelibs-assert@0.2.0-alpha",
|
||||||
"buffer": "github:jspm/nodelibs-buffer@0.2.0-alpha",
|
"buffer": "github:jspm/nodelibs-buffer@0.2.0-alpha",
|
||||||
"child_process": "github:jspm/nodelibs-child_process@0.2.0-alpha",
|
"child_process": "github:jspm/nodelibs-child_process@0.2.0-alpha",
|
||||||
@ -173,7 +175,6 @@ SystemJS.config({
|
|||||||
"process": "github:jspm/nodelibs-process@0.2.0-alpha",
|
"process": "github:jspm/nodelibs-process@0.2.0-alpha",
|
||||||
"stream": "github:jspm/nodelibs-stream@0.2.0-alpha",
|
"stream": "github:jspm/nodelibs-stream@0.2.0-alpha",
|
||||||
"string_decoder": "github:jspm/nodelibs-string_decoder@0.2.0-alpha",
|
"string_decoder": "github:jspm/nodelibs-string_decoder@0.2.0-alpha",
|
||||||
"three.js": "github:mrdoob/three.js@r75",
|
|
||||||
"tty": "github:jspm/nodelibs-tty@0.2.0-alpha",
|
"tty": "github:jspm/nodelibs-tty@0.2.0-alpha",
|
||||||
"url": "github:jspm/nodelibs-url@0.2.0-alpha",
|
"url": "github:jspm/nodelibs-url@0.2.0-alpha",
|
||||||
"util": "github:jspm/nodelibs-util@0.2.0-alpha",
|
"util": "github:jspm/nodelibs-util@0.2.0-alpha",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
|
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
|
||||||
"json": "github:systemjs/plugin-json@^0.1.2",
|
"json": "github:systemjs/plugin-json@^0.1.2",
|
||||||
"three.js": "github:mrdoob/three.js@r75",
|
"three.js": "github:mrdoob/three.js@r83",
|
||||||
"worker": "github:casperlamboo/plugin-worker@master"
|
"worker": "github:casperlamboo/plugin-worker@master"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -43,7 +43,7 @@
|
|||||||
"vm": "github:jspm/nodelibs-vm@^0.2.0-alpha"
|
"vm": "github:jspm/nodelibs-vm@^0.2.0-alpha"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"github:mrdoob/three.js@r75": {
|
"github:mrdoob/three.js@r83": {
|
||||||
"format": "global"
|
"format": "global"
|
||||||
},
|
},
|
||||||
"npm:babel-runtime@5.8.38": {
|
"npm:babel-runtime@5.8.38": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
|
|
||||||
const G_COMMAND = 'G';
|
const G_COMMAND = 'G';
|
||||||
const M_COMMAND = 'M';
|
const M_COMMAND = 'M';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
import slice from './sliceActions/slice.js';
|
import slice from './sliceActions/slice.js';
|
||||||
import SlicerWorker from './slicerWorker.js!worker';
|
import SlicerWorker from './slicerWorker.js!worker';
|
||||||
|
|
||||||
@ -11,15 +11,15 @@ export default class {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
setGeometry(geometry, matrix) {
|
setGeometry(geometry, matrix) {
|
||||||
if (geometry instanceof THREE.BufferGeometry) {
|
if (geometry.type === 'BufferGeometry') {
|
||||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||||
} else if (geometry instanceof THREE.Geometry) {
|
} else if (geometry.type === 'Geometry') {
|
||||||
geometry = geometry.clone();
|
geometry = geometry.clone();
|
||||||
} else {
|
} else {
|
||||||
throw 'Geometry is not an instance of BufferGeometry or Geometry';
|
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matrix instanceof THREE.Matrix4) {
|
if (matrix) {
|
||||||
geometry.applyMatrix(matrix);
|
geometry.applyMatrix(matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
import { PRECISION } from '../constants.js';
|
import { PRECISION } from '../constants.js';
|
||||||
|
|
||||||
const offsetOptions = {
|
const offsetOptions = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
|
|
||||||
export default function calculateLayersIntersections(lines, settings) {
|
export default function calculateLayersIntersections(lines, settings) {
|
||||||
console.log('calculating layer intersections');
|
console.log('calculating layer intersections');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
|
|
||||||
function addLine(geometry, lineLookup, lines, a, b) {
|
function addLine(geometry, lineLookup, lines, a, b) {
|
||||||
const index = lines.length;
|
const index = lines.length;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
import Shape from 'Doodle3D/clipper-js';
|
import Shape from 'Doodle3D/clipper-js';
|
||||||
|
|
||||||
export default function intersectionsToShapes(layerIntersectionIndexes, layerIntersectionPoints, lines, settings) {
|
export default function intersectionsToShapes(layerIntersectionIndexes, layerIntersectionPoints, lines, settings) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
import Shape from 'Doodle3D/clipper-js';
|
import Shape from 'Doodle3D/clipper-js';
|
||||||
|
|
||||||
export default function optimizePaths(slices, settings) {
|
export default function optimizePaths(slices, settings) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
import { PRECISION } from '../constants.js';
|
import { PRECISION } from '../constants.js';
|
||||||
|
|
||||||
export default function removePrecision(slices) {
|
export default function removePrecision(slices) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Settings from './Settings.js';
|
import Settings from './Settings.js';
|
||||||
import slice from './sliceActions/slice.js';
|
import slice from './sliceActions/slice.js';
|
||||||
import THREE from 'three.js';
|
import 'three.js';
|
||||||
|
|
||||||
const loader = new THREE.JSONLoader();
|
const loader = new THREE.JSONLoader();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user