JSFiddle - React, Tailwind, and code Playground
by shiqangpan
HTML
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script>
CSS
html, body, div, canvas {
margin: 0;
padding: 0;
}
JavaScript
/** @type {import("./typing/phaser")} */
class BootScene extends Phaser.Scene {
constructor() {
super();
console.log(this);
}
create() {
}
}
var config = {
width: 400,
height: 300,
backgroundColor: 0x000000,
scene: [BootScene]
}
var game = new Phaser.Game(config);