Skip to main content

Function: createGame()

createGame(containerId): object

Defined in: utilities/create-game.ts:15

Creates a new game instance with the specified container ID.

Parameters

containerId

string

The ID of the container element where the game will be rendered.

Returns

object

An object containing the game instance, ECS world, render context, and time.

game

game: Game

renderContext

renderContext: RenderContext

time

time: Time

world

world: EcsWorld