import {useComputed } from '@preact/signals'; import { createGameHost, GameModule } from "boardgame-core"; import Phaser from "phaser"; import {h} from "preact"; import {PhaserGame, PhaserScene} from "@/ui/PhaserGame"; export default function App>(props: { gameModule: GameModule, gameScene: {new(): Phaser.Scene} }) { const gameHost = useComputed(() => { return { gameHost: createGameHost(props.gameModule, 'setup') } }); const scene = useComputed(() => new props.gameScene()); return (
); }