Optional
canvasBackground color of canvas
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
debugEnables the debug mode
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