Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UI

class
constructor
param

Hierarchy

  • UI

Index

Constructors

constructor

Properties

Screen

Screen: Screen = Screen

Private _screen

_screen: Screen

Private _texture

_texture: any

Private _webglTexture

_webglTexture: any

canvas

canvas: HTMLCanvasElement

centerX

centerX: number

centerY

centerY: number

context

context: CanvasRenderingContext2D

div

div: HTMLDivElement

engine

engine: Engine

Private frameBuffer

frameBuffer: any

height

height: number

htmlElements

htmlElements: Array<uiHTMLElement>

images

images: uiHTMLImage[] = []

objects

objects: Array<Entity>

Private webgl

webgl: WebGLRenderingContext

width

width: number

Methods

addImage

  • addImage(image: HTMLImageElement, width: number, height: number, x: number, y: number): uiHTMLImage
  • Parameters

    • image: HTMLImageElement
    • width: number
    • height: number
    • x: number
    • y: number

    Returns uiHTMLImage

addObject

  • addObject(object: Entity): void

appendDOMElement

  • appendDOMElement(element: HTMLElement, name: string): HTMLElement
  • Adding DOM element upper game engine canvas.

    Parameters

    • element: HTMLElement
    • name: string

    Returns HTMLElement

clearCanvas

  • clearCanvas(): void

draw

  • draw(): void

drawImage

  • drawImage(image: HTMLImageElement | HTMLCanvasElement): void
  • Draws image on canvas. Read about addImage

    Parameters

    • image: HTMLImageElement | HTMLCanvasElement

    Returns void

drawUI

  • drawUI(): void

hide

removeObject

  • removeObject(object: Entity): void
  • Removes element from drawing function.

    Parameters

    Returns void

show

Generated using TypeDoc