forked from zense/Canvas-Competition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (24 loc) · 789 Bytes
/
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
<html>
<body onload="canvas.setup()">
<canvas id="canvasArea1" style="position: absolute; left: 0; top: 0; z-index: 0; width:100%;height:100%"></canvas>
<canvas id="canvasArea2"
style="visibility: hidden; position: absolute; left: 0; top: 0; z-index: 0; width:100%;height:100%"></canvas>
<script src="./canvas.js"></script>
</body>
</html>
<script>
// Declare all global variables here
function setup() {
// Initialize variables here
}
// Declare custom functions here
// Function while will be called repeatedly
function main() {
canvas.clear();
}
// Override functions here;
canvas.mainFunction = main;
var timeStep = 50;
canvas.startMain(timeStep);
canvas.setupFunction = setup;
</script>