Skip to content
Snippets Groups Projects
Commit 1a65dbff authored by Leo McElroy's avatar Leo McElroy
Browse files

added comments to multipleOffsets.js

parent 0153a9be
Branches
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ export default function MultipleOffsets() {
this.loop = () => {
if (imageIn.io() && !vectors.io()) {
function work() {
//imports pipe, edgeDetectHelper, orientEdgesHelper, vectorizeHelper; could be a good idea to break these into different files
self.importScripts("http://localhost:8080/helpers.js");
self.onmessage = function(e) {
......@@ -75,8 +76,9 @@ export default function MultipleOffsets() {
vectorizeHelper
)(e.data);
vectors = [...vectors, ...newVectors];
vectors.push(...newVectors);
// we only want this to run once if the totalOffset is the offsetDiameter
if (offset === e.data.totalOffset) break;
offset += e.data.stepover;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment