-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (34 loc) · 874 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
37
38
39
40
41
<html>
<head>
<script src="//cdn.jsdelivr.net/npm/phaser@3.20.1/dist/phaser.min.js"></script>
<style>
body {
background-color: black;
}
</style>
</head>
<script type="module">
import GamingScene from './js/gamingScene.js';
import { GameRules } from './js/gameRule.js';
import { MainMenuScene } from './js/mainMenuScene.js';
var config = {
type: Phaser.AUTO,
backgroundColor: 'black',
// width: window.innerWidth, //1230,
// height: window.innerHeight, //660,
scale: {
parent: 'phaser-example',
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
width: 1230,
height: 660
},
scene: [ MainMenuScene, GamingScene ]
}
// window.innerWidth, window.innerHeight
var game = new Phaser.Game(config);
</script>
<body>
<div id="phaser-example"></div>
</body>
</html>