From 1786634ab0541125e9b6a8c3b189600eead09ddf Mon Sep 17 00:00:00 2001 From: Anson Date: Sun, 29 Oct 2023 22:49:11 -0600 Subject: [PATCH] upgraded gayness --- p5/sketch.js | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/p5/sketch.js b/p5/sketch.js index b407ff6..a042285 100644 --- a/p5/sketch.js +++ b/p5/sketch.js @@ -18,26 +18,31 @@ function setup() { canvas.position(0, 0); canvas.style("z-index", "-1"); - movers[0] = new Mover(10, 10, 5, -5, 50); - movers[0].col = color("red"); - movers[1] = new Mover(width / 2, height / 2, -5, -5, 60); - movers[1].col = color("white"); - movers[2] = new Mover(width - 10, height - 10, -5, -5, 40); - movers[2].col = color("blue"); + const params = new URLSearchParams(window.location.search); + + if (params.has("gay")) { + console.log('The "gay" parameter exists in the URL.'); + movers[0] = new Mover(0, 0, 5, -5, 50); + movers[0].col = color("#D12229"); + movers[1] = new Mover(width / 5, height / 5, -5, -5, 50); + movers[1].col = color("#F68A1E"); + movers[2] = new Mover((2 * width) / 5, (2 * height) / 5, -5, -5, 50); + movers[2].col = color("#FDE01A"); + movers[3] = new Mover((3 * width) / 5, (3 * height) / 5, -5, -5, 50); + movers[3].col = color("#007940"); + movers[4] = new Mover((4 * width) / 5, (4 * height) / 5, -5, -5, 50); + movers[4].col = color("#24408E"); + movers[5] = new Mover(width, height, -5, -5, 50); + movers[5].col = color("#732982"); + } else { + movers[0] = new Mover(10, 10, 5, -5, 50); + movers[0].col = color("red"); + movers[1] = new Mover(width / 2, height / 2, -5, -5, 60); + movers[1].col = color("white"); + movers[2] = new Mover(width - 10, height - 10, -5, -5, 40); + movers[2].col = color("blue"); + } - // Gay Mode - // movers[0] = new Mover(0, 0, 5, -5, 50); - // movers[0].col = color('#D12229'); - // movers[1] = new Mover(width/5, height/5, -5, -5, 50); - // movers[1].col = color('#F68A1E'); - // movers[2] = new Mover(2*width/5, 2*height/5, -5, -5, 50); - // movers[2].col = color('#FDE01A'); - // movers[3] = new Mover(3*width/5, 3*height/5, -5, -5, 50); - // movers[3].col = color('#007940'); - // movers[4] = new Mover(4*width/5, 4*height/5, -5, -5, 50); - // movers[4].col = color('#24408E'); - // movers[5] = new Mover(width, height, -5, -5, 50); - // movers[5].col = color('#732982'); background(0); }