AppConfig constructor

AppConfig({
  1. String canvasElement = "#gameCanvas",
  2. int gfxBatchCapacityInBytes = 65536,
  3. bool autoSuspend = true,
  4. bool autoRequestAccelerometerPermission = false,
})

Creates an instance of AppConfig with optional parameters.

  • canvasElement: The CSS selector for the HTML canvas. Defaults to "#gameCanvas".
  • gfxBatchCapacityInBytes: The graphics batch capacity in bytes. Defaults to 65536.
  • autoSuspend: Whether the application should auto-suspend. Defaults to true.
  • autoRequestAccelerometerPermission: Auto request Accelerometer Permission on first user interaction. Defaults to false.

Implementation

AppConfig({
  this.canvasElement = "#gameCanvas",
  this.gfxBatchCapacityInBytes = 65536,
  this.autoSuspend = true,
  this.autoRequestAccelerometerPermission = false,
});