Skip to content

Loading…

fixed logic for recognizing different pixel #23 #27

Merged
merged 1 commit into from

1 participant

@stefanjudis
Owner

No description provided.

@stefanjudis stefanjudis merged commit f0729b3 into master
@stefanjudis stefanjudis deleted the bug/23-diff-check branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 19, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 tasks/assets/scripts/worker.js
View
4 tasks/assets/scripts/worker.js
@@ -55,8 +55,8 @@ function diff( pixelsA, pixelsB, config ) {
for ( i = 0; i < length; i += 4 ) {
if (
- Math.abs( pixelsA.data[ i ] - pixelsB.data[ i ] ) > threshold &&
- Math.abs( pixelsA.data[ i + 1 ] - pixelsB.data[ i + 1 ] ) > threshold &&
+ Math.abs( pixelsA.data[ i ] - pixelsB.data[ i ] ) > threshold ||
+ Math.abs( pixelsA.data[ i + 1 ] - pixelsB.data[ i + 1 ] ) > threshold ||
Math.abs( pixelsA.data[ i + 2 ] - pixelsB.data[ i + 2 ] ) > threshold
)
{
Something went wrong with that request. Please try again.