temp remove obj and stl export

This commit is contained in:
casperlamboo 2017-10-24 12:47:59 +02:00
parent 2319162635
commit 5936966788
2 changed files with 23 additions and 25 deletions

View File

@ -14,8 +14,6 @@
"dependencies": {
"@doodle3d/cal": "0.0.8",
"@doodle3d/clipper-js": "^1.0.7",
"@doodle3d/threejs-export-obj": "0.0.3",
"@doodle3d/threejs-export-stl": "0.0.2",
"babel-plugin-inline-import": "^2.0.6",
"imports-loader": "^0.7.1",
"memoizee": "^0.3.9",

View File

@ -1,6 +1,6 @@
import { Matrix } from '@doodle3d/cal';
import * as exportSTL from '@doodle3d/threejs-export-stl';
import * as exportOBJ from '@doodle3d/threejs-export-obj';
// import * as exportSTL from '@doodle3d/threejs-export-stl';
// import * as exportOBJ from '@doodle3d/threejs-export-obj';
import * as THREE from 'three';
import ThreeBSP from 'three-js-csg';
import ClipperShape from '@doodle3d/clipper-js';
@ -124,26 +124,26 @@ export async function createFile(objectsById, type, options) {
const blob = new Blob([string], { type: 'application/json' });
return blob;
}
case 'stl-string': {
const string = exportSTL.fromMesh(exportMesh, false);
return string;
}
case 'stl-base64': {
const buffer = exportSTL.fromMesh(exportMesh, true);
return bufferToBase64(buffer);
}
case 'stl-blob': {
const buffer = exportSTL.fromMesh(exportMesh, true);
return new Blob([buffer], { type: 'application/vnd.ms-pki.stl' })
}
case 'obj-blob': {
const buffer = await exportOBJ.fromMesh(exportMesh, true);
return buffer;
}
case 'obj-base64': {
const buffer = await exportOBJ.fromMesh(exportMesh, true);
const base64 = bufferToBase64(buffer);
return base64;
}
// case 'stl-string': {
// const string = exportSTL.fromMesh(exportMesh, false);
// return string;
// }
// case 'stl-base64': {
// const buffer = exportSTL.fromMesh(exportMesh, true);
// return bufferToBase64(buffer);
// }
// case 'stl-blob': {
// const buffer = exportSTL.fromMesh(exportMesh, true);
// return new Blob([buffer], { type: 'application/vnd.ms-pki.stl' })
// }
// case 'obj-blob': {
// const buffer = await exportOBJ.fromMesh(exportMesh, true);
// return buffer;
// }
// case 'obj-base64': {
// const buffer = await exportOBJ.fromMesh(exportMesh, true);
// const base64 = bufferToBase64(buffer);
// return base64;
// }
}
}