我有几个p5.js草图,所有这些草图都在本地工作,但没有一个会显示在GitHub页面上。下面是HTML:p5 js草图在本地工作,但不在github
<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>
这里是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);
}
}
你能提供一个链接到github页面吗?此外,您需要熟悉[开发人员工具](http://happycoding.io/tutorials/javascript/developer-tools)。机会是你的错误在那里。 –
我现在要回顾一下开发者工具。 [here](https://bethanyrennard.github.io/hello-wurld/)是GitHub页面 –
您刚刚链接的GitHub页面不包含任何可运行的p5.js代码,也不会将其添加到您的页面。 –