-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
55 lines (45 loc) · 1.25 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<style>
body {
margin: 0;
padding: 0;
background-color: #000000;
overflow: hidden;
}
#canvasArea {
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
@font-face{ font-family : "gdjs_font_Bimbo_JVE.ttf"; src : url('Bimbo_JVE.ttf') format('truetype'); }
</style>
<!-- Libs and GDJS core files : -->
<script src="code.js"></script>
</head>
<body>
<div id="canvasArea"></div>
<div style="font-family: 'gdjs_font_Bimbo_JVE.ttf';">.</div>
<script>
(function() {
//Initialization
gdjs.registerObjects();
gdjs.registerBehaviors();
gdjs.registerGlobalCallbacks();
var game = new gdjs.RuntimeGame(gdjs.projectData, {});
//Create a renderer
var canvasArea = document.getElementById("canvasArea");
game.createStandardCanvas(canvasArea);
//Bind keyboards/mouse/touch events
game.bindStandardEvents(window, document);
//Load all assets and start the game
game.loadAllAssets(onAssetsLoaded);
function onAssetsLoaded() {
game.startStandardGameLoop();
}
})();
</script>
</body>
</html>