我有几个p5.js草图,所有这些都在本地工作,但没有一个会显示在GitHub页面上。这是html:
function setup() {
createCanvas(500,500);
background(250, 212, 210);
strokeWeight(4);
}
function draw() {
line(mouseX, mouseY, pmouseX, pmouseY);
if (mouseIsPressed == true) {
stroke(250, 3, 80);
} else {
stroke(110, 164, 249);
}
}
这是javascript:
$("#homepage").on("click", function(event) {
alert( window.location.href);
});