summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/index.js b/client/index.js
index 62f7e53..868a395 100644
--- a/client/index.js
+++ b/client/index.js
@@ -28,7 +28,13 @@ function add (x, y) {
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
+ if (x < y) {
+ div.style.opacity = 0.5
+ }
+ else {
+ div.style.opacity = Math.min(j/i * Math.sqrt(3), 1)
+ }
+ console.log(j/i)
div.innerHTML = `<div>${i}<\/div><div>\/</div><div>${j}<\/div>`
div.addEventListener('mouseenter', function(){
div.style.backgroundColor = color(i/j, add_on, mul_on)