xxxxxxxxxx
211
/*
Canvas Size: 600 x 600px
IF / ELSE Statement
millis(), OR second() / minute() / hour()
You’re also encouraged to integrate map() or the boolean variable when appropriate
*/
/* I didn't get a chance to draw the glasses at the bottom, but I was able to use most of the functions and numbers mentioned. I hope you'll be kind! I think it's not super pretty either. Virtual school for my kids is killing me right now and this is what I could manage in the time I had. */
let RGB1;
let RGB2;
let RGB3;
let titleTextSize = 60;
let subtitleTextSize = 20;
let subjTextSize = 30;
let quoteTextSize = 20;
let lightSwitch = false;
//Title placement
let tx = 300;
let ty = 75;
//Subtitle placement
let stx = 300;
let sty = 110;
//Quote placement
let x1 = 300;
let y1 = 470;
let x2 = 500;
let y2 = 500;
//Subject placement
let sx1 = 300;
let sy1 = 400;
let sx2 = 500;
let sy2 = 500;
function setup() {
createCanvas(600, 600);
rectMode(CENTER);
fill(255);
textFont('Helvetica');
}
function draw() {
//RGB text color fades darker over the day to signify the ending of her life
RGB1 = 255 / hour() * 6+10;
RGB2 = 55 / hour() * 6+10;
RGB3 = 55 / hour() * 6+10;
//background gets darker over the day to signify the ending of her life
background(RGB1);
//to use for timing
let h = hour();
let m = minute();
let s = second();
//glasses
let mirrorLine = 300;
push();
noFill();
stroke(50);
strokeWeight(10);
ellipse(mirrorLine-80,475,85,100);
ellipse(mirrorLine+30,475,85,100);
line(mirrorLine-120,460,mirrorLine-50,355);
line(mirrorLine+68,466,mirrorLine+120,355);
arc(mirrorLine-24,470, 30, 30, PI,0,OPEN);
pop();
//RGB title
textSize(titleTextSize);
textAlign(CENTER); //only need one center text align for all text if it's aligned
fill(RGB1, RGB2, RGB3); // colors from
text('RGB', tx, ty);
//"Dissent" message for 10 seconds of every minute!
if (s >= 10 && s < 20) {
background(0);
rect(300, 300, 600, 600);
//textStyle(BOLD);
textSize(100);
fill(255, 0, 0);
text('DISSENT!', x1, y1, x2, y2);
} else {
//12 subjects with quotes, some rotating based on minutes
textSize(subtitleTextSize);
fill(RGB1, RGB2, RGB3);
text('24 hours of quotes, an inspirational memoriam', stx, sty);
//Subjects + quotes
if (h == 1 || h == 13) {
textSize(subjTextSize);
text('About women on the court', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("When I'm sometimes asked 'When will there be enough (women on the Supreme Court)?' and my answer is: 'When there are nine.' People are shocked. But there'd been nine men, and nobody's ever raised a question about that.", x1, y1, x2, y2);
} else if (h == 2 || h == 14) {
textSize(subjTextSize);
//textAlign(CENTER);
text('About men on the court', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("'They have never been a 13-year-old girl.' After her male colleagues appeared indifferent about a girl's strip-search by school administrators", x1, y1, x2, y2);
} else if (h == 3 || h == 15) {
textSize(subjTextSize);
text('To new citizens at a naturalization ceremony', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("We are a nation made strong by people like you.", x1, y1, x2, y2);
} else if (h == 4 || h == 16) {
textSize(subjTextSize);
text('About marriage ... and work', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
if (minute() >= 0 && minute() <= 30) {
text("It helps sometimes to be a little deaf (in marriage and in) every workplace, including the good job I have now.", x1, y1, x2, y2);
} else {
text("If you have a caring life partner, you help the other person when that person needs it.I had a life partner who thought my work was as important as his, and I think that made all the difference for me.", x1, y1, x2, y2);
}
} else if (h == 5 || h == 17) {
textSize(subjTextSize);
text('About being a woman', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("My mother told me to be a lady. And for her, that meant be your own person, be independent.", x1, y1, x2, y2);
} else if (h == 6 || h == 18) {
textSize(subjTextSize);
text('About gender equality', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("Women will have achieved true equality when men share with them the responsibility of bringing up the next generation.", x1, y1, x2, y2);
} else if (h == 7 || h == 19) {
textSize(subjTextSize);
text('On leadership', 300, 200);
textSize(quoteTextSize);
text("Fight for the things that you care about, but do it in a way that will lead others to join you.", x1, y1, x2, y2);
} else if (h == 8 || h == 20) {
textSize(subjTextSize);
text('On dissent and justice', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("Dissents speak to a future age. It's not simply to say, 'My colleagues are wrong and I would do it this way.' But the greatest dissents do become court opinions and gradually over time their views become the dominant view. So that's the dissenter's hope: that they are writing not for today, but for tomorrow.", x1, y1, x2, y2);
} else if (h == 9 || h == 21) {
textSize(subjTextSize);
text('On support for abortion rights', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("This is something central to a woman's life, to her dignity. It's a decision that she must make for herself. And when government controls that decision for her, she's being treated as less than a fully adult human responsible for her own choices.", x1, y1, x2, y2);
} else if (h == 10 || h == 22) {
textSize(subjTextSize);
text('About gender equality', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("Women will have achieved true equality when men share with them the responsibility of bringing up the next generation.", x1, y1, x2, y2);
} else if (h == 11 || h == 23) {
textSize(subjTextSize);
text('On activism', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
text("Women will have achieved true equality when men share with them the responsibility of bringing up the next generation.", x1, y1, x2, y2);
} else if (h == 12 || h == 0) {
fill(255)
textSize(subjTextSize);
text('On how she would like to be remembered', sx1, sy1, sx2, sy2);
textSize(quoteTextSize);
if (minute() >= 0 && minute() <= 30) {
//console.log(minute());
text("I would like to be remembered as someone who used whatever talent she had to do her work to the very best of her ability.", x1, y1, x2, y2);
} else {
text("We are at last beginning to relegate to the history books the idea of the token woman.", x1, y1, x2, y2);
}
}
}
}