import keys from './lib/keys' import color from './lib/color' import kalimba from './lib/kalimba' const root = 440 const s = 50 const w = window.innerWidth const h = window.innerHeight const ws = w/s, hs = h/s const add_on = 0 const mul_on = 1.0 const add_off = 0.1 const mul_off = 0.9 let dragging = false for (var i = 0; i < ws; i++) { for (var j = 0; j < hs; j++) { add(i, j) } } function add (x, y) { const i = Math.max(x, y) + 1 const j = Math.min(x, 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) } console.log(j/i) div.innerHTML = `