From 1a65dbff879a9d69d64bc559279c1594f7ce91e8 Mon Sep 17 00:00:00 2001
From: leomcelroy <leomcelroy@gmail.com>
Date: Sun, 27 Oct 2019 16:00:44 -0400
Subject: [PATCH] added comments to multipleOffsets.js
---
hunks/image/multipleOffsets.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hunks/image/multipleOffsets.js b/hunks/image/multipleOffsets.js
index b442994..76fa382 100644
--- a/hunks/image/multipleOffsets.js
+++ b/hunks/image/multipleOffsets.js
@@ -57,7 +57,8 @@ export default function MultipleOffsets() {
this.loop = () => {
if (imageIn.io() && !vectors.io()) {
function work() {
- self.importScripts("http://localhost:8080/helpers.js");
+ //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;
--
GitLab