Skip to content

Commit

Permalink
info screen key bug fixed
Browse files Browse the repository at this point in the history
squares no longer hidden when started from keyboard
  • Loading branch information
gawainhewitt committed Jul 9, 2021
1 parent ef2ee41 commit 0c5e0d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Synth Horn</title>
<title>Squares</title>
<link rel="stylesheet" href="css/main.css" />
<script src='https://cdnjs.cloudflare.com/ajax/libs/tone/14.7.69/Tone.js'></script> <!-- bring in the Tone.js library - google search for tone.js cdn-->
</head>
Expand Down Expand Up @@ -72,7 +72,7 @@ <h1>loading...<br>loading...<br>loading...<br>loading...<br>loading...<br>loadin
<br>
<br>
<img src="images/orchlablogo.jpg" alt="One" width="1250" height="1250" id="orchlablogo">
<p id="welcometext">Synth Horn</p>
<p id="welcometext">Squares</p>
<p>To play: <br>
touch or click screen, <br>
or use ZXCVBNM,. keys<br>
Expand Down
7 changes: 4 additions & 3 deletions dist/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ function startHorn() {
function handleKeyDown(e) {

if(info === true) { // is the info screen on?
Tone.start(); // we need this to allow audio to start. probably best to put it on a different button soon though
info = false;
document.getElementById('welcomescreen').style.visibility="hidden";
// Tone.start(); // we need this to allow audio to start. probably best to put it on a different button soon though
// info = false;
// document.getElementById('welcomescreen').style.visibility="hidden";
startHorn();
}

var key = e.code;
Expand Down
7 changes: 4 additions & 3 deletions sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ function startHorn() {
function handleKeyDown(e) {

if(info === true) { // is the info screen on?
Tone.start(); // we need this to allow audio to start. probably best to put it on a different button soon though
info = false;
document.getElementById('welcomescreen').style.visibility="hidden";
// Tone.start(); // we need this to allow audio to start. probably best to put it on a different button soon though
// info = false;
// document.getElementById('welcomescreen').style.visibility="hidden";
startHorn();
}

var key = e.code;
Expand Down

0 comments on commit 0c5e0d8

Please sign in to comment.