noa.container - manages the game's HTML container element, canvas, fullscreen, pointerLock, and so on.

This module wraps micro-game-shell, which does most of the implementation.

Events

  • DOMready => ()
    Relays the browser DOMready event, after noa does some initialization
  • gainedPointerLock => ()
    Fires when the game container gains pointerlock.
  • lostPointerLock => ()
    Fires when the game container loses pointerlock.

Hierarchy

Properties

canvas: any

The canvas element that the game will draw into

element: any
hasPointerLock: boolean

Gets the current state of pointerLock.

isFocused: boolean

Whether the game is focused.

listenerCount: {
    (type): any;
    (emitter, type): any;
}

Type declaration

    • (type): any
    • Parameters

      • type: any

      Returns any

    • (emitter, type): any
    • Parameters

      • emitter: any
      • type: any

      Returns any

off: any
on: any
pointerInGame: boolean

Whether the user's pointer is within the game area.

supportsPointerLock: boolean

Whether the browser supports pointerLock.

Methods

  • Parameters

    • type: any
    • listener: any

    Returns any

  • Parameters

    • type: any
    • Rest ...args: any[]

    Returns boolean

  • Sets whether noa should try to acquire or release pointerLock

    Parameters

    • lock: boolean = false

    Returns void

Generated using TypeDoc