mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 11:33:49 +01:00
update three.js
This commit is contained in:
parent
bbda9089d2
commit
e9c2f653bf
@ -18,7 +18,8 @@ SystemJS.config({
|
||||
"zlib": "github:jspm/nodelibs-zlib@0.2.0-alpha",
|
||||
"https": "github:jspm/nodelibs-https@0.2.0-alpha",
|
||||
"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": {
|
||||
"npm:babel-runtime@5.8.38": {
|
||||
@ -146,7 +147,7 @@ SystemJS.config({
|
||||
},
|
||||
map: {
|
||||
"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"
|
||||
],
|
||||
map: {
|
||||
"three.js": "github:mrdoob/three.js@r83",
|
||||
"assert": "github:jspm/nodelibs-assert@0.2.0-alpha",
|
||||
"buffer": "github:jspm/nodelibs-buffer@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",
|
||||
"stream": "github:jspm/nodelibs-stream@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",
|
||||
"url": "github:jspm/nodelibs-url@0.2.0-alpha",
|
||||
"util": "github:jspm/nodelibs-util@0.2.0-alpha",
|
||||
|
@ -8,7 +8,7 @@
|
||||
"dependencies": {
|
||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -43,7 +43,7 @@
|
||||
"vm": "github:jspm/nodelibs-vm@^0.2.0-alpha"
|
||||
},
|
||||
"overrides": {
|
||||
"github:mrdoob/three.js@r75": {
|
||||
"github:mrdoob/three.js@r83": {
|
||||
"format": "global"
|
||||
},
|
||||
"npm:babel-runtime@5.8.38": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
|
||||
const G_COMMAND = 'G';
|
||||
const M_COMMAND = 'M';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
import slice from './sliceActions/slice.js';
|
||||
import SlicerWorker from './slicerWorker.js!worker';
|
||||
|
||||
@ -11,20 +11,20 @@ export default class {
|
||||
return this;
|
||||
}
|
||||
setGeometry(geometry, matrix) {
|
||||
if (geometry instanceof THREE.BufferGeometry) {
|
||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||
} else if (geometry instanceof THREE.Geometry) {
|
||||
geometry = geometry.clone();
|
||||
} else {
|
||||
throw 'Geometry is not an instance of BufferGeometry or Geometry';
|
||||
}
|
||||
if (geometry.type === 'BufferGeometry') {
|
||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||
} else if (geometry.type === 'Geometry') {
|
||||
geometry = geometry.clone();
|
||||
} else {
|
||||
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
||||
}
|
||||
|
||||
if (matrix instanceof THREE.Matrix4) {
|
||||
geometry.applyMatrix(matrix);
|
||||
}
|
||||
if (matrix) {
|
||||
geometry.applyMatrix(matrix);
|
||||
}
|
||||
|
||||
geometry.mergeVertices();
|
||||
geometry.computeFaceNormals();
|
||||
geometry.computeFaceNormals();
|
||||
|
||||
this.geometry = geometry;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
import { PRECISION } from '../constants.js';
|
||||
|
||||
const offsetOptions = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
|
||||
export default function calculateLayersIntersections(lines, settings) {
|
||||
console.log('calculating layer intersections');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
|
||||
function addLine(geometry, lineLookup, lines, a, b) {
|
||||
const index = lines.length;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
import Shape from 'Doodle3D/clipper-js';
|
||||
|
||||
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';
|
||||
|
||||
export default function optimizePaths(slices, settings) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
import { PRECISION } from '../constants.js';
|
||||
|
||||
export default function removePrecision(slices) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Settings from './Settings.js';
|
||||
import slice from './sliceActions/slice.js';
|
||||
import THREE from 'three.js';
|
||||
import 'three.js';
|
||||
|
||||
const loader = new THREE.JSONLoader();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user