Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	jspm.config.js
#	package.json
This commit is contained in:
casperlamboo 2017-07-18 12:53:59 +02:00
commit 365680a693
5 changed files with 56 additions and 25 deletions

View File

@ -8,7 +8,7 @@
<script type="text/javascript" src="../jspm.config.js"></script> <script type="text/javascript" src="../jspm.config.js"></script>
<script type="text/javascript"> <script type="text/javascript">
System.import('example/save.js'); System.import('./save.js');
</script> </script>
</head> </head>

View File

@ -14,9 +14,9 @@ SystemJS.config({
"core-js": "npm:core-js@1.2.7", "core-js": "npm:core-js@1.2.7",
"plugin-babel": "npm:systemjs-plugin-babel@0.0.12", "plugin-babel": "npm:systemjs-plugin-babel@0.0.12",
"react": "npm:react@15.3.2", "react": "npm:react@15.3.2",
"domain": "npm:jspm-nodelibs-domain@0.2.0", "domain": "github:jspm/nodelibs-domain@0.2.0-alpha",
"zlib": "npm:jspm-nodelibs-zlib@0.2.0", "zlib": "github:jspm/nodelibs-zlib@0.2.0-alpha",
"https": "npm:jspm-nodelibs-https@0.2.0", "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",
"file-saver": "npm:file-saver@1.3.3" "file-saver": "npm:file-saver@1.3.3"
@ -105,12 +105,12 @@ SystemJS.config({
"to-fast-properties": "npm:to-fast-properties@1.0.2" "to-fast-properties": "npm:to-fast-properties@1.0.2"
} }
}, },
"npm:jspm-nodelibs-zlib@0.2.0": { "github:jspm/nodelibs-zlib@0.2.0-alpha": {
"map": { "map": {
"zlib-browserify": "npm:browserify-zlib@0.1.4" "zlib-browserify": "npm:browserify-zlib@0.1.4"
} }
}, },
"npm:jspm-nodelibs-domain@0.2.0": { "github:jspm/nodelibs-domain@0.2.0-alpha": {
"map": { "map": {
"domain-browserify": "npm:domain-browser@1.1.7" "domain-browserify": "npm:domain-browser@1.1.7"
} }
@ -157,12 +157,12 @@ SystemJS.config({
"clipper-js": "github:Doodle3D/clipper-js@1.0.2", "clipper-js": "github:Doodle3D/clipper-js@1.0.2",
"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": "npm:jspm-nodelibs-child_process@0.2.0", "child_process": "github:jspm/nodelibs-child_process@0.2.0-alpha",
"constants": "github:jspm/nodelibs-constants@0.2.0-alpha", "constants": "github:jspm/nodelibs-constants@0.2.0-alpha",
"crypto": "github:jspm/nodelibs-crypto@0.2.0-alpha", "crypto": "github:jspm/nodelibs-crypto@0.2.0-alpha",
"events": "github:jspm/nodelibs-events@0.2.2", "events": "github:jspm/nodelibs-events@0.2.2",
"fs": "github:jspm/nodelibs-fs@0.2.0-alpha", "fs": "github:jspm/nodelibs-fs@0.2.0-alpha",
"http": "npm:jspm-nodelibs-http@0.2.0", "http": "github:jspm/nodelibs-http@0.2.0-alpha",
"json": "github:systemjs/plugin-json@0.1.2", "json": "github:systemjs/plugin-json@0.1.2",
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master", "Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
"module": "npm:jspm-nodelibs-module@0.2.0", "module": "npm:jspm-nodelibs-module@0.2.0",
@ -172,7 +172,7 @@ SystemJS.config({
"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",
"tty": "npm:jspm-nodelibs-tty@0.2.0", "tty": "npm:jspm-nodelibs-tty@0.2.0",
"url": "npm:jspm-nodelibs-url@0.2.0", "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",
"vm": "github:jspm/nodelibs-vm@0.2.0-alpha", "vm": "github:jspm/nodelibs-vm@0.2.0-alpha",
"worker": "github:casperlamboo/plugin-worker@master" "worker": "github:casperlamboo/plugin-worker@master"
@ -293,16 +293,6 @@ SystemJS.config({
"xtend": "npm:xtend@4.0.1" "xtend": "npm:xtend@4.0.1"
} }
}, },
"npm:jspm-nodelibs-http@0.2.0": {
"map": {
"http-browserify": "npm:stream-http@2.4.0"
}
},
"npm:jspm-nodelibs-url@0.2.0": {
"map": {
"url-browserify": "npm:url@0.11.0"
}
},
"github:Doodle3D/clipper-js@1.0.2": { "github:Doodle3D/clipper-js@1.0.2": {
"map": { "map": {
"Breush/clipper-lib": "github:Breush/clipper-lib@patch-1", "Breush/clipper-lib": "github:Breush/clipper-lib@patch-1",
@ -474,6 +464,16 @@ SystemJS.config({
"map": { "map": {
"string_decoder-browserify": "npm:string_decoder@0.10.31" "string_decoder-browserify": "npm:string_decoder@0.10.31"
} }
},
"github:jspm/nodelibs-http@0.2.0-alpha": {
"map": {
"http-browserify": "npm:stream-http@2.4.0"
}
},
"github:jspm/nodelibs-url@0.2.0-alpha": {
"map": {
"url-browserify": "npm:url@0.11.0"
}
} }
} }
}); });

View File

@ -20,22 +20,22 @@
"babel-runtime": "npm:babel-runtime@^5.1.13", "babel-runtime": "npm:babel-runtime@^5.1.13",
"core-js": "npm:core-js@^1.2.0", "core-js": "npm:core-js@^1.2.0",
"file-saver": "npm:file-saver@^1.3.3", "file-saver": "npm:file-saver@^1.3.3",
"domain": "npm:jspm-nodelibs-domain@^0.2.0", "domain": "github:jspm/nodelibs-domain@^0.2.0-alpha",
"https": "npm:jspm-nodelibs-https@^0.2.0", "https": "github:jspm/nodelibs-https@^0.2.0-alpha",
"plugin-babel": "npm:systemjs-plugin-babel@^0.0.12", "plugin-babel": "npm:systemjs-plugin-babel@^0.0.12",
"react": "npm:react@^15.3.2", "react": "npm:react@^15.3.2",
"react-dom": "npm:react-dom@^15.3.2", "react-dom": "npm:react-dom@^15.3.2",
"zlib": "npm:jspm-nodelibs-zlib@^0.2.0" "zlib": "github:jspm/nodelibs-zlib@^0.2.0-alpha"
}, },
"peerDependencies": { "peerDependencies": {
"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": "npm:jspm-nodelibs-child_process@^0.2.0", "child_process": "github:jspm/nodelibs-child_process@^0.2.0-alpha",
"constants": "github:jspm/nodelibs-constants@^0.2.0-alpha", "constants": "github:jspm/nodelibs-constants@^0.2.0-alpha",
"crypto": "github:jspm/nodelibs-crypto@^0.2.0-alpha", "crypto": "github:jspm/nodelibs-crypto@^0.2.0-alpha",
"events": "github:jspm/nodelibs-events@^0.2.0-alpha", "events": "github:jspm/nodelibs-events@^0.2.0-alpha",
"fs": "github:jspm/nodelibs-fs@^0.2.0-alpha", "fs": "github:jspm/nodelibs-fs@^0.2.0-alpha",
"http": "npm:jspm-nodelibs-http@^0.2.0", "http": "github:jspm/nodelibs-http@^0.2.0-alpha",
"module": "npm:jspm-nodelibs-module@^0.2.0", "module": "npm:jspm-nodelibs-module@^0.2.0",
"os": "github:jspm/nodelibs-os@^0.2.0-alpha", "os": "github:jspm/nodelibs-os@^0.2.0-alpha",
"path": "github:jspm/nodelibs-path@^0.2.0-alpha", "path": "github:jspm/nodelibs-path@^0.2.0-alpha",
@ -43,7 +43,7 @@
"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",
"tty": "npm:jspm-nodelibs-tty@^0.2.0", "tty": "npm:jspm-nodelibs-tty@^0.2.0",
"url": "npm:jspm-nodelibs-url@^0.2.0", "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",
"vm": "github:jspm/nodelibs-vm@^0.2.0-alpha" "vm": "github:jspm/nodelibs-vm@^0.2.0-alpha"
}, },

15
simpleExample/index.html Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE>
<html>
<head>
<title>Doodle3D Slicer - Simple example</title>
<script type="text/javascript" src="../jspm_packages/system.js"></script>
<script type="text/javascript" src="../jspm.config.js"></script>
<script type="text/javascript">
System.import('simpleExample/index.js');
</script>
</head>
<body>
<div id="gcode"></div>
</body>
</html>

16
simpleExample/index.js Normal file
View File

@ -0,0 +1,16 @@
import 'three.js';
import * as SLICER from 'src/index.js';
const settings = new SLICER.Settings({
...SLICER.printerSettings['ultimaker2go'],
...SLICER.userSettings.low
});
const geometry = new THREE.TorusGeometry(20, 10, 30, 30).clone();
const slicer = new SLICER.Slicer();
slicer.setGeometry(geometry);
slicer.slice(settings, false).then(gcode => {
document.getElementById('gcode').innerHTML = gcode.replace(/(?:\r\n|\r|\n)/g, '<br />');
});