import { createWorld } from './world'
import { installGame } from './game'
import { initAssets } from './assets/registry'

// Custom assets (the Workshop) must be resolved before anything is built —
// createBlob captures blob.mesh by reference. Safe to await: preload races each
// url against a deadline with allSettled, so a stalled asset costs a slow boot
// on built-in props, never a hang.
await initAssets()

const world = await createWorld(document.getElementById('app')!)
installGame(world)
world.start()
