Skip to content

Commit

Permalink
done?
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyal Perry committed Sep 28, 2024
1 parent a33d45b commit 488d328
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ <h4 style="">October 15-18, 2024</h4>

<p align="justify">We invite you to co-create in this week-long <i>future-history</i> festival where students, alumni, staff, and faculty will dive into four decades of impactful, playful, and quirky past to <b>re-imagine</b> our vision for the future.</p>

<div class="ie-button">SIGN UP TODAY!!</div>
<div onclick="window.open('https://www.eventbrite.com/e/mit-media-lab-presents-labracadabra-untold-histories-festival-tickets-1025137683407','_newtab')" class="ie-button">SIGN UP TODAY!!</div>
<br />
<p>
What is LABRACADABRA??!?<br />
Expand Down
37 changes: 22 additions & 15 deletions docs/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ function setup() {
// return;
// }
imageMode(CENTER);
canvas = createCanvas(windowWidth, windowHeight);
console.log("window: ", windowWidth, windowHeight);
console.log("wxh: ", width, height);
scl = min(width, height) / 100; // Adjust scale based on screen size
console.log("scale: ", scl);


if (windowWidth >= windowHeight) {
canvas = createCanvas(windowWidth, windowHeight);
console.log("window: ", windowWidth, windowHeight);
console.log("wxh: ", width, height);
scl = min(width, height) / 100; // Adjust scale based on screen size
console.log("scale: ", scl);

actualWidth = width / 1.618;
marginLeft = width - actualWidth;
pyramidCenter = marginLeft + actualWidth / 2;
Expand All @@ -83,16 +85,19 @@ function setup() {
fontSize = lineHeight * 0.95;
pyramidTop = height - pyramidHeight + lineHeight / 2;
} else {
actualWidth = width * 0.4;
canvas = createCanvas(400, windowHeight/2);
console.log("window: ", windowWidth, windowHeight);
console.log("wxh: ", width, height);
scl = min(width, height) / 100; // Adjust scale based on screen size
console.log("scale: ", scl);

actualWidth = width;
marginLeft = 0;
pyramidCenter = actualWidth / 2;
pyramidHeight = 240;
lineHeight = pyramidHeight / 19;
fontSize = lineHeight;
pyramidTop = lineHeight / 2;
pyramidCenter = fontSize * 16;
actualWidth = pyramidCenter * 2;
scl *= 0.666;
}

textFont(font);
Expand All @@ -113,9 +118,11 @@ function setup() {
}

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
scl = min(width, height) / 100;

if (windowWidth >= windowHeight) {
resizeCanvas(windowWidth, windowHeight);
scl = min(width, height) / 100;

actualWidth = width / 1.618;
marginLeft = width - actualWidth;
pyramidCenter = marginLeft + actualWidth / 2;
Expand All @@ -125,16 +132,16 @@ function windowResized() {
pyramidTop = height - pyramidHeight + lineHeight / 2;
resetLayout();
} else {
actualWidth = width * 0.4;
resizeCanvas(400, windowHeight);
scl = min(width, height) / 100;

actualWidth = width;
marginLeft = 0;
pyramidCenter = actualWidth / 2;
pyramidHeight = 240;
lineHeight = pyramidHeight / 19;
fontSize = lineHeight;
pyramidTop = lineHeight / 2;
pyramidCenter = fontSize * 16;
actualWidth = pyramidCenter * 2;
scl *= 0.666;
}


Expand Down

0 comments on commit 488d328

Please sign in to comment.