import "phaser";
import { SceneEnum, SceneManager } from "./render/scene/scene.manager";
if (window.Worker) {
const myWorker = new Worker(new URL('./js/worker.js', import.meta.url));
import("../other/pkg/other").then(other => {
const config = {
type: Phaser.AUTO,
parent: "phaser-rust-example",
scale: {
mode: Phaser.Scale.NONE,
width: 800,
height: 600,
},
render: {
pixelArt: true,
roundPixels: true,
},
dom: {
createContainer: true
},
backgroundColor: "#4488aa",
};
const game = new Phaser.Game(config);
SceneManager.init(game, myWorker);
console.dir(SceneEnum);
SceneManager.add(SceneEnum.TestScene);
console.log(other.OtherFun("hahaha!!!"));
let foo = new other.Foo(100);
console.log(foo.test());
});
}