From e75db6d5bd0e396f1ca859567fc23503d4603d14 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 27 May 2015 12:25:51 +0200 Subject: [PATCH] first commit webworker created web worker implementation added class D3D.SlicerWorker converts geometry to bufferGeometry sends bufferGeometry to worker in worker bufferGeometry gets converted back to geometry --- index.html | 7 +++ slice_test.html | 18 +++--- src/printer.js | 3 - src/slicer.js | 6 +- src/slicerworker.js | 50 +++++++++++++++ webworker/worker.js | 41 +++++++++++++ webworker_test.html | 145 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 253 insertions(+), 17 deletions(-) create mode 100644 src/slicerworker.js create mode 100644 webworker/worker.js create mode 100644 webworker_test.html diff --git a/index.html b/index.html index 324bb6f..181951c 100644 --- a/index.html +++ b/index.html @@ -20,9 +20,11 @@ $(document).ready(function () { var listDoodle = $("#printers-doodle"); var listSliceTest = $("#printers-slicetest"); + var listSliceWebworker = $("#printers-webworker"); listDoodle.append("
  • Wired Printer
  • "); listSliceTest.append("
  • Wired Printer
  • "); + listSliceWebworker.append("
  • Wired Printer
  • "); /* printers.push({ @@ -44,6 +46,7 @@ $(document).ready(function () { listDoodle.append("
  • " + box.wifiboxid + "
  • "); listSliceTest.append("
  • " + box.wifiboxid + "
  • "); + listSliceWebworker.append("
  • " + box.wifiboxid + "
  • "); } }); }); @@ -54,6 +57,10 @@ $(document).ready(function () {

    Slice Test

    + +

    Webworkers

    + +