JSFiddle - React, Tailwind, and code Playground
by shiqangpan
HTML
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script>
CSS
body {
margin: 0;
}
JavaScript
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update
}
};
var game = new Phaser.Game(config);
function preload() {
this.load.image('sky', 'https://raw.githubusercontent.com/liyi93319/phaser3_rpg/main/part1/assets/sky.png')
}
function create() {
this.add.image(400, 300, 'sky');
}
function update() {
}