Skip to content

Commit

Permalink
added phaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
danmilldev committed May 17, 2024
1 parent 23abb8e commit 921e879
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
"dependencies": {
"parcel": "^2.12.0",
"phaser": "^3.80.1"
},
"devDependencies": {
"process": "^0.11.10"
}
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="./main.js"></script>
<script src="./main.js" type="module"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Phaser from "phaser";

var config = {
width: 1024,
height: 720,
type: Phaser.AUTO,
scene: [],
physics: {
default: 'arcade',
arcade: {
gravity: { y: 0 }
}
}
}

const game = new Phaser.Game(config)

0 comments on commit 921e879

Please sign in to comment.