diff options
-rw-r--r-- | client/js/image_generator.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/client/js/image_generator.js b/client/js/image_generator.js index bf248c8..81169e1 100644 --- a/client/js/image_generator.js +++ b/client/js/image_generator.js @@ -42,8 +42,8 @@ function generateImage(hash, what) } else { - // pixel = `#${r1}${r2}${g1}${g2}${b1}${b2}`; - pixel = `#${r1}${r2}${g1}${g2}${b1}${b2}${t1}${t2}`; + pixel = `#${r1}${r2}${g1}${g2}${b1}${b2}`; + //pixel = `#${r1}${r2}${g1}${g2}${b1}${b2}${t1}${t2}`; //pixel = `#${r1}${r1}${r1}${r1}${r1}${r1}${r1}${r1}`; //pixel = `#${r1}${r1}${r1}${r1}${r1}${r1}`; //pixel = `#${r1}${g1}${b1}`; @@ -115,15 +115,18 @@ function createImage(pixels, hash, what) for (var k = 0; k < radius; ++k) { var subpixel = pixel_to_be_enhanced; - // if ( i > radius - Math.floor(radius/2) ) - // { - // debugLog(i); - // } - c = (x*radius)+k; - r = (y*radius)+i; - context.fillStyle = subpixel; - context.fillRect(c, r, radius, radius); - context.stroke(); + if ( i >= radius - Math.floor(radius/2) ) + { + if ( k >= radius - Math.floor(radius/2) ) + { + // debugLog(i); + c = (x*radius)+k; + r = (y*radius)+i; + context.fillStyle = subpixel; + context.fillRect(c, r, radius/3, radius/3); + context.stroke(); + } + } //debugLog(`${x} -> ${c}, ${y} -> ${r}`); } } |