xxxxxxxxxx
59
let libraryScene;
let book1;
function preload() {
// Upload images directly to the editor
libraryScene = loadImage("library.jpg");
// Upload images using the Image Link Address
book1 = loadImage(
"https://m.media-amazon.com/images/I/71FxgtFKcQL._AC_UF1000,1000_QL80_.jpg"
);
book2 = loadImage(
"https://m.media-amazon.com/images/I/81q9Cy8AsDL._AC_UF1000,1000_QL80_.jpg"
);
}
function setup() {
createCanvas(1000, 800);
}
function draw() {
background(libraryScene);
// ADD SHAPES + COLORS
noStroke();
fill(201, 127, 56);
circle(150, 150, 250);
fill(201, 189, 56);
rect(500, 400, 200, 400);
fill(227, 149, 100, 100);
circle(100,500,400);
fill(227, 149, 100, 100);
circle(800,100,400);
// ADD IMAGES
// image(variable, x, y, width, height);
blendMode(ADD);
image(book1, 100, 100, 200, 350);
blendMode(DARKEST);
image(book2, 600, 300, 200, 350);
blendMode(NORMAL);
// ADD TEXT + TEXT SIZE + FONTS
textFont("Courier New");
textSize(32);
stroke(201, 138, 56);
strokeWeight(5);
fill(82, 50, 10);
text(
"“Beware; for I am fearless, and therefore powerful.” — Mary Shelley, Frankenstein",
153,
502,
400
);
// ADD EMOJIS
textSize(100);
text("🖋️📝📚", 500,200);
}