Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Engine

Implements

Index

Constructors

  • new Engine(width?: number, height?: number): Engine
  • Class constructor.

    Parameters

    • Optional width: number
    • Optional height: number

    Returns Engine

Properties

_basicShader: null | BasicShader = null
_elapsed: number = 0
_gameHeight?: number
_gameWidth?: number
_last: number = 0
_projection: undefined | Matrix4
_running: boolean = false
_startTime: number = 0
_instance: Engine

Accessors

Methods

  • cleanup(): void
  • loadAssets(assets: any): void
  • Loads the assets given at engine instantiation.

    Parameters

    • assets: any

    Returns void

    void

  • loop(): void
  • Main game loop. This calls all necessary update functions. // REVIEW: Updated the engine to use FPS controlled loops

    Returns void

    void

  • resize(): void
  • shutdown(): void
  • update(delta: number): void
  • Updates the engine and the current zone.

    Parameters

    • delta: number

    Returns void

    void

  • exit(): void
  • play(): void
  • Plays the engine. Can be called after stop.

    Returns void

    void

  • start(__namedParameters?: { assets: any; height?: number; width?: number }): void
  • Starts the engine and begins playing right away. Given in a destructured format.

    Parameters

    • __namedParameters: { assets: any; height?: number; width?: number } = ...
      • assets: any
      • Optional height?: number
      • Optional width?: number

    Returns void

    void

  • stop(): void
  • Stops the engine from running. No updates will be performed, must be handled by external Javascript or handlers.

    Returns void

    void

Generated using TypeDoc