-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (76 loc) · 2.62 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
background-color: #000000;
overflow: hidden;
}
#canvasArea {
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
</style>
<!-- Libs and GDJS core files : -->
<script src="libs/pixi.js"></script>
<script src="libs/jshashtable.js"></script>
<script src="gd.js"></script>
<script src="libs/hshg.js"></script>
<script src="commontools.js"></script>
<script src="runtimeobject.js"></script>
<script src="runtimescene.js"></script>
<script src="polygon.js"></script>
<script src="force.js"></script>
<script src="layer.js"></script>
<script src="timer.js"></script>
<script src="imagemanager.js"></script>
<script src="runtimegame.js"></script>
<script src="variable.js"></script>
<script src="variablescontainer.js"></script>
<script src="eventscontext.js"></script>
<script src="runtimeautomatism.js"></script>
<script src="spriteruntimeobject.js"></script>
<script src="soundmanager.js"></script>
<script src="runtimescenetools.js"></script>
<script src="inputtools.js"></script>
<script src="objecttools.js"></script>
<script src="cameratools.js"></script>
<script src="soundtools.js"></script>
<script src="storagetools.js"></script>
<script src="stringtools.js"></script>
<script src="windowtools.js"></script>
<script src="Extensions/PhysicsAutomatism/box2djs/box2d.js"></script>
<script src="Extensions/PhysicsAutomatism/physicsruntimeautomatism.js"></script>
<script src="Extensions/PlatformAutomatism/platformerobjectruntimeautomatism.js"></script>
<script src="Extensions/PlatformAutomatism/platformruntimeautomatism.js"></script>
<script src="Extensions/TextObject/textruntimeobject.js"></script>
<script src="Extensions/TiledSpriteObject/tiledspriteruntimeobject.js"></script>
<script src="code0.js"></script>
<script src="data.js"></script>
</head>
<body>
<div id="canvasArea"></div>
<script>
(function() {
//Initialization
gdjs.registerObjects();
gdjs.registerAutomatisms();
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>