I have several p5.js sketches, all of which work locally, but none will display on GitHub pages. Here is the html:
<html>
<head>
<meta charset="UTF-8">
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
<script language="javascript" type="text/javascript" src="sketch1.js"></script>
<style> body {padding: 0; margin: 0;} </style>
</head>
<body>
and here is the javascript:
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);
}
}