Although this seems unnecessary, it solve portability problem. It makes the binding class being framework agnostic. No need to import specific render function from certain framework.
import { App, Game } from "./main.ts"
export default class {
@build(App) host: HTMLElement // <render-scope :ref="host">
@draw("webgpu", Game) canvas: HTMLCanvasElement // <canvas :ref="canvas">
}
import "wiles/integration/preact"
import "wiles/integration/three"
import App from "./demo/preact.jsx"
import Game from "./demo/three.js"
import { setApp, setGame } from "./main.ts"
setApp(App)
setGame(Game)
export * from "./bind.ts"
import App from "./demo/dom.js"
import Game from "./demo/webgpu.js"
import { setApp, setGame } from "./main.ts"
setApp(App)
setGame(Game)
export * from "./bind.ts"
Although this seems unnecessary, it solve portability problem. It makes the binding class being framework agnostic. No need to import specific
render
function from certain framework.