-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (33 loc) · 1.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!-- Open template.js, paste your Program into the commented part and
Save As NameOfProgram.js
then at the bottom of this page, change
<script src="template.js"></script> to
<script src="NameOfProgram.js"></script>
and Save as NameOfProgram.html -->
<!DOCTYPE html>
<!-- start of the document -->
<html>
<!-- The header. Information here doesn't make up elements of the webpage. We'll define all the javascript stuff at the end, so we just put the title here. -->
<head>
<!-- Title to be displayed in browser -->
<title>Jumping Jan</title>
</head>
<!-- The body of the webpage, where all visible stuff lies. -->
<body>
<p align="center">
<!--This draws the Canvas on the webpage -->
<canvas id="mycanvas"></canvas>
</p>
</body>
<!-- run all the JavaScript stuff -->
<!-- Include the processing.js library -->
<script src="processing-1.4.8.min.js"></script>
<!-- The name of the Program Source Code goes here -->
<script src="jumpingjan.js"></script>
<script type="application/javascript">
//get the canvas that Processing-js will use
var canvas = document.getElementById("mycanvas");
//pass the function sketchProc (defined in myCode.js) to Processing's constructor.
var processingInstance = new Processing(canvas, sketchProc);
</script>
</html>