Skip to content

Commit

Permalink
examples: resizeCanvas before using width/height
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Jun 4, 2020
1 parent e7084a4 commit 254c334
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/Trill/multiple-devices/sketch.js
Expand Up @@ -42,6 +42,7 @@ function draw() {
}

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
let trillWidth = width / 2.1;
for(let t of trills) {
let width = trillWidth;
Expand All @@ -65,5 +66,4 @@ function windowResized() {
vPos = height - vPos;
trills[n].position = [hPos, vPos];
}
resizeCanvas(windowWidth, windowHeight);
}
2 changes: 1 addition & 1 deletion examples/Trill/ring-sound/sketch.js
Expand Up @@ -76,6 +76,6 @@ function resizeElements() {
}

function windowResized() {
resizeElements();
resizeCanvas(windowWidth, windowHeight);
resizeElements();
}

0 comments on commit 254c334

Please sign in to comment.