-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (62 loc) · 2.38 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'> <title>Hallo met de TSO</title>
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<script>
console.log("This game got created in 2020 by Rembert Oldenboom (Floating Point), as a first PIXIJS exercise.");
const contactEmail = 'overblijf@nicolaasbeetsschool.nl';
let assetsReady = false;
let fontsReady = false;
let jsonReady = false;
let helloTexts;
const googleFontSchool = 'Open Sans'; // Font for the schoolname
const googleFontExplainer = 'Gaegu'; // Font for the explainer
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
alert("Je browser lijkt helaas te oud voor dit spel. Installeer eens een nieuwere versie van Chrome of Firefox. Lukt het niet, mail dan even naar " + contactEmail + '.');
return false;
}
}();
// The setup will start when both fonts and assets are ready
function preLoaderCheck() {
if (fontsReady && assetsReady && jsonReady) {
setup();
}
}
// https://github.com/typekit/webfontloader
WebFont.load({
google: {
families: [googleFontSchool,googleFontExplainer]
},
loading: function() { console.log('Fonts loading'); },
active: function() { console.log('Fonts loaded'); fontsReady = true; preLoaderCheck(); },
inactive: function() { console.log('Font failure'); }
});
</script>
<style>
* { padding:0; margin:0; overflow-x:hidden; overflow-y:hidden;}
body { background-color:silver; }
</style>
<script type="text/javascript" src="pixi/pixi.min.js"></script>
<script type="text/javascript" src="pixi/pixiTextInput.min.js"></script>
</head>
<body>
<script>
if (supportsES6) {
let script = document.createElement("script");
script.src = "game.js";
document.body.appendChild(script);
}
</script>
<div id="canvas-placeholder">
</div>
</body>
</html>