Commit a1a95b4d authored by Sander Kvenild's avatar Sander Kvenild
Browse files

Fixed an issue where shapes sometimes got alpha

parent 37bfed8f
......@@ -12,7 +12,7 @@
<script>
// FIXME: Noen bobler blir røde av at andre bobler velges
// FIXME: Noen tilfaldige bobler blir røde av at andre bobler velges
class Boble {
constructor(x,y,r) {
this.x = x;
......@@ -178,10 +178,13 @@
}
function randomColor() {
let r = Math.floor(Math.random()*255).toString(16)
let g = Math.floor(Math.random()*255).toString(16)
let b = Math.floor(Math.random()*255).toString(16)
return `#${r}${g}${b}`
let r = Math.floor(Math.random()*255).toString(16);
let g = Math.floor(Math.random()*255).toString(16);
let b = Math.floor(Math.random()*255).toString(16);
let color = `#${r}${g}${b}`.slice(0, 7);
return color;
}
function keypress(event) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment