Optional
canvasBackground color of canvas, default "#000000" (black)
Optional
collisionsCollision configuration options
Optional
collisionCollision broad phase method: BroadPhaseMethods.QuadTree or BroadPhaseMethods.SpartialGrid. Default values is BroadPhaseMethods.SpartialGrid
Optional
collisionDefine a fixed rectangular area for collision detection
Optional
collisionCollision detection method: CollisionMethods.SAT or CollisionMethods.ABB. Default value is CollisionMethods.SAT
HTML element where the game will be created
Optional
debugDebug options
Show colliders
Optional
collidersColor of the colliders, default "#00FF00" (green)
Show mouse position
Optional
textColor of the text, default "#00FF00" (green)
Optional
textPosition of debug text, default "bottom-left"
Optional
dependenciesExternal elements which can be accessed through dependency injection.
Optional
headlessEnable Headless mode. The input and rendering functions are turned off. Ideal for game server development
Game height
Optional
physicsFramerate for physics execution. The allowed values are 60, 120, 180, 240. The higher the framerate, the more accurate the physics will be, but it will consume more processor resources. Default value is 180.
Game width
Game configuration options
Example