diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-04-24 18:01:19 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-04-24 18:01:19 -0400 |
| commit | f50f17345facda8e1b5da36c35f89a8a974f3eb7 (patch) | |
| tree | a8626fe1153f3c65b6697182e7bcb836f40cf0d1 /client | |
| parent | 94d1c0c6c679fdc35bcca0da31693539323c9a3e (diff) | |
lower intervals - mindblowing
Diffstat (limited to 'client')
| -rw-r--r-- | client/index.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/client/index.js b/client/index.js index 17115ff..73ace90 100644 --- a/client/index.js +++ b/client/index.js @@ -22,18 +22,13 @@ for (var i = 0; i < ws; i++) { } function add (x, y) { - const i = Math.max(x, y) + 1 - const j = Math.min(x, y) + 1 + const i = x + 1 + const j = y + 1 const div = document.createElement('div') div.style.left = (x * s) + 'px' div.style.top = (y * s) + 'px' div.style.backgroundColor = color(i/j, add_off, mul_off) - if (x < y) { - div.style.opacity = 0.5 - } - else { - div.style.opacity = Math.min(j/i * Math.sqrt(3), 1) - } + div.style.opacity = Math.min(j/i * Math.sqrt(3), 1) div.innerHTML = `<div>${i}<\/div><div>\/</div><div>${j}<\/div>` div.addEventListener('mouseenter', function(){ div.style.backgroundColor = color(i/j, add_on, mul_on) |
