xxxxxxxxxx
73
let itc;
let img;
let logotype = "bandcamp";
let a = 35.5;
let b, c;
let d = 196;
let e = 286;
let f = 220;
let g = 308;
let c4, c5, c6, c7, c8;
function preload() {
itc = loadFont("ITCAvantGardeStdBk.otf");
img = loadImage("logo_v1.png");
}
function setup() {
createCanvas(500, 500);
textAlign(CENTER);
textFont(itc);
fill(255);
}
function draw() {
background(255);
noStroke();
// strokeWeight(c);
fill(0, 0, 255);
textSize(48);
text(logotype, width / 2, height / 2 + 120);
//image(img, 0, 0, 500, 500);
console.log(mouseX, mouseY);
logomark1(124);
}
function logomark1(x, y1, x2, y2) {
noFill();
stroke(0, 0, 255);
b = map(mouseX, 1, width, 1, 15);
c4 = map(mouseY, 1, width, 260, 290);
c5 = map(mouseY, 1, width, e, g);
c6 = map(mouseY, 1, width, f, d);
c7 = map(mouseY, 1, width, 282, 300);
c8 = map(mouseY, 1, width, 227, 206);
strokeWeight(b);
//letter b
line(x, 120, x, 313);
line(x + a, c6, x + a, f);
line(x + a, e, x + a, c5);
line(x + a * 2, c6, x + a * 2, f);
line(x + a * 2, e, x + a * 2, c5);
line(x + a * 3, c6 + 20, x + a * 3, c4);
//letter c
line(x + a * 4, c6 + 20, x + a * 4, c4);
line(x + a * 5, c6, x + a * 5, f);
line(x + a * 5, e, x + a * 5, c5);
line(x + a * 6, c6, x + a * 6, f);
line(x + a * 6, e, x + a * 6, c5);
line(x + a * 7, c8, x + a * 7, 227);
line(x + a * 7, 282, x + a * 7, c7);
// for (let a = 0; a < 7; a++);
// {
// line(x + a, y1, x + a, y2);
// }
}
function keyReleased() {
if (key == "s" || key == "S") saveCanvas("bandcamp_logo_v1", "png");
}