Skip to content

Commit

Permalink
Small ui tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Barning committed Jul 4, 2019
1 parent bbbfefa commit f51babe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -30,6 +30,7 @@ <h2>Hah, thought you woud never ask!</h2>
Even if you and other visitors speaking the same language, no one
would ever understand what you are saying.</p>
<i class="fa fa-comments-o"></i>
<center><a class="what" href="">Close</a></center>
</article>
</section>
</div>
Expand Down
24 changes: 17 additions & 7 deletions js/sketch.js
Expand Up @@ -86,10 +86,7 @@ let sketch = function (p) {
this.osc.pan(panning);
this.osc.freq(loudness); //Insert Loudness into the frequency

p.ellipse(this.position.x, this.position.y, this.r, this.r);

console.log(this.r);

p.ellipse(this.position.x, this.position.y, this.r, this.r);
}
}

Expand Down Expand Up @@ -161,8 +158,6 @@ let sketch = function (p) {
socket.on('newName', function (data) {
var tempName = data.name;
var number = data.number;
console.log(tempName);
console.log(number);

var theboidforname = boids[number];
theboidforname.myname = tempName;
Expand Down Expand Up @@ -199,4 +194,19 @@ let sketch = function (p) {
});
};

let myp5 = new p5(sketch);
let myp5 = new p5(sketch);

var what = document.querySelectorAll('.what');

for (let i = 0; i < what.length; i++) {
what[i].addEventListener('click', show);
}

function show() {
var about = document.querySelector('#about');
if (about.style.display === 'block') {
about.style.display = "none";
} else {
about.style.display = "block";
}
}

0 comments on commit f51babe

Please sign in to comment.