Skip to content

Commit 45c1dde

Browse files
Source Formatting
1 parent 5f4a3c2 commit 45c1dde

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/tracker/color.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@
6767
colorThreshold = colors[colorThreshold];
6868
}
6969

70-
video.canvas.forEach(imageData, function pixelMatrixLoop(r, g, b, a, w, i, j) {
71-
if (colorThreshold(r, g, b, a, w, i, j)) {
72-
total += 2;
73-
pixels.push(j, i);
70+
video.canvas.forEach(
71+
imageData,
72+
function pixelMatrixLoop(r, g, b, a, w, i, j) {
73+
if (colorThreshold(r, g, b, a, w, i, j)) {
74+
total += 2;
75+
pixels.push(j, i);
76+
}
7477
}
75-
});
78+
);
7679

7780
if (total < 30) {
7881
return;
@@ -83,7 +86,8 @@
8386
dist = 0;
8487

8588
for (n = 2; n < total; n+=2) {
86-
dist += distance(pixels[m1], pixels[m1+1], pixels[n], pixels[n+1]);
89+
dist += distance(
90+
pixels[m1], pixels[m1+1], pixels[n], pixels[n+1]);
8791
}
8892

8993
if (dist/total > 20) {

0 commit comments

Comments
 (0)