mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 12:27:56 +01:00
updated to three.js r72
This commit is contained in:
parent
4526307df4
commit
d367fbe021
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
|||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
|
||||||
jspm_packages/*
|
jspm_packages/*
|
||||||
|
|
||||||
|
bundle.js
|
||||||
|
22
config.js
22
config.js
@ -1,20 +1,21 @@
|
|||||||
System.config({
|
System.config({
|
||||||
"baseURL": "/",
|
baseURL: "/",
|
||||||
"defaultJSExtensions": true,
|
defaultJSExtensions: true,
|
||||||
"transpiler": "babel",
|
transpiler: "babel",
|
||||||
"babelOptions": {
|
babelOptions: {
|
||||||
"optional": [
|
"optional": [
|
||||||
"runtime"
|
"runtime"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"paths": {
|
paths: {
|
||||||
"github:*": "jspm_packages/github/*",
|
"github:*": "jspm_packages/github/*",
|
||||||
"npm:*": "jspm_packages/npm/*"
|
"npm:*": "jspm_packages/npm/*"
|
||||||
}
|
},
|
||||||
});
|
bundles: {
|
||||||
|
"bundle.js": []
|
||||||
|
},
|
||||||
|
|
||||||
System.config({
|
map: {
|
||||||
"map": {
|
|
||||||
"babel": "npm:babel-core@5.8.21",
|
"babel": "npm:babel-core@5.8.21",
|
||||||
"babel-runtime": "npm:babel-runtime@5.8.20",
|
"babel-runtime": "npm:babel-runtime@5.8.20",
|
||||||
"clipper-lib": "npm:clipper-lib@1.0.0",
|
"clipper-lib": "npm:clipper-lib@1.0.0",
|
||||||
@ -23,7 +24,7 @@ System.config({
|
|||||||
"nodeca/js-yaml": "github:nodeca/js-yaml@3.3.1",
|
"nodeca/js-yaml": "github:nodeca/js-yaml@3.3.1",
|
||||||
"read-yaml": "npm:read-yaml@1.0.0",
|
"read-yaml": "npm:read-yaml@1.0.0",
|
||||||
"systemjs/plugin-json": "github:systemjs/plugin-json@0.1.0",
|
"systemjs/plugin-json": "github:systemjs/plugin-json@0.1.0",
|
||||||
"three.js": "github:mrdoob/three.js@master",
|
"three.js": "github:mrdoob/three.js@r72",
|
||||||
"github:jspm/nodelibs-assert@0.1.0": {
|
"github:jspm/nodelibs-assert@0.1.0": {
|
||||||
"assert": "npm:assert@1.3.0"
|
"assert": "npm:assert@1.3.0"
|
||||||
},
|
},
|
||||||
@ -92,4 +93,3 @@ System.config({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import PRINTER_SETTINGS from 'settings/printer_settings.json!';
|
|||||||
import USER_SETTINGS from 'settings/user_settings.json!';
|
import USER_SETTINGS from 'settings/user_settings.json!';
|
||||||
import * as SLICER from 'src/index';
|
import * as SLICER from 'src/index';
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
var settings = new SLICER.Settings();
|
var settings = new SLICER.Settings();
|
||||||
settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]);
|
settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]);
|
||||||
settings.updateConfig(USER_SETTINGS);
|
settings.updateConfig(USER_SETTINGS);
|
||||||
@ -18,4 +17,3 @@ setTimeout(() => {
|
|||||||
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
||||||
};
|
};
|
||||||
slicer.slice(settings);
|
slicer.slice(settings);
|
||||||
});
|
|
@ -9,7 +9,7 @@
|
|||||||
"nodeca/js-yaml": "github:nodeca/js-yaml@^3.3.1",
|
"nodeca/js-yaml": "github:nodeca/js-yaml@^3.3.1",
|
||||||
"read-yaml": "npm:read-yaml@^1.0.0",
|
"read-yaml": "npm:read-yaml@^1.0.0",
|
||||||
"systemjs/plugin-json": "github:systemjs/plugin-json@^0.1.0",
|
"systemjs/plugin-json": "github:systemjs/plugin-json@^0.1.0",
|
||||||
"three.js": "github:mrdoob/three.js@master"
|
"three.js": "github:mrdoob/three.js@r72"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel": "npm:babel-core@^5.1.13",
|
"babel": "npm:babel-core@^5.1.13",
|
||||||
|
@ -30,7 +30,7 @@ export default class {
|
|||||||
if (geometry.type === 'BufferGeometry') {
|
if (geometry.type === 'BufferGeometry') {
|
||||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||||
}
|
}
|
||||||
else if (geometry.type === 'Geometry') {
|
else if (geometry.type.endsWith('Geometry')) {
|
||||||
geometry = geometry.clone();
|
geometry = geometry.clone();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -138,7 +138,7 @@ export default class {
|
|||||||
var layerHeight = settings.config["layerHeight"];
|
var layerHeight = settings.config["layerHeight"];
|
||||||
var height = settings.config["dimensionsZ"];
|
var height = settings.config["dimensionsZ"];
|
||||||
|
|
||||||
var numLayers = height / layerHeight;
|
var numLayers = Math.floor(height / layerHeight);
|
||||||
|
|
||||||
var layerIntersectionIndexes = [];
|
var layerIntersectionIndexes = [];
|
||||||
var layerIntersectionPoints = [];
|
var layerIntersectionPoints = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user