updated to three.js r72

This commit is contained in:
casperlamboo 2015-10-14 17:11:29 +02:00
parent fa38d8117e
commit 0f6c73e93f
7 changed files with 29 additions and 29 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
*.DS_Store
jspm_packages/*
bundle.js

View File

@ -1,20 +1,21 @@
System.config({
"baseURL": "/",
"defaultJSExtensions": true,
"transpiler": "babel",
"babelOptions": {
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime"
]
},
"paths": {
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
}
});
},
bundles: {
"bundle.js": []
},
System.config({
"map": {
map: {
"babel": "npm:babel-core@5.8.21",
"babel-runtime": "npm:babel-runtime@5.8.20",
"clipper-lib": "npm:clipper-lib@1.0.0",
@ -23,7 +24,7 @@ System.config({
"nodeca/js-yaml": "github:nodeca/js-yaml@3.3.1",
"read-yaml": "npm:read-yaml@1.0.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": {
"assert": "npm:assert@1.3.0"
},
@ -92,4 +93,3 @@ System.config({
}
}
});

View File

@ -3,7 +3,6 @@ import PRINTER_SETTINGS from 'settings/printer_settings.json!';
import USER_SETTINGS from 'settings/user_settings.json!';
import * as SLICER from 'src/index';
setTimeout(() => {
var settings = new SLICER.Settings();
settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]);
settings.updateConfig(USER_SETTINGS);
@ -18,4 +17,3 @@ setTimeout(() => {
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
};
slicer.slice(settings);
});

View File

@ -9,7 +9,7 @@
"nodeca/js-yaml": "github:nodeca/js-yaml@^3.3.1",
"read-yaml": "npm:read-yaml@^1.0.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": {
"babel": "npm:babel-core@^5.1.13",

View File

@ -30,7 +30,7 @@ export default class {
if (geometry.type === 'BufferGeometry') {
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
}
else if (geometry.type === 'Geometry') {
else if (geometry.type.endsWith('Geometry')) {
geometry = geometry.clone();
}
else {
@ -138,7 +138,7 @@ export default class {
var layerHeight = settings.config["layerHeight"];
var height = settings.config["dimensionsZ"];
var numLayers = height / layerHeight;
var numLayers = Math.floor(height / layerHeight);
var layerIntersectionIndexes = [];
var layerIntersectionPoints = [];